Created
March 4, 2011 22:33
-
-
Save dawsontoth/855834 to your computer and use it in GitHub Desktop.
Notifications in Android using Titanium Appcelerator Mobile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); | |
win.add(Ti.UI.createLabel({ text: 'Look for the notification! It should be there now.' })); | |
win.open(); | |
Titanium.Android.NotificationManager.notify( | |
0, // <-- this is an ID that we can use to clear the notification later | |
Ti.Android.createNotification({ | |
contentTitle: 'Cheese, Gromit!', | |
contentText: 'Swiss', | |
tickerText: 'Our app made a notification!', | |
contentIntent: Titanium.Android.createPendingIntent({ | |
intent: Titanium.Android.createIntent({ | |
url: 'app.js' | |
}) | |
}) | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to display notification daily at particular time refer this gist
https://gist.github.com/itsamiths/6248106