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
- br receives intent
- starts service
- service magic
- 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:
- can specifying taskaffinity cause new process created in android?
- 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
Post a Comment