Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26260] Android: Update "Ti.Android.Service" to handle "FOREGROUND_SERVICE" permission

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-10-04T00:20:33.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.5.0
ComponentsAndroid
Labelsandroid, foreground, permissions, service
ReporterJoshua Quick
AssigneeJoshua Quick
Created2018-08-04T01:06:44.000+0000
Updated2018-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.

Comments

  1. Joshua Quick 2018-09-08

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/10314
  2. Lokesh Choudhary 2018-10-03

    FR Passed.
  3. Lokesh Choudhary 2018-10-04

    PR Merged.
  4. Keerthi Mahalingam 2018-10-08

    Verified the fix on SDK 7.5.0.v20181005164109. Forgeround service permission works as expected. Closing
       Operating System
         Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
       Node.js
         Node.js Version             = 8.9.1
         npm Version                 = 5.5.1
       Titanium CLI
         CLI Version                 = 5.1.1
       Titanium SDK
         SDK Version                 =7.5.0.v20181005164109
       Device			      =Oneplus 5T Android 8
       					samsung s5 android 6
       					samsung galaxy 2 android 4.4
       

JSON Source