Open neildborbon opened 5 years ago
@pimol Yea, after some researching, I realized its not possible. So I just did a "work around". I used a cordova plugin, Insomnia, which will prevent the phone from sleeping or locking as long as the app is active. But the draw back on this is that it will still stop the service if the user presses the physical lock button. So yea, its annoying that google haven't addressed this issue yet :( I dunno if this is a FEATURE or a BUG.
I am using ionic by the way, and for the work around that I mention above, I used this for it ...
aqui esta os passos que coloquei para resolver esse problema em android 8 e android 9!!!! vlw
I have an app where it sends the device's coordinates to my DB every 15 seconds even when app is closed already using this plugin. It works fine, but when the phone is put to sleep or locked, it stops sending data to my DB but will continue when you unlock the phone.
HOPING FOR A QUICK RESPONSE FOR THIS. Thank you!