Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26259] Android: Investigate handling of missing FLAG_ACTIVITY_NEW_TASK on Android P

GitHub Issuen/a
TypeStory
PriorityMedium
StatusClosed
ResolutionDone
Resolution Date2018-10-26T00:04:52.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, notification, shortcut
ReporterJoshua Quick
AssigneeJoshua Quick
Created2018-08-04T00:55:32.000+0000
Updated2018-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?

Comments

  1. Joshua Quick 2018-10-26

    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 the FLAG_ACTIVITY_NEW_TASK flag when calling startActivity(). 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.

JSON Source