I want to know what is the default task affinity for singleInstance activity?
Since each singleInstance Activity opens up as root activity in a new task. and there is no need to declare android:taskAffinity.
See I have read the developer guides and docs for android activity.
https://developer.android.com/guide/components/activities/tasks-and-back-stack and https://developer.android.com/guide/topics/manifest/activity-element.html#aff
<activity android:name=".MainActivity"
android:launchMode="singleInstance"
>
</activity>
I want to know the taskAffinity - string literal for that task in which singleInstance activity resides as root.
The default
taskAffinityis the package name of the app from the manifest<package>tag.This is for all activities, no matter what the launch mode is.
This is why a lot of developers have problems using the special launch modes
singleInstanceandsingleTask, becausetaskAffinitytrumps launch mode, so sometimes those activities will NOT be launched in a new task, but simply launched into the existing task as if the launch mode were "standard".