When you launch an external activity (from another app), is the new activity loaded in the existing app's process or does Android spawn a new process corresponding to the other app?
views:
42answers:
1
+2
A:
When you start an Activity that is part of another application, it will run in a different process. Depending upon the state of the system this might mean that a new process will be spawned to host the Activity or with some luck the necessary process is already alive and it will simply be sent a message to create the new instance of the requested Activity.
Tim Kryger
2010-07-19 03:27:11
So is there a 1-1 mapping between app and process? In other words, all activities of App A must run in App A's process, regardless of how it was spawned.
zer0stimulus
2010-07-19 14:00:25
@zer0stimulus Thats the default behavior but you can force certain [applications](http://developer.android.com/guide/topics/manifest/application-element.html#proc) to share a single process or split specific [activities](http://developer.android.com/guide/topics/manifest/activity-element.html#proc), [services](http://developer.android.com/guide/topics/manifest/service-element.html#proc), [broadcast receivers](http://developer.android.com/guide/topics/manifest/receiver-element.html#proc), and content providers out into their own processes using the android:process tag in the AndroidManifest.xml
Tim Kryger
2010-07-19 14:29:56