Hello everyone. I am currently working with A repe...
# android
s
Hello everyone. I am currently working with A repeating alarm manager service to trigger location retrieval in background every 15 minutes. It seems to work alright on most usecases, except pn Xiami devices(ex: Redmi). Has anyone faced similar issues or has some hints?
f
Maybe those devices have an aggressive background tasks policy and is killing your service…
s
That s what I read about... but couldnt find a failsafe „workaround“ for it
f
if you are using a job scheduler there is a flag for not running them on low battery. Also, have you checked if Xiami offers an SDK? if they do maybe there is something that can be checked there
a
You can show popup to to disable battery optimization for user who is using Xiaomi phones
👍 1
💯 1
s
Will try that out. Thanks. I had seen that some used manufacturer specific intent checks and was not sure if that is the right thing
a
maybe try Work Manager
o
Nothing can be done. Read this and weep (as we all do!) https://dontkillmyapp.com/ Also, this is not related to Kotlin. Please avoid posting these off-topic messages here.