wear bolusprogress cleanup
This commit is contained in:
parent
e261fa3ec8
commit
20d32d042f
|
@ -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");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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){
|
||||
|
|
Loading…
Reference in a new issue