Skip to content

Instantly share code, notes, and snippets.

@dawsontoth
Created March 4, 2011 22:33
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save dawsontoth/855834 to your computer and use it in GitHub Desktop.
Save dawsontoth/855834 to your computer and use it in GitHub Desktop.
Notifications in Android using Titanium Appcelerator Mobile
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'
})
})
}));
@sangee
Copy link

sangee commented Mar 28, 2013

hi
Exactly it is working but in this how you will set the particular time to display notification.

@theamith
Copy link

to display notification daily at particular time refer this gist

https://gist.github.com/itsamiths/6248106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment