{ "id": "77756", "key": "TIMOB-4651", "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": "2012-03-07T22:04:05.000+0000", "created": "2011-07-13T09:46:28.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "11367", "description": "", "name": "Release 1.7.1", "archived": true, "released": true, "releaseDate": "2011-06-21" } ], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:46:30.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": "If you create a notification without an 'icon' property it works fine. If you add the icon property with a path to an image you get this error. \r\n\r\nW/TiNotification( 1099): (kroll$1: app://app.js) [1908,5174] No image found for KS_nav_ui.png\r\n\r\nTiDocs say: the URL must be an image located in Resources/android/images/\r\nTested putting the image in there and in the density specific folders, but got the same error\r\n\r\nStep 1: put an image named KS_nav_ui.png in Resources/android/images/\r\nStep 2: run the code below\r\nStep 3: tap the \"Add Notification\" button\r\nStep 4: notice that no notification shows up and the above error is in the console log\r\nStep 5: remove the icon property and see the notification show up.\r\n\r\n{code:title=\"app.js\"}\r\nvar win= Titanium.UI.createWindow();\r\nvar btn = Ti.UI.createButton({\r\n title: 'Add Notification'\r\n});\r\n\r\nbtn.addEventListener('click', function(e) {\r\n\r\n var activity = Ti.Android.currentActivity();\r\n var intent = Ti.Android.createIntent({\r\n });\r\n\r\n var pending = Ti.Android.createPendingIntent({ \r\n 'activity' : activity,\r\n 'intent' : intent,\r\n 'type' : Ti.Android.PENDING_INTENT_FOR_ACTIVITY,\r\n 'flags' : 1073741824\r\n });\r\n\r\n var ts = new Date().getTime();\r\n\r\n var notification = Ti.Android.createNotification({\r\n contentIntent : pending,\r\n contentTitle : 'Test',\r\n contentText : 'test',\r\n when : ts,\r\n icon: 'KS_nav_ui.png'\r\n });\r\n\r\n Ti.Android.NotificationManager.notify(1, notification); \r\n});\r\nwin.add(btn);\r\n\r\n// testing if the image exist\r\nvar lbl = Titanium.UI.createLabel({\r\n text : ' ',\r\n backgroundImage: 'KS_nav_ui.png',\r\n top : 10,\r\n left: 10\r\n});\r\nwin.add(lbl);\r\nwin.open();\r\n{code}\r\n\r\nh3. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-634959", "attachment": [], "flagged": false, "summary": "Android: if you add an icon to a notification the image is not found and notification is not displayed", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 1.7.1\r\nAndroid Emulator 2.3.1", "comment": { "comments": [ { "id": "166983", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Confirmed working\r\nExample using appicon.png\r\nYou can put your image in /platform/android/res/drawable/\r\nThen reference it using Ti.App.Android.R.drawable.appicon\r\n\r\n{code}\r\nvar notification = Ti.Android.createNotification({\r\n contentIntent : pending,\r\n contentTitle : 'Test',\r\n contentText : 'test',\r\n when : ts,\r\n icon: Ti.App.Android.R.drawable.appicon\r\n });\r\n{code}", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-26T12:03:05.000+0000", "updated": "2011-09-26T12:03:05.000+0000" }, { "id": "185467", "author": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thought this code was broken. Finally figured out how the documentation was broken. ", "updateAuthor": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-07T18:07:51.000+0000", "updated": "2012-03-07T18:07:51.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }