AFAIK Android does not allow an application to turn on the screen (unless it is a system app with special permissions and certificate).
If I'm wrong, please tell me and point me to the documentation or similar.
It is possible to turn the screen off, but not to turn it on again.
Regards,
Max
--
You received this message because you are subscribed to a topic in the Google Groups "Osmand" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/osmand/7TB9_5862Xw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to osmand+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
I did a first implementation.
Announcements turn the screen on for x seconds.
If there is another announcement within this time span, the x seconds start again.
After the time is over, the screen turns off, until next announcement.
Now I will clean up the implementation and add some options.
But sadly there is an issue, if the screen is turned on, sometimes the announcement is played twice, but I don't know why.
Also if the screen is turned on, OsmAnd sometimes says "route has been recalculated", but this also happened before, if I turned the screen on with the power button, thus I think this bug has been there before.
The only problem I have is that the screen is not updated. Every time the screen wakes up it shows the map of the starting position.
If tried the nighly builds with this feature. Osmand does wake up my screen and also goes back to sleep. That is very good news.
The only problem I have is that the screen is not updated. Every time the screen wakes up it shows the map of the starting position. I guess we're almost there ;-)
- The screen goes not back to sleep. So I deactivated the function ('Turn on the screen' in the Navigation settings) during my ride.
- The screen goes not back to sleep. So I deactivated the function ('Turn on the screen' in the Navigation settings) during my ride.
Do you have the lock screen (Android) enabled?
I guess not, because the old "Turn on the screen" implementation does not work, if the lock screen (Android) is not enabled.
Latest OsmAnd nightly builds use a completely different way to turn off the screen (OsmAnd 1.9.2.g was released with an older "screen off" implementation).
If you want to test latest nightly build, please report back, if it is working or not.
http://download.osmand.net/latest-night-build/OsmAnd-default.apk
Latest OsmAnd nightly builds use a completely different way to turn off the screen (OsmAnd 1.9.2.g was released with an older "screen off" implementation).
If you want to test latest nightly build, please report back, if it is working or not.
http://download.osmand.net/latest-night-build/OsmAnd-default.apk
I will install it today and test it tomorrow. Mirco mentioned that it works, so I expect the same for me. I will give feedback after the test.
But "Wake on voice" will not work with "sound off", the screen will stay off.
But "Wake on voice" will not work with "sound off", the screen will stay off.In my nightly build the option is called "turn on screen" and underneath it says "Turn on the phone screen when approaching a turn"
<string name="wake_on_voice">Turn on the screen</string>
<string name="wake_on_voice_descr">Turn on the phone screen when approaching a turn</string>
There is no link with a "voice" which I think is OK. This makes it possible to switch on the screen regardless whether you have voice assistance on or not.
This seems OK to me so will that be the way it will be implemented?
I have just one suggestion: Can you check display proximity sensor before turniong screen on ? If my phone is in my pocket, it should not turn the screen on
(now it turns screen on when I hold my finger on proximity sensor - may be just some problem of my phone ?)