I'm encountering a very weird scenario. I implemented both WearableListenerService
and Wearable.DataApi.addListener
on my wear device, and I am periodically sending data updates from my phone. The WearableListenerService
is properly getting onDataChanged
callbacks, but my listener in the main activity isn't..
This is my setup for the activity:
onStart() {
super.onStart();
googleApiClient.connect();
}
onStop() {
googleApiClient.disconnect();
Wearable.DataApi.removeListener(googleApiClient, this);
super.onStop();
}
onConnected() {
Wearable.DataApi.addListener(googleApiClient, this);
}
onDataChanged() {
// never gets called
}
I can post more code, but above is the general gist. On the other hand, my WearableListenerService
is properly declared in the AndroidManifest
, and simply prints out logs when it receives onDataChanged
.
Is there anything obvious I'm missing here?