Alex Rivera | Logout

Every Activity in Android is a Process,or One Application is one process

Asked 2011-06-24T12:59:25.620
27

In this page, http://androidapps.org.ua/androidintro_ipc.html , intent switching between activities is described as Inter Process Communication. Now I am confused whether every activity is a separate process in android or All activities inside an application is one process. I have checked the process id of all activities and service in my Application using:

 int id = android.os.Process.myPid();
 System.out.println("Process id of Activity1 :"+id);

But it is showing same process id. Please reply back.

Edit
Report

1 Answer

0

You can send an intent to another application, provided it has an intent-filter.

So yes all of your activities in your application will run in the same process.

For eg: You can send a generic intent to all email applications. Gmail is one such application that has a intent filter which listens to the email intent. This is how you achieve IPC using intents.

answered 2011-06-24T13:03:16.867

Your Answer