Created
April 25, 2009 23:33
-
-
Save prasincs/101802 to your computer and use it in GitHub Desktop.
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
// Android notification that cancels automatically when user clicks | |
Notification notification = new Notification(R.drawable.icon, "Posit", | |
System.currentTimeMillis()); | |
Intent intent = new Intent(MAIN_ACTIVITY,SyncService.class); | |
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0); | |
notification.setLatestEventInfo(MAIN_ACTIVITY, "Service started", "POSIT service started", pendingIntent); | |
notification.flags = Notification.FLAG_AUTO_CANCEL; | |
mNotificationManager.notify(R.string.addLabel, notification); |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment