Created
August 20, 2012 21:22
-
-
Save NetworksAreMadeOfString/3408033 to your computer and use it in GitHub Desktop.
Scheduled intent via Alarm Manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE); | |
Intent Poller = new Intent(this, ZenossPoller.class); | |
PendingIntent Monitoring = PendingIntent.getService(this, 0, Poller, PendingIntent.FLAG_UPDATE_CURRENT); | |
am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, 0, Long.parseLong(settings.getString("BackgroundServiceDelay", "60")) * 1000, Monitoring); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment