开发者

Android cancel all alarmmanager

开发者 https://www.devze.com 2023-03-31 07:57 出处:网络
I\'ve question with cancel() in AlarmManager when I set alarm I use AlarmManger, this my code StringBuilder q = new StringBuilder()

I've question with cancel() in AlarmManager

when I set alarm I use AlarmManger, this my code

        StringBuilder q = new StringBuilder()
        .append(time).append(".")
        .append(day);
        String action = q.toString();

        Intent AlarmIntent = new Intent(Edit_Contract.this, ReceiverContract.class);
        AlarmIntent.setAction(action);
        AlarmManager AlmMgr = (AlarmManager)getSystemService(ALARM_SERVICE);

        PendingIntent Sender = PendingIntent.getBroadcast(Edit_Contract.this, 开发者_Go百科0, AlarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);

and then,I want to cancel all alarm which I set,what should I do


Are you sure you sure you did the research on the nose? Here's what i found during 2 minutes of looking: Android: Get all PendingIntents set with AlarmManager

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号