{ "id": "170280", "key": "TIMOB-25501", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-17T19:29:29.000+0000", "created": "2017-11-10T23:52:56.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "notifications", "push" ], "versions": [ { "id": "19906", "description": "", "name": "Release 6.3.0", "archived": false, "released": true, "releaseDate": "2017-11-01" }, { "id": "19542", "description": "", "name": "Release 6.2.2", "archived": false, "released": true, "releaseDate": "2017-09-19" } ], "issuelinks": [ { "id": "56158", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "170339", "key": "TIMOB-25521", "fields": { "summary": "ERROR : [Pixel] BroadcastReceiver: java.lang.RuntimeException: BroadcastReceiver trying to return result during a non-ordered broadcast", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "56223", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "170652", "key": "TIMOB-25617", "fields": { "summary": "Android: Push notifications not shown in statusbar on Android 8 if app is backgrounded", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "56144", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "169882", "key": "NATIVESDK-353", "fields": { "summary": "Android: Unable to play custom sound for notifications on Android 7+", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-12-19T12:22:24.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h5. Issue Description \r\n\r\nIn our application, we have push notification functionality. When the app is in background and a notification is sent from the dashboard, the notification is not adding to the notification tray instead the app is getting crashed saying “App has been stopped”. But when the app is in foreground, on receiving notification app is behaving as expected.\r\n\r\nSample payload data:\r\n{code} \r\n{ \r\n\"alert\": \"test\", \r\n\"title\": “Appname”, \r\n\"vibrate\": true, \r\n\"icon\": \"push_notification_icon\", \r\n\"sound\": \"\", \r\n\"badge\": \"\", \r\n\"ClaimID\": “123456”, \r\n\"UserID\": “1234566”, \r\n\"ChannelName\": “mychannel” \r\n} \r\n{code}\r\nBut when we remove the property “sound” from the payload data, app is not getting crashed even when the app is in background. \r\n\r\nNote: This issue is in Pixel (8.0.0 OS). In nexus(6.0.1 OS) and Samsung S4(4.4.2 OS) it is working fine. \r\nWe are using SDK 6.3.0GA, CloudPush module : 4.0.3 and Cloud module : 3.2.11. \r\n\r\nPlease download the test-case: \r\nhttps://drive.google.com/file/d/1yVJ-NkICtWDZQXgLyDWstPROiyMHC0Hm/view?usp=sharing\r\n", "attachment": [], "flagged": false, "summary": "Android: App crash on receiving notification if app in background", "creator": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 6.3.0GA & SDK 6.2.0GA ", "comment": { "comments": [ { "id": "430543", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is the error log:\r\n{code}\r\n11-13 13:19:20.375 6624-6624/? E/TiApplication: (main) [144850,284753] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start receiver com.appcelerator.aps.GCMReceiver: android.os.FileUriExposedException: file:///storage/emulated/0/cocoafish/sound/com.test.push exposed beyond app through Notification.sound; Titanium 6.3.0,2017/10/31 18:13,undefined\r\n java.lang.RuntimeException: Unable to start receiver com.appcelerator.aps.GCMReceiver: android.os.FileUriExposedException: file:///storage/emulated/0/cocoafish/sound/com.test.push exposed beyond app through Notification.sound\r\n at android.app.ActivityThread.handleReceiver(ActivityThread.java:3047)\r\n at android.app.ActivityThread.-wrap18(ActivityThread.java)\r\n at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1561)\r\n at android.os.Handler.dispatchMessage(Handler.java:102)\r\n at android.os.Looper.loop(Looper.java:154)\r\n at android.app.ActivityThread.main(ActivityThread.java:6119)\r\n at java.lang.reflect.Method.invoke(Native Method)\r\n at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)\r\n at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)\r\n Caused by: android.os.FileUriExposedException: file:///storage/emulated/0/cocoafish/sound/com.test.push exposed beyond app through Notification.sound\r\n at android.os.StrictMode.onFileUriExposed(StrictMode.java:1799)\r\n at android.net.Uri.checkFileUriExposed(Uri.java:2346)\r\n at android.app.NotificationManager.notifyAsUser(NotificationManager.java:300)\r\n at android.app.NotificationManager.notify(NotificationManager.java:284)\r\n at android.app.NotificationManager.notify(NotificationManager.java:268)\r\n at com.appcelerator.aps.APSCloudPush.showTrayNotification(APSCloudPush.java:523)\r\n at com.appcelerator.aps.APSCloudPush.receivePayload(APSCloudPush.java:253)\r\n at com.appcelerator.aps.GCMReceiver.onReceive(GCMReceiver.java:30)\r\n at android.app.ActivityThread.handleReceiver(ActivityThread.java:3040)\r\n at android.app.ActivityThread.-wrap18(ActivityThread.java) \r\n at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1561) \r\n at android.os.Handler.dispatchMessage(Handler.java:102) \r\n at android.os.Looper.loop(Looper.java:154) \r\n at android.app.ActivityThread.main(ActivityThread.java:6119) \r\n at java.lang.reflect.Method.invoke(Native Method) \r\n at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) \r\n at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) \r\n{code}\r\n\r\nusing payload:\r\n{code:json}\r\n{\r\n\"alert\": \"test\",\r\n\"title\": \"title\",\r\n\"vibrate\": true,\r\n\"icon\": \"push_notification_icon\",\r\n\"sound\": \"\",\r\n\"badge\": \"\"\r\n}\r\n{code}", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-13T21:21:57.000+0000", "updated": "2017-11-13T21:21:57.000+0000" }, { "id": "430605", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "aps_sdk: https://github.com/appcelerator/aps_sdk/pull/304\r\ncloudpush: https://github.com/appcelerator-modules/cloudpush/pull/33", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-14T18:02:10.000+0000", "updated": "2017-11-14T18:02:10.000+0000" }, { "id": "430625", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\n\r\nCheck it with cloudpush prerelease 5.0.0 & ti.playservices 11.0.40.\r\nPush notifications are sent & received successfully. Also, there is no app crash in the background when sound or icon is present in the payload.\r\n\r\nStudio Ver: 4.10.0.201709271713\r\nSDK Ver: 7.0.0.v20171114124039\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.3\r\nAppc NPM: 4.2.10\r\nAppc CLI: 6.3.0\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.10.7\r\nNode Ver: 7.10.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ samsung SM-G955U1 --- Android 7.0\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-14T23:36:15.000+0000", "updated": "2017-11-14T23:36:15.000+0000" }, { "id": "430875", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Having a custom sound in \"Resources/sound/\" crashes the app when push notification is sent on android 7.0 & above.\r\nAndroid 6.0.1 works fine.\r\n\r\n{code}\r\n[ERROR] : TiApplication: (main) [27214,32660] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start receiver com.appcelerator.aps.GCMReceiver: android.os.FileUriExposedException: file:///storage/emulated/0/cocoafish/sound/com.app.cloudpushprod/test.wav exposed beyond app through Notification.sound; Titanium 7.0.0,2017/11/16 08:48,undefined\r\n[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start receiver com.appcelerator.aps.GCMReceiver: android.os.FileUriExposedException: file:///storage/emulated/0/cocoafish/sound/com.app.cloudpushprod/test.wav exposed beyond app through Notification.sound\r\n[ERROR] : TiApplication: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3047)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.-wrap18(ActivityThread.java)\r\n[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1561)\r\n[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)\r\n[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:154)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:6119)\r\n[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)\r\n[ERROR] : TiApplication: Caused by: android.os.FileUriExposedException: file:///storage/emulated/0/cocoafish/sound/com.app.cloudpushprod/test.wav exposed beyond app through Notification.sound\r\n[ERROR] : TiApplication: at android.os.StrictMode.onFileUriExposed(StrictMode.java:1799)\r\n[ERROR] : TiApplication: at android.net.Uri.checkFileUriExposed(Uri.java:2346)\r\n[ERROR] : TiApplication: at android.app.NotificationManager.notifyAsUser(NotificationManager.java:300)\r\n[ERROR] : TiApplication: at android.app.NotificationManager.notify(NotificationManager.java:284)\r\n[ERROR] : TiApplication: at android.app.NotificationManager.notify(NotificationManager.java:268)\r\n[ERROR] : TiApplication: at com.appcelerator.aps.APSCloudPush.showTrayNotification(APSCloudPush.java:492)\r\n[ERROR] : TiApplication: at com.appcelerator.aps.APSCloudPush.receivePayload(APSCloudPush.java:255)\r\n[ERROR] : TiApplication: at com.appcelerator.aps.GCMReceiver.onReceive(GCMReceiver.java:30)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3040)\r\n[ERROR] : TiApplication: ... 8 more\r\n{code}\r\n\r\nReopening.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-16T23:41:46.000+0000", "updated": "2017-11-16T23:42:44.000+0000" }, { "id": "430934", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "cloudpush: https://github.com/appcelerator-modules/cloudpush/pull/34\r\naps: https://github.com/appcelerator/aps_sdk/pull/306", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-17T18:48:33.000+0000", "updated": "2017-11-17T18:48:33.000+0000" }, { "id": "430938", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR's merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-17T19:29:24.000+0000", "updated": "2017-11-17T19:29:24.000+0000" }, { "id": "430939", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fix is verified in Cloudpush 5.0.0.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-17T19:30:07.000+0000", "updated": "2017-11-17T19:30:07.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }