Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to start a Activity as a new process

I have this situation where i have to start an activity from my mainActivity. But I want this new activity to be started as a new process(With new process ID). Is it possible to achieve this in android. Any help is appreciated.

like image 800
Andro Selva Avatar asked May 20 '11 09:05

Andro Selva


1 Answers

Just put android:process=":ProcessName" for your Activity in AndroidManifest.xml

<activity
     android:name=".YourActivity"
     android:screenOrientation="portrait"
     android:process=":YourProcessName">
     <intent-filter>
          <action android:name="android.intent.action.VIEW" />

          <category android:name="android.intent.category.DEFAULT" />
     </intent-filter>
</activity>

In this case "YourActivity" will be run on other process called "YourProcessName".

like image 78
valerybodak Avatar answered Oct 19 '22 13:10

valerybodak