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

288 questions
6
votes
2 answers

Using existing database in Android Wear

I'm try to build a wear-app for my existing app. I already have an SQLite Database in my Handheld-App, now i want to try to use them in my wear app. Is their any possibility to send the database to the Wear or can i access the database on my…
MDXDave
  • 181
  • 1
  • 13
6
votes
3 answers

GoogleApiClient fails for Android Wear API requires update but I'm already updated

I'm trying to setup a Google Wear app, so on my mobile side, I'm trying to create a GoogleApiClient that uses the Wearable API, but I get an error saying I need to update (SERVICE_VERSION_UPDATE_REQUIRED). But my phone is already at the latest…
bryan
  • 798
  • 7
  • 18
5
votes
1 answer

'Unexpected namespace prefix "app"' in Android wear module

I added a new android wear module based on this Google doc but I am getting the error described in the title. Here is my layout.
The_Martian
  • 3,684
  • 5
  • 33
  • 61
5
votes
0 answers

Can't send message from Android Wear to host device

I'm writing a simple Android application and I need to send a message from my Wear device to my mobile phone using MessageApi. Ultimately, I want to be able to send a message from my wear to the phone for it to then send a message back with the same…
5
votes
0 answers

Android Wear: ChannelIOException: Channel closed unexpectedly before stream was finished

I am using Channel to send audio data to handheld from the wear. However, when I wrote data into the channelstream, the program sometimes was stuck at the code where I write data into the stream and threw out an exception:…
Foreverniu
  • 349
  • 1
  • 3
  • 18
5
votes
1 answer

Why does Android Wear DataMap not have a putIntArray method?

I'm curious why DataMap in the Android Wear SDK doesn't have a putIntArray method, but instead has a putIntegerArrayList method for Integers. DataMap has putByteArray, putFloatArray, putLongArray, putStringArray, but not putIntArray. What is the…
cpjolicoeur
  • 12,766
  • 7
  • 48
  • 59
5
votes
1 answer

Keeping phone and wear database synchronized

Currently i have an application that creates 2 types of models (let's call them A and B). A has a 1:N relationship with B, and right now i have a database implemented in both the handheld and the wearable to store those models. The problem is, I…
EricDS
  • 476
  • 3
  • 13
5
votes
2 answers

DataAPI much slower then MessageAPI?

I'm synchronizing events between the wearable and the smartphone. Since I want that my events are recieved by the phone even if they are disconnected I started using the DataAPI instead of the MessageAPI, but now the "synchronization" takes about…
rekire
  • 47,260
  • 30
  • 167
  • 264
5
votes
1 answer

Sending data to android wear device

I'm trying to send a String array from my phone to my wear, I've created a service on my phone that is supposed to send the data with this code : public class SendDataService extends Service { private static final String TAG =…
Quentin Menini
  • 160
  • 1
  • 1
  • 12
5
votes
1 answer

Android Wear Data Items

I'm trying to figure out how to sync some data from the phone to the Android Wear device and I've read the article on developer.android.com on Data Items however I'm still not clear on exactly how to use them. Specifically where each code segment…
Flatlyn
  • 2,040
  • 6
  • 40
  • 69
5
votes
2 answers

Permissions for a WearableListenerService

I've implemented a WearableListenerService in both my main app and the companion Wear app. In the manifests, the service needs to be declared as android:exported="true" (or not declared at all and left to default to true) since it's started by…
Jarett Millard
  • 5,802
  • 4
  • 41
  • 48
5
votes
1 answer

Android Wear How Long do DataMap entries Stay Valid

I'm extending one of my apps to work with Android Wear, and I need to send 4 bitmaps to Wear. I'm using the DataApi and DataMap to do this and it is currently working fine. My question is, how long does data stay synced in the DataApi? Would I still…
Eliezer
  • 7,209
  • 12
  • 56
  • 103
4
votes
1 answer

Error while accessing android wear data layer

I am trying to access the wearable data layer to communicate with the phone app as shown here. However, after writing the following line: DataClient dataClient = Wearable.getDataClient(context); The Android lint flags it in Android Studio and shows…
4
votes
0 answers

setUrgent() not respected in Android phone-watch communication data API

I develop the Android watch/phone application pair, where watch and phone communicate using Data API. I need to pass the messages immediately, or with few minutes delay at most (not 30 minutes). To achieve so, I call setUrgent() on my…
Audrius Meškauskas
  • 20,936
  • 12
  • 75
  • 93
4
votes
1 answer

How do I draw icons on a watch face from an Android wear complication provider?

Using the Complications API there's an icon type, but when it comes to drawing the icon I'm not sure how to do it. When I'm drawing the actual watch face there doesn't seem to be a drawIcon method. E.g. something like canvas.drawIcon(icon). I can…
1
2
3
19 20