Android does not have main loop, but I have a ball in my arkanoid game test, and it needs to have the position changed every 100 ms.
I tried using MainThread library, but still it is not working.
If there was any possible way for me to override the function onRunning() and put it to check if the screen was touched and move the ball would be great.
But considering as I can’t change the onRunning() function what could I do to add a function that will move my ball to the main game loop?
You could create another thread which will run asynchronously with your Main/Gui thread
when you are done
Note that this is not the most elegant solution, you should create a class which will handle the logic of the game on one thread and the drawing on another one.
Moreover, you should pause the logic game as well as the drawing whenever your activity is paused .