I'm trying to make a game in which I want a yellow circle (sprite) to move in the canvas based on device orientation using accelerometer (I'm not using orientation sensor on purpose).
I want the game to be in landscape, so I set screen orientation to landscape.
When I ran the app, it worked as intended. The ball was moving in the direction in which I tilted the phone.
But then I accidentally pressed the back button. When I opened the app again (Note: the app was running in background; It didn't close completely), it started behaving weirdly. When I tilt down it goes leftwards, when I tilt right it goes downwards.
Also, this happens 70-80% of the time, not always. I'm I the only who is facing the issue. Please anyone let me know what to do.
.aia file: copy.aia (3.2 KB)
My Device: GIONEE P7 (Android 6.0)