0
나는에 Notification
을 만드는 오전 나는 TimerTask
을 가지고 있고 내가 필요 Activity
때 활성 그와 나는 Click on it
, 그것은이 페이지에서 해당 페이지 (text.class
)에서 저를 반환 (예를 text.class
용) 때 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);