{ "id": "64179", "key": "TIMOB-3547", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-02-19T11:20:20.000+0000", "created": "2011-04-15T03:46:31.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "feature", "notifications", "rplist" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-02-19T11:20:20.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": "{html}

Feature

\n

Add support for custom views on the notifications created with\nTi.Android.createNotification. I believe the term for this is\n\"remote views\", something I have also heard of in connection with\nwidgets.

\n

Possible Usage

\n

The following is an idea for how this could be used in an\napp.js:

\n
\nvar win = Ti.UI.createWindow({ backgroundColor: '#fff' });\nwin.add(Ti.UI.createLabel({ text: 'Look for the notification! It should be there now.' }));\nwin.open();\n\nvar customView = Ti.UI.createView({ backgroundColor: '#fff' });\ncustomView.add(Ti.UI.createImageView({\n    image: 'http://www.innocentenglish.com/wp/wp-content/uploads/2008/01/cats-kitten-sink.jpg',\n    width: 70, height: 40,\n    left: 20\n}));\ncustomView.add(Ti.UI.createLabel({\n    text: 'Want code samples? Check out the kitten sink!',\n    width: 200, height: 40,\n    left: 100\n}));\n\nTi.Android.NotificationManager.notify(\n        0, // <-- this is an ID that we can use to clear the notification later\n        Ti.Android.createNotification({\n            contentView: customView,\n            tickerText: 'Want to learn to program?',\n            contentIntent: Ti.Android.createPendingIntent({\n                intent: Ti.Android.createIntent({\n                    url: 'app.js'\n                })\n            })\n        }));\n
\n

Associated Helpdesk Ticket

\n

http://support.appcelerator.com/tickets/MFU-89832-897

{html}", "attachment": [], "flagged": false, "summary": "Android: Support Notifications with Custom Views", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }