0
我创造了一个Notification
Activity
(例如text.class
),当主动说和我Click on it
,还给我在页面(text.class
)在此页面中我有一个TimerTask
,我需要的是,当Click on that Notification Reset page
或Finish() the TimerTask
。点击通知,然后完成TimerTask?
我该怎么做?
我以为当我click on notification
reset page
和finish TimerTask
。
这是我Notification
:
NotificationManager nman;
nman=(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Long when=System.currentTimeMillis();
Notification n;
n=new Notification(R.drawable.chat_logo,"",when);
Context context=getApplicationContext();
String Title=G.context.getResources().getString(R.string.StatusM);
String Text=G.context.getResources().getString(R.string.Statusms);
Intent notifintent=new Intent(context,ConversationPage.class);
PendingIntent pending;
pending=PendingIntent.getActivity(context,0,notifintent,android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
n.setLatestEventInfo(context, Title, Text, pending);
n.flags = Notification.FLAG_AUTO_CANCEL;
nman.notify(0,n);