Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to cancel alarmmanager from a service?

$
0
0

Hi,

I have an alarm manager running every minute which calls a Service.

From within that service I'm checking how long the alarm manager has been running for. If longer than 5 minutes I want to kill the alarmmanager.

I found examples that said you need to recreate it as you did originally then call alarmmanager.cancel BUT my problem is I can't get the context that I used to create it because I'm not running in the main app it's running from a service.

I hope that makes sense because to be honest I'm not 100% up to speed with exactly how all this is working I just know that so far the alarm manager works.

Any ideas?

Kind regards, Le-roy


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>