public void onConnected(Bundle bundle) { refreshList(); // subscribe to updates to the data model Wearable.DataApi.addListener(googleApiClient, dataListener); } @Override public void onConnectionSuspended(int i) { //NOOP } }; private DataApi.DataListener dataListener = new DataApi.DataListener() { @Override public void onDataChanged(DataEventBuffer dataEventBuffer) { refreshList(); } };
public void onConnected(Bundle bundle) { refreshList(); // subscribe to updates to the data model Wearable.DataApi.addListener(googleApiClient, dataListener); } @Override public void onConnectionSuspended(int i) { //NOOP } }; private DataApi.DataListener dataListener = new DataApi.DataListener() { @Override public void onDataChanged(DataEventBuffer dataEventBuffer) { refreshList(); } };