1

Here is a big problem that i simply don't know whats going on... I have an app that stores Data in data API. The mobile app is aroudn the play store for some time and I decided to make a app for wearable.

My problem is: when the user install the wearable app for the first time (via Google Play), it need to load the data from the DataApi. But it simple returns 0 itens!

DataItemBuffer dataItems = Wearable.DataApi.getDataItems(mGoogleApiClient).await();

Observations:

  • GoogleApiClient IS CONNECTED
  • The Wearable receives the onDataChanged from WearableListenerService and this part is working fine.
  • I've already tested with .setResultCallback but results still the same.
  • I have two copmuter for developments, one is one my work and another is on my home.
  • In my tests, I DELETE the emulator and create a new one, to simulate a "new device beeing connected for the first time".

DataAPI says that the data is synchronzed to all devices but is seems not be working like that. How to solves this? Any workaround? SOMEONE HELP =(

Dita Aji Pratama
  • 710
  • 1
  • 12
  • 28
Daniel Oliveira
  • 8,053
  • 11
  • 40
  • 76

1 Answers1

1

It seems i found the solution for this problem. As I mentioned i have two computers for development, so, 2 development keys.

My mobile app was installed using the "A" computer's key and the wearable was using the "B" one. So, to solve this problem, when start developing always remember to re-run the mobile and wearable app from the same computer to your devices.

Daniel Oliveira
  • 8,053
  • 11
  • 40
  • 76
  • What I do usually is that I put the same (debug) key on all my machines so I don't have to worry about mismatched keys – Ali Naddaf Oct 31 '15 at 17:52