android-wear-data-api

WearListenerService onDataChanged strange behavior

放肆的年华 提交于 2019-11-28 01:56:00
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 happen. Here is my code: WearListenerService on Handheld: import android.content.Intent; import android.os.Bundle; import android.support.v4.content.LocalBroadcastManager; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.wearable.DataApi; import com.google

Android Wear Watchface Settings on host

南楼画角 提交于 2019-11-28 00:28:17
I currently have an android wear watchface developed. I however would now like to create a settings section on the host app that would allow the user to customize the watchface. I am new to the android development so I am curious on the correct way to do this. Is there a way to update a sharedpreference on the host and then push or sync that with the sharedpreference on the wear device? Or is there a totally different way I should be looking at this? You can use the DataApi or MessageApi to sync your watchface configuration between Phone and Watch devices. Please take a look at the

Android Wear Data Items

不问归期 提交于 2019-11-27 20:49:40
问题 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 (the GoogleApiClient, the Sync, and the Listen) should be implemented both where in the flow of the app code and on which device, phone or wear, or both. Link to developer.android.com page 回答1: Have you looked at the samples for API 20? There is a

Android Wear Watchface Settings on host

一世执手 提交于 2019-11-27 04:46:03
问题 I currently have an android wear watchface developed. I however would now like to create a settings section on the host app that would allow the user to customize the watchface. I am new to the android development so I am curious on the correct way to do this. Is there a way to update a sharedpreference on the host and then push or sync that with the sharedpreference on the wear device? Or is there a totally different way I should be looking at this? 回答1: You can use the DataApi or MessageApi

WearListenerService onDataChanged strange behavior

时光总嘲笑我的痴心妄想 提交于 2019-11-26 22:02:56
问题 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 happen. Here is my code: WearListenerService on Handheld: import android.content.Intent; import android.os.Bundle; import android.support.v4.content.LocalBroadcastManager; import com.google.android.gms.common.ConnectionResult; import com.google.android