Hey all,
How can I determine if the screen is on or off when the service starts?
I have tried Phone events and listened to the screen on and off events, but the event will not trigger if the screen is already in that state. For e.g:
If the screen is off and the service gets started by startServiceAt(service_to_start), and in the service there are screen on and off events. But the screen_off event will not trigger because the screen is already in that state.
Can anyone help me please?
Thanks.
How can I determine if the screen is on or off when the service starts?
I have tried Phone events and listened to the screen on and off events, but the event will not trigger if the screen is already in that state. For e.g:
If the screen is off and the service gets started by startServiceAt(service_to_start), and in the service there are screen on and off events. But the screen_off event will not trigger because the screen is already in that state.
Can anyone help me please?
Thanks.