Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6983863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:28:30+00:00 2026-05-27T18:28:30+00:00

I am trying to run 2 activities on 2 different processes. The purpose of

  • 0

I am trying to run 2 activities on 2 different processes. The purpose of doing this is that my app is displaying my product which adds homescreen icons of my subproducts. Whenever i am using the main product, i want it to be displayed on the main process while my sub product to be displayed in a different activity on another process. This is so that when exiting a subproduct, resuming my main product can be fast because its already running in the background.

Reading through this:
http://developer.android.com/guide/topics/manifest/activity-element.html#proc

They state that you can separate activities into different processes using android:process attribute. Here’s what i’ve done:

<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true" android:process="com.mypackage.myapp">
    <activity android:name=".ProductActivity"
              android:label="@string/app_name" 
              android:configChanges="orientation|keyboardHidden">
        <intent-filter>
             <action android:name="android.intent.action.MAIN" />
             <category android:name="android.intent.category.LAUNCHER" />
             <category android:name="android.intent.category.DEFAULT"/>
             <category android:name="android.intent.category.BROWSABLE"/>
         </intent-filter>
    </activity>
    <activity android:name=".SubProductActivity"
              android:label="@string/app_name" 
              android:configChanges="orientation|keyboardHidden"
              android:process=":com.mypackage.myapp.newprocname">
        <intent-filter>
             <action android:name="android.intent.action.MAIN" />
             <category android:name="android.intent.category.LAUNCHER" />
             <category android:name="android.intent.category.DEFAULT"/>
             <category android:name="android.intent.category.BROWSABLE"/>
         </intent-filter>
    </activity>
    <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden"> <intent-filter> </intent-filter> </activity>
</application>

However, logging the current PID, both activites are actually running on the same process…

What can be the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:28:30+00:00Added an answer on May 27, 2026 at 6:28 pm

    After setting the intent of the subactivity to android.intent.category.LAUNCHER (as you correctly did), set a separate TaskAffinity string for the second activity.
    E.g. in the second activity line in the manifest make sure you have something similar to

    <activity android:name=".SubProductActivity" android:label="SubActivity"
    android:taskAffinity="com.domain.project.SubActivityName">
    

    This tells Android to run the SubProductActivity in a separate process.

    Refer also to https://stackoverflow.com/a/3270422/978329

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying run a program from a qmake .pro file which modifies the
I'm trying to run a batch file, as another user, from my web app.
I'm trying to run a LINQ to SQL query that returns a result in
I wrote this C program for Win32/c compiler but while i'm trying run this
On my Android application I have Activities(UI) and also Services(on startup) that run in
When trying run this code: At first it prints Process some_id BEFORE enter for
I am trying to run the following recognizer intent example that i have found
I'm trying to write an android application that has two main activities: login screen
I'm trying to develop an app which first checks if the device is connected
I'm trying run this procedure with generic parameters. If I can't delete because some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.