D daemon Active Member Licensed User Longtime User Jan 20, 2015 #1 How can I detect device orientation in a background service that is configured to start at boot (i.e. none of my activities have run)? I also need to get events when the orientation changes, so that I can start using new orientation. Update: I tried using PhoneOrientation, but since my device does not have orientation sensor, I never received OrientationChanged event. Last edited: Jan 20, 2015
How can I detect device orientation in a background service that is configured to start at boot (i.e. none of my activities have run)? I also need to get events when the orientation changes, so that I can start using new orientation. Update: I tried using PhoneOrientation, but since my device does not have orientation sensor, I never received OrientationChanged event.
Erel B4X founder Staff member Licensed User Longtime User Jan 20, 2015 #2 Check this: https://www.b4x.com/android/forum/threads/catching-screen-rotation-in-services-with-a-timer.39453/ Upvote 0
Check this: https://www.b4x.com/android/forum/threads/catching-screen-rotation-in-services-with-a-timer.39453/
D daemon Active Member Licensed User Longtime User Jan 21, 2015 #3 I want to know exact rotation (0, 90, 180, 270) of device, even when it is in locked state. Display orientation does not seem to change in locked state. Upvote 0
I want to know exact rotation (0, 90, 180, 270) of device, even when it is in locked state. Display orientation does not seem to change in locked state.