How does Foreground Service (another process / same process) work when Android stays low in memory

If it Serviceworks in different processes (through the " :name" inside the manifest) with the foreground flag. In the case when System would like to free some memory .. (imagine a heavy ui, the user clicked "Home" and switched to another heavy application)

  • will it kill only the main process for this application for free resources? (obviously leaving the service process intact) and then restart the justmain process when the user enters the application.

  • If the service will run in the same process, will it release all resources, such as actions, except the foreground service? or the whole process (with heavy ui) in this case will be considered as the foreground, therefore it consumes a lot of memory and will not be pleasant for a user phone.

PS

I do not understand any guarantees for the maintenance of the foreground. http://developer.android.com/reference/android/app/Service.html

I understand that android design kills processes instantly (what are the answers to the second question, but you want to be sure)

http://android-developers.blogspot.com/2010/04/multitasking-android-way.html

+4
source share
1 answer
  • , , . , , , . Foreground , memeory .

  • , . , . .

+1

All Articles