Created
January 17, 2018 13:51
-
-
Save sathyapriya31/7145823ba76015c345edf3961a61bf36 to your computer and use it in GitHub Desktop.
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
Intent monitorIntent = new Intent(this, BatteryLevelReceiver.class); | |
PendingIntent pendingIntent = PendingIntent.getBroadcast(this.getApplicationContext(), PI_REQUEST_CODE, monitorIntent, 0); | |
AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE); | |
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, Calendar.getInstance().get(Calendar.MILLISECOND), pref_BatteryUpdatePeriod, pendingIntent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment