I’d like to ask how do you check if the device is held verticaly, when the app is running in the background?
I want to make a little tool, but i’m new to android, i’ve got all the programms needed to programm in Java (Android) but i’d like to learn more about Java (Android) programming.
Can you give an example of a code like this, and explain why the parameter 0 is set to 0 and not to 1 for ex.
Thanks in advance,
Tim
EDIT: When I was posting this question I didn’t realize that the app automaticaly switches to landscape mode when the device was rotated.
Please ignore this question
You can extend the OrientationEventListener, this is a helper class for receiving notifications from the SensorManager when the orientation of the device has changed.
BTW, try reading a bit more android documentation before trying to run anything at all. Good Luck!!!