{ "id": "170793", "key": "MOD-2387", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10034", "key": "MOD", "name": "Appcelerator Modules", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-08-14T22:32:49.000+0000", "created": "2018-01-15T13:01:30.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [ { "id": "56570", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "171664", "key": "MOD-2429", "fields": { "summary": "Arrow Push Custom Notification Sounds for Android 8+ Not Found", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2018-08-14T22:32:49.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "Steps : \r\n1. Create a new project and copy ti.cloud sample app\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : '#ccc',\r\n\ttitle : 'Android Cloud Push Notification'\r\n});\r\n\r\nvar CloudPush = require('ti.cloudpush');\r\nCloudPush.debug = true;\r\nCloudPush.enabled = true;\r\nCloudPush.showTrayNotificationsWhenFocused = true;\r\nCloudPush.showTrayNotification = true;\r\nCloudPush.focusAppOnPush = false;\r\n\r\nvar deviceToken = null;\r\nvar Cloud = require('ti.cloud');\r\nCloud.debug = true;\r\n\r\nvar submit = Ti.UI.createButton({\r\n\ttitle : 'Register For Push Notification',\r\n\tcolor : '#000',\r\n\theight : 60,\r\n\twidth : 200,\r\n\ttop : 100,\r\n});\r\n\r\nwin.add(submit);\r\n\r\nsubmit.addEventListener('click', function(e) {\r\n\tloginDefault();\r\n});\r\n\r\nvar submit1 = Ti.UI.createButton({\r\n\ttitle : 'Subscribe Device',\r\n\tcolor : '#000',\r\n\theight : 60,\r\n\twidth : 200,\r\n\ttop : 200,\r\n});\r\n\r\nwin.add(submit1);\r\n\r\nsubmit1.addEventListener('click', function(e) {\r\n\tdefaultSubscribe();\r\n});\r\n\r\nCloudPush.retrieveDeviceToken({\r\n\tsuccess : deviceTokenSuccess,\r\n\terror : deviceTokenError\r\n});\r\n\r\nfunction deviceTokenSuccess(e) {\r\n\tdeviceToken = e.deviceToken;\r\n}\r\n\r\nfunction deviceTokenError(e) {\r\n\talert('Failed to register for push notifications! ' + e.error);\r\n}\r\n\r\nCloudPush.addEventListener('callback', function(evt) {\r\n\talert(\"Notification received: \" + evt.payload);\r\n});\r\n\r\nCloudPush.addEventListener('trayClickLaunchedApp', function(evt) {\r\n\tTi.API.info('Tray Click Launched App (app was not running)');\r\n});\r\n\r\nCloudPush.addEventListener('trayClickFocusedApp', function(evt) {\r\n\tTi.API.info('Tray Click Focused App (app was already running)');\r\n});\r\n\r\nfunction loginDefault(e) {\r\n\tCloud.Users.login({\r\n\t\tlogin : 'xyz',\r\n\t\tpassword : '123456'\r\n\t}, function(e) {\r\n\t\tif (e.success) {\r\n\t\t\talert(\"Successfully Loged In\");\r\n\t\t} else {\r\n\t\t\talert('Error: ' + ((e.error && e.message) || JSON.stringify(e)));\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction defaultSubscribe() {\r\n\tCloud.PushNotifications.subscribe({\r\n\t\tchannel : 'alert',\r\n\t\tdevice_token : deviceToken,\r\n\t\ttype : 'android'\r\n\t}, function(e) {\r\n\t\tif (e.success) {\r\n\t\t\talert('Device Subscribed!');\r\n\t\t} else {\r\n\t\t\talert('Error:' + ((e.error && e.message) || JSON.stringify(e)));\r\n\t\t}\r\n\t});\r\n}\r\n\r\nwin.open();\r\n{code}\r\n2. Create the folder /Resources/sound directory.\r\n3. Place the sound file(gsl) in the /Resources/sound directory.\r\n4. Build your project and send custom sound from dashboard.\r\n5. You will get default sound and get following error.\r\n6. Custom sound not played \r\n{code}\r\n[INFO] : APSCloudPush: queuePayload: {\"android\":{\"sound\":\"gsl\",\"alert\":\"s check \",\"vibrate\":true},\"content-available\":1,\"priority\":\"high\"}\r\n[INFO] : APSCloudPush: showTrayNotification\r\n[WARN] : W/System.err: java.io.FileNotFoundException: Resources/sound/gsl\r\n[WARN] : W/System.err: \tat android.content.res.AssetManager.openAssetFd(Native Method)\r\n[WARN] : W/System.err: \tat android.content.res.AssetManager.openFd(AssetManager.java:352)\r\n[WARN] : W/System.err: \tat com.appcelerator.aps.APSCloudPush.getAndTransferFile(APSCloudPush.java:526)\r\n[WARN] : W/System.err: \tat com.appcelerator.aps.APSCloudPush.showTrayNotification(APSCloudPush.java:441)\r\n[WARN] : W/System.err: \tat com.appcelerator.aps.APSCloudPush.receivePayload(APSCloudPush.java:267)\r\n[WARN] : W/System.err: \tat com.appcelerator.aps.GCMReceiver.onReceive(GCMReceiver.java:30)\r\n[WARN] : W/System.err: \tat android.app.ActivityThread.handleReceiver(ActivityThread.java:2835)\r\n[WARN] : W/System.err: \tat android.app.ActivityThread.access$1800(ActivityThread.java:150)\r\n[WARN] : W/System.err: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1489)\r\n[WARN] : W/System.err: \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n[WARN] : W/System.err: \tat android.os.Looper.loop(Looper.java:168)\r\n[WARN] : W/System.err: \tat android.app.ActivityThread.main(ActivityThread.java:5885)\r\n[WARN] : W/System.err: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)\r\n[INFO] : APSCloudPush: getTrayPendingIntent\r\n[INFO] : APSCloudPush: getFocusIntent payload: {\"android\":{\"sound\":\"gsl\",\"alert\":\"s check \",\"vibrate\":true},\"content-available\":1,\"priority\":\"high\"}\r\n[INFO] : APSCloudPush: processCallbackIfInstantiated payload: {\"android\":{\"sound\":\"gsl\",\"alert\":\"s check \",\"vibrate\":true},\"content-available\":1,\"priority\":\"high\"}\r\n[INFO] : APSCloudPush: processQueuedCallback\r\n{code}\r\n\r\nTest Environment:\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.0.14\r\nTitanium SDK\r\n SDK Version = 7.0.0.GA\r\n{code}\r\n", "attachment": [ { "id": "63962", "filename": "gsl.wav", "author": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "created": "2018-01-15T12:56:43.000+0000", "size": 2196, "mimeType": "audio/wav" } ], "flagged": false, "summary": "Android cloudpush : Custom sound is not played", "creator": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "subtasks": [], "reporter": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "environment": "ti.cloudpush 5.0.0 , SDK 7.0.1, android 6.0", "comment": { "comments": [ { "id": "433573", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~ybanev], Any update on this?", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-01-24T09:07:13.000+0000", "updated": "2018-01-24T09:07:13.000+0000" }, { "id": "433948", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "Module PR: https://github.com/appcelerator-modules/cloudpush/pull/37\r\nAPS PR:https://github.com/appcelerator/aps_sdk/pull/309", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2018-02-01T15:12:59.000+0000", "updated": "2018-02-01T15:12:59.000+0000" }, { "id": "437157", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "cloudpush: https://github.com/appcelerator-modules/cloudpush/pull/40", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-25T23:01:57.000+0000", "updated": "2018-04-25T23:01:57.000+0000" }, { "id": "438125", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2018-06-05T14:52:28.000+0000", "updated": "2018-06-05T14:52:28.000+0000" }, { "id": "440516", "author": { "name": "mas945846", "key": "mas945846", "displayName": "Michael Scholz", "active": true, "timeZone": "America/New_York" }, "body": "Any status/progress update on this issue?\r\n\r\n", "updateAuthor": { "name": "mas945846", "key": "mas945846", "displayName": "Michael Scholz", "active": true, "timeZone": "America/New_York" }, "created": "2018-08-06T18:43:32.000+0000", "updated": "2018-08-06T18:43:32.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }