{ "id": "150638", "key": "TIMOB-19397", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2015-09-07T07:48:39.000+0000", "created": "2015-08-24T02:32:19.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" }, { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2017-03-17T18:02:32.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": "h6.Problem Reproduce:\r\n1. Simple run the following code in a default app. (Register for token and subscribe to a channel)\r\n{code}\r\nvar CloudPush = require('ti.cloudpush'); \r\nvar Cloud = require('ti.cloud');\r\n\r\nCloudPush.retrieveDeviceToken({\r\n\tsuccess: function deviceTokenSuccess(e) {\r\n\t\talert('Device Token: ' + e.deviceToken);\r\n \t\t\r\n \t\tCloud.PushNotifications.subscribeToken({\r\n \t\t\tdevice_token: e.deviceToken,\r\n \t\t\tchannel: 'alert',\r\n \t\t\ttype: 'android'\r\n\t\t\t}, function (e) {\r\n \t\t\tif (e.success) {\r\n \t\t\talert('Success');\r\n \t\t\t} else {\r\n \t\t\tconsole.log('Error:\\n' +\r\n \t\t\t((e.error && e.message) || JSON.stringify(e)));\r\n \t\t\t}\r\n\t\t\t});\r\n },\r\n error: function deviceTokenError(e) {\r\n alert('Failed to register for push! ' + e.error);\r\n }\r\n});\r\n\r\nCloudPush.addEventListener('callback', function (evt) {\r\n alert(evt.payload);\r\n});\r\n{code}\r\n2. Send a simple notification from dashboard, with badge: \"+2\".\r\n3. Received the notification from device successfully.\r\n\r\nh6.Expect:\r\nThe App icon should show badge 2.\r\n\r\nh6.Actual:\r\nThe App icon did not change at all.\r\n\r\nh6.Note:\r\nPrint the payload from device is like following:\r\n{code}\r\n{\"android\":{\"sound\":\"none\",\"alert\":\"test\",\"vibrate\":false,\"badge\":2}}\r\n{code}\r\nSeems the badge is delivered to device successfully, but the mobile did no handle it well, ", "attachment": [ { "id": "56646", "filename": "nexusbadge.png", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-07T07:13:04.000+0000", "size": 4765712, "mimeType": "image/png" }, { "id": "56645", "filename": "nexusbadge2.png", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-07T07:13:04.000+0000", "size": 316721, "mimeType": "image/png" }, { "id": "56644", "filename": "samsungbadge.png", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-07T07:13:05.000+0000", "size": 184231, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Push Notification Badge Number do not reflect to App icon", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": "Android 4.2.2\r\nTi SDK 4.1.0 and 4.0.0\r\nTi CloudPush Module 3.3.8 and 3.3.7", "closedSprints": [ { "id": 481, "state": "closed", "name": "2015 Sprint 18 SDK", "startDate": "2015-08-29T00:30:25.440Z", "endDate": "2015-09-12T00:30:00.000Z", "completeDate": "2015-09-14T05:24:05.135Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "362410", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Documentation on Badge: [http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications]\r\n\r\nAccording to the documentation, on android: `On Android, the badge number is displayed in the notification center, while on iOS, the badge number is displayed with the application icon.`\r\n\r\nIt is not suppose to reflect on the app icon. Instead, it is shown in the notification center. I'm attaching a few images to show where the badge is reflected in the notification for android. [^nexusbadge.png][^nexusbadge2.png][^samsungbadge.png]\r\n\r\nIn this case, I had a badge number of 10 and I added +1 in the dashboard for push. This caused it to update to 11.\r\n\r\nThis is the intended way it is working. Therefore this is not a bug.\r\n\r\n[~sliang] I will resolve this as an invalid bug.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-07T07:15:44.000+0000", "updated": "2015-09-07T07:15:44.000+0000" }, { "id": "413515", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-17T18:02:32.000+0000", "updated": "2017-03-17T18:02:32.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }