Is it possible to start a Activity as a new process
I have this situation where i have to start an activity开发者_JAVA技巧 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.
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".
精彩评论