Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AlarmManager am=(AlarmManager)getSystemService(Context.ALARM_SERVICE);
- Intent intent = new Intent(Display.this, TwoAlarmService.class);
- PendingIntent pi = PendingIntent.getBroadcast(Display.this, AlarmNumber, intent, PendingIntent.FLAG_CANCEL_CURRENT);
- am.cancel(pi);
- NotificationManager notificationManager = (NotificationManager) getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);
- notificationManager.cancel(NOTIFICATION_ID);
- notificationManager.cancelAll();
- String ns = NOTIFICATION_SERVICE;
- NotificationManager nMgr = (NotificationManager) getActivity().getApplicationContext().getSystemService(ns);
- nMgr.cancel(NOTIFICATION_ID);
- }
Add Comment
Please, Sign In to add comment