[TIMOB-26259] Android: Investigate handling of missing FLAG_ACTIVITY_NEW_TASK on Android P
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | Medium |
Status | Closed |
Resolution | Done |
Resolution Date | 2018-10-26T00:04:52.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, notification, shortcut |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2018-08-04T00:55:32.000+0000 |
Updated | 2018-10-26T00:04:52.000+0000 |
Description
Android P has a breaking change where it now requires flag "FLAG_ACTIVITY_NEW_TASK" to be set if an intent will be starting an activity from a non-activity. If the flag is missing, then it will fail to start the activity.
https://developer.android.com/preview/behavior-changes#fant-required
Investigate if this will be an issue for the following:
* Local notification pending intents via
Ti.Android.NotificationManager
.
* Push notification pending intents via APS and cloud push module.
* App shortcuts via "com.android.launcher.action.INSTALL_SHORTCUT" intents.
* Anything else?
I'm not seeing any issues here. Our core Titanium code which calls
startActivity()
are done while an activity context is active. So, that part of the code is fine. Our push notification code is already setting theFLAG_ACTIVITY_NEW_TASK
flag when callingstartActivity()
. So, that part is fine as well. [APSCloudPush.java#L377](https://github.com/appcelerator/aps_sdk/blob/master/android/cloudpush/APSCloudPush/src/main/java/com/appcelerator/aps/APSCloudPush.java#L377) [IntentReceiver.java#L42](https://github.com/appcelerator/aps_sdk/blob/master/android/cloudpush/APSCloudPush/src/main/java/com/appcelerator/aps/IntentReceiver.java#L42) Closing.