Questions tagged [android-wear-data-api]

The Wearable Data Layer API, which is part of Google Play services, provides a communication channel for your handheld and wearable devices.

About

The API consists of a set of data objects that the system can send and synchronize over the wire and listeners that notify your apps of important events with the data layer.

Dependencies

  • Android 4.3 (API Level 18) or higher on the handheld device
  • Android 4.4W (API Level 20) or higher on the Android Wear device
  • Google Play services version 5.0 or higher
  • An Android Wear device or Wear AVD

Links

278 questions
16
votes
4 answers

Unable to push data to android wear (Emulator)

I have been trying to push data to the android wear emulator. But all in vain. My listener on the emulator is not receiving any calls whatsoever. If anyone else has tried working on wear and pushing data to wear please HELP. This is what my receiver…
iZBasit
  • 1,293
  • 1
  • 14
  • 29
15
votes
1 answer

What is the Uri for Wearable.DataApi.getDataItem() after using PutDataMapRequest?

I'm testing the Wearable Data Layer Api as described in the Android tutorial. There is a low level API based around DataItem, which can have only a byte array as payload, so the training recommends using PutDataMapRequest, which seems to be…
matiash
  • 52,725
  • 16
  • 117
  • 149
12
votes
1 answer

Can I send custom objects to Android Wear?

I am just learning how to develop for Android Wear, I have created a full screen Activity for Smart Watches and in my mobile part of the application I get some JSON data and create a list of custom objects from this. On my mobile app I show the…
Donal Rafferty
  • 19,239
  • 37
  • 110
  • 186
11
votes
1 answer

Send message from wearable to phone and then immediately reply

I've been battling with the Android Wear Message API all day today and have finally accepted I need some help with this. My app is very straightforward. The Mobile portion consists of a MainActivity (which does nothing but display "Hello world" and…
Aaron Hastings
  • 327
  • 2
  • 8
11
votes
4 answers

Wearable.NodeApi.getConnectedNodes result never called

i developing an app for android wear. Below code with explanation of the problem if(mGoogleApiClient.isConnected()){ K.i("Always called!"); Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).setResultCallback(new…
dooplaye
  • 1,003
  • 12
  • 26
11
votes
1 answer

How to use DataItem of Android Wear

I want to sync preference between handhelds and wearables. I implement sample code on handheld app. PutDataMapRequest dataMap = PutDataMapRequest.create("/count"); dataMap.getDataMap().putInt(COUNT_KEY, count++); PutDataRequest request =…
lamrongol
  • 252
  • 2
  • 12
8
votes
0 answers

Android Wear WearableListenerService doesn't trigger on Android 8 Oreo when app closed

I have a WearableListenerService on a phone app that receives a DataItem from the watch (in onDataChanged). The code is essentially the same you have on the documentation (I can put it here if useful). When a new DataItem is received, I show a…
Albert Vila Calvo
  • 12,993
  • 4
  • 53
  • 63
8
votes
1 answer

Build error Bind_Listener is deprecated

When I try to build my apk, it gives me error saying Error:(190) Error: The com.google.android.gms.wearable.BIND_LISTENER action is deprecated. This is my AndroidManifest looks right now
Shamas S
  • 7,237
  • 8
  • 44
  • 58
7
votes
2 answers

Wearable MessageAPI onMessageReceived never hit, different devices id's

Trying to send a message from an emulated mobile device to an emulated wear device. I'm able to pair the wear device through the Android Wear app and verify that onPeerConnected of the wear device is hit (onMessageReceived isn't). Using two code…
Kris B
  • 3,458
  • 9
  • 59
  • 102
7
votes
1 answer

WearListenerService onDataChanged strange behavior

I want to make bidirectional data transfer between Android Wear and Handheld. All seems to be good except triggering onDataChanged on Handheld. It triggers only then I plug in\out USB cable, connected to the PC. So I don't understand why it's…
Sergey Grabak
  • 183
  • 1
  • 11
6
votes
1 answer

OnCapabilityChanged working on phone but not on wearable

After carefully following the instructions in this post: How to detect when android wear device gets disconnected? I finally managed to get my phone to detect when the wearable is connected using onCapabilityChanged. I have followed the exact same…
HPage
  • 1,254
  • 15
  • 26
6
votes
3 answers

WearableListenerService onMessageReceived is not called on device

I am trying to send a simple message from my Android wear app to my phone app using the Wearable.MessageApi. This is my onConnected callback from GoogleApiClient on the Wear device. final PendingResult status =…
Jin
  • 5,690
  • 2
  • 34
  • 70
6
votes
6 answers

Android Wear sending data to Android phone, but phone appears to never receive it

Short Summary: I am attempting to send data from an Android Wear watch to an Android phone using PutDataRequest and GoogleApiClient. Logs seem to show the data is sent successfully, but onDataChanged never fires. I am using Android Studio 1.0.2. I…
eb80
  • 4,334
  • 5
  • 22
  • 29
6
votes
2 answers

Read underlying color/light data from Android Wear heart rate sensor?

I'd like to read the heart rate sensor data on an Android Wear smartwatch. The documentation makes it seem like the heart rate sensor only reports two things: Heart rate (in beats per minute) Either an accuracy measure or an error code Is it…
Josh
  • 2,109
  • 20
  • 20
6
votes
1 answer

Sending data from an Activity to WearableListenerService

When I read about communication between an Activity and Service, I found that we can use either IBinder Messenger AIDL I am interested in the first two. So when I tried implementing this to communicate between an Activity and…
BlackCursor
  • 1,454
  • 1
  • 17
  • 29
1
2 3
18 19