java - Android Service stopped when app is in the background -


my app starts service trackes positions using gps. tracking done using service created app, when tha app closes can continue run in background. works fine until... issue (i think) when android device memory load increases , think service gets swapped out , crashes. there way force service remain loaded? - assume not , if there helpful know. in advance.

you can use startforeground method method in service in order make priority. system destroy other applications begin with.

http://developer.android.com/reference/android/app/service.html#startforeground(int,%20android.app.notification)


Comments