wear better toasts
This commit is contained in:
parent
e85e651c56
commit
05d40e4af0
1 changed files with 3 additions and 3 deletions
|
@ -163,13 +163,13 @@ public class WatchUpdaterService extends WearableListenerService implements
|
||||||
|
|
||||||
if (event != null && event.getPath().equals(WEARABLE_INITIATE_ACTIONSTRING_PATH)) {
|
if (event != null && event.getPath().equals(WEARABLE_INITIATE_ACTIONSTRING_PATH)) {
|
||||||
String actionstring = new String(event.getData());
|
String actionstring = new String(event.getData());
|
||||||
ToastUtils.showToastInUiThread(this, "INITIATE: " + actionstring);
|
ToastUtils.showToastInUiThread(this, "Wear: " + actionstring);
|
||||||
ActionStringHandler.handleInitiate(actionstring);
|
ActionStringHandler.handleInitiate(actionstring);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event != null && event.getPath().equals(WEARABLE_CONFIRM_ACTIONSTRING_PATH)) {
|
if (event != null && event.getPath().equals(WEARABLE_CONFIRM_ACTIONSTRING_PATH)) {
|
||||||
String actionstring = new String(event.getData());
|
String actionstring = new String(event.getData());
|
||||||
ToastUtils.showToastInUiThread(this, "CONFIRM: " + actionstring);
|
ToastUtils.showToastInUiThread(this, "Wear Confirm: " + actionstring);
|
||||||
ActionStringHandler.handleConfirmation(actionstring);
|
ActionStringHandler.handleConfirmation(actionstring);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -488,7 +488,7 @@ public class WatchUpdaterService extends WearableListenerService implements
|
||||||
dataMapRequest.getDataMap().putString("message", message);
|
dataMapRequest.getDataMap().putString("message", message);
|
||||||
dataMapRequest.getDataMap().putString("actionstring", actionstring);
|
dataMapRequest.getDataMap().putString("actionstring", actionstring);
|
||||||
|
|
||||||
ToastUtils.showToastInUiThread(this, "SENT: " + actionstring);
|
ToastUtils.showToastInUiThread(this, "Requesting confirmation from wear: " + actionstring);
|
||||||
|
|
||||||
PutDataRequest putDataRequest = dataMapRequest.asPutDataRequest();
|
PutDataRequest putDataRequest = dataMapRequest.asPutDataRequest();
|
||||||
Wearable.DataApi.putDataItem(googleApiClient, putDataRequest);
|
Wearable.DataApi.putDataItem(googleApiClient, putDataRequest);
|
||||||
|
|
Loading…
Reference in a new issue