According to new behavior documented here https://developer.android.com/about/versions/pie/android-9.0-changes-all#fant-required starting activities from non-activity context requires FLAG_ACTIVITY_NEW_TASK flag, perhaps...
So I have created sandbox app that can launch activity of another apps by package name and activity name. The core function used to launching, looks like this:
fun Context.startActivity(packageName: String, activityName: String) {
applicationContext.startActivity(Intent(Intent.ACTION_MAIN).apply {
component = ComponentName(packageName, activityName)
})
}
What is odd, by calling this function I can succesfully start any exported activity without passing FLAG_ACTIVITY_NEW_TASK.
It is quite different from what google saying about that. Or maybe I wrongly understand this new behavior requirements?
Off course I tested this on API 28 but also on lower API's.
Can someone explain in which cases this new behavior can breaks any feature that works on older APIs?