Is it possible to start a Activity as a new process
12,676
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".
Author by
Andro Selva
Working as mobile developer for past 7 years. Hands on experience with Android native development and Titanium.
Updated on June 13, 2022Comments
-
Andro Selva almost 2 years
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.
-
Andro Selva almost 12 yearsCan u give a little more explanation on that. I am not aware of it.
-
android developer almost 12 yearsit will simply set a new process for the activity , which will be different from the other one you used before . this way , you can have a process1 for activity1 and process2 for activity2 .
-
Santosh V M almost 11 years@AndroSelva I have the main activity running. Is it possible to start the same activity as a another process?