wear-os

push-button in Android Wear smartwatch

核能气质少年 提交于 2020-02-08 09:53:06
问题 Is there in SDK Android Wear a Class representing a push-button (the push button on the side of the watch) If it's possible, can I assign a comportment and a method to this push-button, the push-button can be pressed, or clicked, by the user to perform an action. I found this http://developer.android.com/reference/android/widget/Button. Html but I think this Class representing a button widget, not what I want 回答1: No, there is no way (at this point) to override action for power off button.

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

WatchViewStub.requestApplyInsets fails with NoSuchMethodError

非 Y 不嫁゛ 提交于 2020-01-17 03:51:25
问题 I'm trying to run simple Android Wear app on S5 with KitKat. The app is just sample generated by Android Studio. When I run the app it fails with: java.lang.NoSuchMethodError: android.support.wearable.view.WatchViewStub.requestApplyInsets I've found the class and there's no requestApplyInsets method indeed. I'm using the latest version of the support library for wearable which is 1.0.0. dependencies { compile 'com.google.android.support:wearable:1.0.0' compile 'com.google.android.gms:play

Get data from Smartwatch Android Wear to Smartphone

你说的曾经没有我的故事 提交于 2020-01-14 19:26:12
问题 I have made some apps (pedometer, heart rate, audio recorder) for the moto360 with android wear. everything works fine, but I don't know how to save the data on the watch and how to access the data on the smartphone. I have managed to send messages to the watch, but I can't send data from the watch to the phone. I can save my data on the smartphone, but I don't know how to manage it on the smartwatch. can someone show me a tutorial or an example? thank you so much! edit: The following Code

Get data from Smartwatch Android Wear to Smartphone

眉间皱痕 提交于 2020-01-14 19:25:08
问题 I have made some apps (pedometer, heart rate, audio recorder) for the moto360 with android wear. everything works fine, but I don't know how to save the data on the watch and how to access the data on the smartphone. I have managed to send messages to the watch, but I can't send data from the watch to the phone. I can save my data on the smartphone, but I don't know how to manage it on the smartwatch. can someone show me a tutorial or an example? thank you so much! edit: The following Code

onDataChanged is not getting called

懵懂的女人 提交于 2020-01-14 05:00:07
问题 I am developing demo application for wear and handheld. When wear starts it sends request to handheld and get list along with time stamp. and while we click on any list item, it sends changes to handheld again. This works perfectly But not i want to sends list while on click of device list is performs. in device activity thread class SendToDataLayerThread extends Thread { String path; DataMap dataMap; SendToDataLayerThread(String p,DataMap d){ path = p; dataMap = d; } @Override public void

Android Wear Notification with MediaSession

喜欢而已 提交于 2020-01-14 00:30:36
问题 I would like to make an android wear notification using MediaSession that has several buttons on one page and some other buttons on a different page. It would look like Google Play Now App notification on an android wear. I followed this github tutorial at https://github.com/PaulTR/AndroidDemoProjects/blob/master/MediaSessionwithMediaStyleNotification/app/src/main/java/com/ptrprograms/mediasessionwithmediastylenotification/MediaPlayerService.java However, each action was added to a separate

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

Having trouble reading heart rate sensor from Moto 360 - Android Wear

白昼怎懂夜的黑 提交于 2020-01-10 15:41:37
问题 Has anyone successfully read the heart rate sensor from the Moto 360? mSensorManager = ((SensorManager)getSystemService(SENSOR_SERVICE)); mHeartRateSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE); I am getting an error that states "SensorManager﹕ sensor or listener is null" I know the Gear Live uses a different ID other than Sensor.TYPE_HEART_RATE...I'm wondering if that's the case with the Moto 360. I tried a sensor value of 65538 which reports itself as a "Wellness Sensor"

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