android-wear-data-api

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

*爱你&永不变心* 提交于 2020-01-21 04:51:09
问题 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 am not using any emulator but an Android Wear watch I own--which I have paired and enabled debugging via the Android Wear device and the Android Wear application on the phone. On both the phone and wear's AndroidManifest.xml, I include com.google

Can I send custom objects to Android Wear?

£可爱£侵袭症+ 提交于 2020-01-12 01:49:32
问题 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 information for these objects in a ListView. On the Wear piece of my application I want to show a limited version of this list, for example the top 3 from the list will be show on my full screen app on the Wearable. My problem is that there doesn't

How to correctly register DATA_CHANGED Data API event after crash/forcibly stop?

試著忘記壹切 提交于 2020-01-07 04:21:24
问题 I'm developing an Android app to collect data from an Android Wear. A WearableListenerService is used in the handheld device to receive data from the watch via Data API. But I noticed that if the app in handheld device is forcibly stopped, either from Settings -> Apps or by adb during development, while the app in wearable is still running, it won't be able to receive data again even it's manually restarted. This won't happen if the wearable is not running the app. To restart capturing the

How does NodeAPI in Google Play Services work?

喜你入骨 提交于 2020-01-04 06:28:07
问题 I was trying to find the list of Nodes via getNodes() method in NodeAPI in GooglePlayServices. I have one LG G Live watch, one Samsung Gear 2 (Tizen OS) and one Google Glass. My LG G Watch has a connection with a companion APP (via GoogleAPIClient) on phone (Samsung S4). I have one application which checks if the watch is connected with phone, and if not connected, notify user about the same. I was using getNodes() method for this, and I connected glass and gear with phone with "My Glass" and

WearableListenerService's onDataChanged not called on phone

一个人想着一个人 提交于 2019-12-25 15:52:45
问题 I have an app on the wearable that should send a datamap to the handheld on a button click. I've made almost the same setup from the handheld to the phone, only difference is that I sent a message, which works perfectly, and now I want to send a DataMap the other way. I am pretty sure I have the correct setup but still the onDataChanged() on the wearableListenerService on the phone is never called. Have I forgot something important or what else is wrong? Please take a look and save my day! :)

Android Wear: measuring sensors and preventing ambient mode / sleep

假装没事ソ 提交于 2019-12-25 09:50:38
问题 I have built an app for Android Wear that needs to measure the motion (accelerometer) sensors continuously for an hour or so for data collection purposes. During operation, I have had problems with the device going into ambient mode (or sleep) and slowing down (or shutting off) the sensors. As a result, I am using the following command to lock the screen on and it seems to work. But it also seems wasteful, since I dont actually need the screen on, just the sensors running. getWindow()

Android Wear Message Listener

霸气de小男生 提交于 2019-12-25 03:14:08
问题 I need some help I have Android Wear with message api working but I'm stuck sending some commands this is my listener. import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.hardware.Camera; import android.widget.ImageButton; import android.widget.Toast; import com.google.android.gms.wearable.MessageEvent; import com.google.android.gms.wearable

Is DataApi Reliable and Practically Real Time? Extremely Delayed [duplicate]

可紊 提交于 2019-12-24 17:03:35
问题 This question already has an answer here : WearListenerService onDataChanged strange behavior (1 answer) Closed 4 years ago . I have had an Android Wear app on the market for about 10 months now and it's stopped working (Not sure when it stopped working). I'm trying to update my wearable application with some statistics that I record in my mobile app. As I say, this used to work fine and reliably. I even added the timestamp to this so it was unique as the onDataChanged is only called if data

Android wearables: How to handle the event of a connected device?

久未见 提交于 2019-12-24 14:41:05
问题 From the smartwatch I'd like to intercept the event of the connection to a smartphone. This is automatically managed by Android and Android Wear so I need to get this event from my app running on the watch. I found out this on WearableAPI to be notified without polling Wearable.NodeApi.getConnectedNodes public class MyService extends WearableListenerService { @Override public void onPeerConnected(Node peer) { Log.i("my wear service", "connected"); super.onPeerConnected(peer); // here I would

Share objects from phone to android wear

本秂侑毒 提交于 2019-12-22 11:13:19
问题 I created an app. Within this app, you have objects which contains 2 strings (name and age) and a bitmap (avatar). Everything is saved to a sqlite database. Now I want these objects to be accessible on my smart watch. So I want to achieve that you can go to start, start the application and scroll to the left and right to see these objects. This means I have to retrieve the objects from the phone and get them at the watch. I am currently wondering if I did everything right, or that I should do