Stopping Alarm Android Application

后端 未结 2 589
别那么骄傲
别那么骄傲 2021-01-28 18:40

Can anyone tell me how can I stop this alarm?

I\'m trying to stop it by using a handler but it didn\'t stop it continues to repeat?

Here\'s my code:

//==

2条回答
  •  遇见更好的自我
    2021-01-28 18:54

    Hi you can use the following command passing your pending intent:

    am.cancel(yourPendingIntent);
    

    I have written a good tutorial on AlarmManager some months ago that you can find at this link

提交回复
热议问题