Thursday, April 14, 2016

Why would .DataApi.addListener(… , this) only get called by Mobile & not Wear?

.onConnected() never seems to be reached by my [Wear - MainActivity] regardless of how it gets called.

I can see the S.O.P. for the .onConnected() for the [Mobile - MainActivity] as well as the S.O.P. where:

Code:

    DataMap map = putDataMapReq.getDataMap();
    map.putStringArrayList(WEAR_MESSAGE_PATH, actsList);
    System.out.println("[mobile] - StringArray /hopefully/ put");
    map.putLong(TIME_MESSAGE_PATH, System.currentTimeMillis());
    System.out.println("[mobile] - Timestamp /hopefully/ put")

gets called, but when I try running:

Code:

    System.out.println(putDataReq);
I get a reply with:

Code:

    PutDataRequest[dataSz=247, numAssets=0, uri=wear:/wristaroo, syncDeadline=1800000]
So am I not adding a listener to my mGoogleApiClient correctly --? I tried implementing a WearableListenerService [which is shown on my GitHub] but I don't know how to add it to mGoogleApiClient and then get the corresponding data form the Message....

Really I'm trying to figure out what the best way to send the ArrayList<> to the wear and then have the data persist would be...?

Any input would be greatly appreciated!


from xda-developers http://ift.tt/1VYWW4A
via IFTTT

No comments:

Post a Comment