android process still alive after finishing activities
My application launches 3 activities. When I want to exit, I close these 3 activities calling finish method. The activity onDestroy methods are then called but the p开发者_如何学编程rocess is still alive... How is it possible ?
This is perfectly normal. Android will keep your process around until such time as it needs to reclaim that process' memory. That way, if the user immediately returns to your application, your application will appear quicker -- Android does not have to fork a process and load your application into memory.
Try:
System.exit(0);
It will kill your Activity-process.
Edit: As mentioned in the comments below. This works much better: android.os.Process.killProcess(android.os.Process.myPid());
精彩评论