Gandalf Member Licensed User Longtime User Jun 28, 2021 #1 Hello, I need to create site survey app which reports location and signal level continuously. Location is not a problem with Background location tracking tutorial. Basing on this tutorial I added code from this post and everything worked Ok on Android 9 - Signal_Changed event fired even when screen is off, though much less often. However when I got Android 10 device I saw two things: result string has different format (which is not a problem), and Signal_Changed event never fires when screen is off (which is a problem). Restarting listener again after some time gives results equal to last one when screen was on, data is not updated. Is there any way to get LTE signal parameters on Android 10 when screen is off?
Hello, I need to create site survey app which reports location and signal level continuously. Location is not a problem with Background location tracking tutorial. Basing on this tutorial I added code from this post and everything worked Ok on Android 9 - Signal_Changed event fired even when screen is off, though much less often. However when I got Android 10 device I saw two things: result string has different format (which is not a problem), and Signal_Changed event never fires when screen is off (which is a problem). Restarting listener again after some time gives results equal to last one when screen was on, data is not updated. Is there any way to get LTE signal parameters on Android 10 when screen is off?
Erel B4X founder Staff member Licensed User Longtime User Jun 28, 2021 #2 I think that your only option is to turn on the screen or prevent it from turning off. This can be done with PhoneWakeState. This might also be needed: https://www.b4x.com/android/forum/threads/draw-on-top-of-other-apps-permission.90513/#content It will allow you to start an activity from a service. Upvote 0
I think that your only option is to turn on the screen or prevent it from turning off. This can be done with PhoneWakeState. This might also be needed: https://www.b4x.com/android/forum/threads/draw-on-top-of-other-apps-permission.90513/#content It will allow you to start an activity from a service.
Gandalf Member Licensed User Longtime User Jun 28, 2021 #3 Erel said: I think that your only option is to turn on the screen or prevent it from turning off. Click to expand... Hi Erel, Thanks for clarification! I will not lose time looking for another solution and just add "Keep screen on" and "Wake up every n minutes" options to the app. Upvote 0
Erel said: I think that your only option is to turn on the screen or prevent it from turning off. Click to expand... Hi Erel, Thanks for clarification! I will not lose time looking for another solution and just add "Keep screen on" and "Wake up every n minutes" options to the app.