[TIMOB-26260] Android: Update "Ti.Android.Service" to handle "FOREGROUND_SERVICE" permission
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-10-04T00:20:33.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.5.0 |
Components | Android |
Labels | android, foreground, permissions, service |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2018-08-04T01:06:44.000+0000 |
Updated | 2018-10-08T19:43:07.000+0000 |
Description
Apps targeting Android P must add a new
FOREGROUND_SERVICE
permission to the "AndroidManifest.xml" or else calling Ti.Android.Service.foregroundNotify()
will throw a Java SecurityException
internally and fail to start.
https://developer.android.com/preview/behavior-changes#fg-svc
We need to do the following:
* Log an error if the permission is missing when calling Service.foregroundNotify()
.
* Document that that this permission is required.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10314
FR Passed.
PR Merged.
Verified the fix on SDK 7.5.0.v20181005164109. Forgeround service permission works as expected. Closing