Can specifying a taskaffinity cause a new process to be created in Android -


so have simple application.

 activity 1  activity 2 (affinity :mytask - launchmode=standard) activity 3 (affinity :mytask - launchmode=standard) broadcast receiver service 
  1. br receives intent
  2. starts service
  3. service magic
  4. launches activity 2 launch activity 3 after while.

now observing when activity 2 started, see 2 process ids app. if navigate activity1 -> activity 2. see 1 process id.

my questions are:

  1. can specifying taskaffinity cause new process created in android?
  2. how starting activity service different regular scenario when activities have task affinity?

about question 1:

with default config, specifying taskaffinity not cause new process created in android, unless specifying attribute android:process different default config.

about question 2:

starting activity service, must set new_task flag in intent, , activity started in system if there task same affinity has existed, if activity launch in task, otherwise launch in new task.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -