Using startActivityForResult doesn't work properly in Android < 5.0 when using launchMode singleInstance or singleTask. However, I'm using that launchMode to avoid WebView reload:
android:alwaysRetainTaskState="true"
android:documentLaunchMode="never"
android:launchMode="singleInstance"
I understand there's no possible workaround around the first limitation.
Is there a way to make those Manifest attributes variables, depending on the API version?
(I'd use those three attributes with specified values for Android > 5.0, and a launchMode="standard"
for Android < 5.0. Very similar to this, only that I can't find a way to define documentLaunchMode
and launchMode
; only alwaysRetainTaskState
since it's a bool).