wear bolusprogress cleanup

This commit is contained in:
AdrianLxM 2017-02-07 12:08:13 +01:00
parent e261fa3ec8
commit 20d32d042f
2 changed files with 0 additions and 7 deletions

View file

@ -155,15 +155,11 @@ public class WearPlugin implements PluginBase {
@Subscribe
public void onStatusEvent(final EventBolusRequested ev) {
ToastUtils.showToastInUiThread(ctx, "EventBolusRequested !!!");
String status = String.format(MainApp.sResources.getString(R.string.bolusrequested), ev.getAmount());
Intent intent = new Intent(ctx, WatchUpdaterService.class).setAction(WatchUpdaterService.ACTION_SEND_BOLUSPROGRESS);
intent.putExtra("progresspercent", 0);
intent.putExtra("progressstatus", status);
ToastUtils.showToastInUiThread(ctx, "before startService");
ctx.startService(intent);
ToastUtils.showToastInUiThread(ctx, "after startService");
}

View file

@ -132,7 +132,6 @@ public class ListenerService extends WearableListenerService implements GoogleAp
googleApiConnect();
cancelBolus();
}
//TODO: add action to cancel bolus
return START_STICKY;
}
@ -202,11 +201,9 @@ public class ListenerService extends WearableListenerService implements GoogleAp
.setVibrate(vibratePattern)
.addAction(R.drawable.ic_cancel, "CANCEL BOLUS", cancelPendingIntent);
// Get an instance of the NotificationManager service
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
// Build the notification and issues it with notification manager.
notificationManager.notify(NOTIFICATION_ID, notificationBuilder.build());
if (progresspercent == 100){