1. Are you ready for the Galaxy S20? Here is everything we know so far!

How the music player or navigation app to keep app alive in the background

Discussion in 'Android Development' started by Snail, Dec 13, 2018.

  1. Snail

    Snail Lurker
    Thread Starter

    My app need to keep running all the time in background event the screen is off.My application is not an internet product, and it is for special people in special scene. So I need to prevent the system killing my services and let my application can use network and gps service all the time.

    I know this requirement is very harsh for an android developer. I used some ways from google to implement it. But they don't work very well for all the most android smart phone, specially in new android system (android O and android P)

    I want to tell my boss that we cannot do (not wouldn't do) this requirement. But I don't have any evidence like Official documents to persuade my boss. Also his two questions I could not give correct answers:

    1. why my music player (like kuGouMusic or QQMusic) can keep playing in the background ?

    2. why my navigation app (Gaode or Baidu map) can keep record my route when the app in the background ?
    If you have some official documents or you know how the two kinds application( music player and navigation app) do to keep the app alive. Also if you have other good solutions to keep the application alive, welcome to share to me. please kindly help me .
     


  2. lvt

    lvt Android Expert

    Did you try to make your app a device administrator?
     
  3. Snail

    Snail Lurker
    Thread Starter

    how to make my app as a device administrator ?
     
  4. lvt

    lvt Android Expert

    I don't know, it's just a suggestion, you might find the answer in an Android developer forum.

    Many apps that run in the background need administrator privileges so they won't be terminated by Android's battery saver feature.
     
Loading...

Share This Page

Loading...