Skip to content
Snippets Groups Projects
Commit ca5b7f17 authored by Lennart Goedhart's avatar Lennart Goedhart
Browse files

Use @jamorham’s `wakeUpIntent` for Nightscout upload.

parent fb3bd0bf
No related branches found
No related tags found
No related merge requests found
......@@ -310,11 +310,10 @@ public class MedtronicCnlIntentService extends IntentService {
}
private void uploadToNightscout() {
AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
Intent receiverIntent = new Intent(this, NightscoutUploadReceiver.class);
final long timestamp = System.currentTimeMillis() + 1000L;
PendingIntent pendingIntent = PendingIntent.getBroadcast(this, (int)timestamp, receiverIntent, PendingIntent.FLAG_ONE_SHOT);
alarmManager.set(AlarmManager.RTC_WAKEUP, timestamp, pendingIntent);
final PendingIntent pendingIntent = PendingIntent.getBroadcast(this, (int)timestamp, receiverIntent, PendingIntent.FLAG_ONE_SHOT);
wakeUpIntent(getApplicationContext(), timestamp, pendingIntent);
}
private boolean hasUsbHostFeature() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment