¡@

Home 

2014/10/16 ¤W¤È 08:20:35

android Programming Glossary: notificationactivity

Notification to restore a task rather than a specific activity?

http://stackoverflow.com/questions/6575730/notification-to-restore-a-task-rather-than-a-specific-activity

improve this question What you need is just a simple Activity that does nothing. Here is an example public class NotificationActivity extends Activity @Override protected void onCreate Bundle savedInstanceState super.onCreate savedInstanceState Now finish.. explicitly set android taskAffinity . When the user selects this notification if your application is running then the NotificationActivity will be started on top of the topmost activity in your application's task and that task will be brought to the foreground... on top of the topmost activity in your application's task and that task will be brought to the foreground. When the NotificationActivity finishes it will simply return the user to the topmost activity in your application ie wherever the user left it when it..

Notification passes old Intent Extras

http://stackoverflow.com/questions/7370324/notification-passes-old-intent-extras

CharSequence contentTitle Title CharSequence contentText Text Intent notificationIntent new Intent context NotificationActivity.class notificationIntent.putExtra Global.INTENT_EXTRA_FOO_ID foo_id PendingIntent contentIntent PendingIntent.getActivity.. 1 mNotificationManager.notify mynotification_id notification When I click on the notification it opens the NotificationActivity and inside the Activity i can retrieve the foo_id from the Intent Bundle e.g. 1 However if another notification is triggered..