Android Question Android 5 stops my sticky foreground service!!!

vfafou

Well-Known Member
Licensed User
Longtime User
Hello!
I have written a service to support some background functions in my app. I haven't noticed any problem with Android versions prior to 5. Android 5 stops my app's service when I put the app to the background and I use some other applications e.g. a GPS navigator, Google Play or a web browser.
I have my service starting as sticky and foreground. When I put the app to the background, I add a notification to the notifications bar, coming from the Main Activity!
Is there any reason that Android 5 stops the service of my app?
Is there any tip that allows to keep an app alive in the background?

Thank you in advance!
 

vfafou

Well-Known Member
Licensed User
Longtime User
Are you using a different id for the second notification?
Hello, Erel!
Thank you for your reply!
I add one single notification on Activity_Pause and I remove it on Activity_Resume.
Is there any other action I have to take?
 
Upvote 0
Top