wear-os

Does the accelerometer drain battery on Android Wear? (Android watch)

折月煮酒 提交于 2019-12-30 05:09:25
问题 I'm creating an Android Wear app that tries to detect some of the hand movements, to do it, I need to continuously monitor the accelerometer output . I'm wondering how it will affect the battery life. For phones, I know that there are methods like "disable accelerometer while screen is turned off" to save battery, but what's the battery cost in case of watches? Since Android watch can count your steps and it turns on the screen when you face it towards your face, I believe the accelerometer

Android wear project with 3 flavors, 3 buildTypes and 2 applicationIdSuffixes

允我心安 提交于 2019-12-30 03:45:47
问题 When I build my project after trying to combine wearApp flavors and buildTypes with applicationIdSuffixes, i get the following error message: Error:Execution failed for task ':app:handleFirstCustomerTestMicroApk'. > The main and the micro apps do not have the same package name. From my app/build.gradle: buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release {

Heart Rate Sensor not found (LG Watch Urbane)

馋奶兔 提交于 2019-12-29 09:15:14
问题 I'm trying to access to the heart rate sensor of my LG Watch Urbane using this code on MainActivity.java: mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); mHeartRateSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE); boolean sensorRegistered = mSensorManager.registerListener(this, mHeartRateSensor, SensorManager.SENSOR_DELAY_NORMAL); Log.d("Sensor Status:", " Sensor registered: " + (sensorRegistered ? "yes" : "no")); The problem is that I get this error

Android: How to get Google Fit data from Wearable device?

无人久伴 提交于 2019-12-29 05:51:45
问题 I'm following the same steps described here (the Google Fit client connection part is working fine). final DataType dataType=TYPE_STEP_COUNT_DELTA; DataSourcesRequest requestData = new DataSourcesRequest.Builder() .setDataTypes(dataType) // At least one datatype must be specified. .build(); Fitness.SensorsApi.findDataSources(mClient, requestData) .setResultCallback(new ResultCallback<DataSourcesResult>() { @Override public void onResult(DataSourcesResult dataSourcesResult) { Log.i(TAG,

Button click in android wear [closed]

淺唱寂寞╮ 提交于 2019-12-28 16:25:11
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have created android wear activity with a small button (A shortcut to activity in my mobile app). Is it possible to send a bundle request to my main app? If so how to implement the click listener? Thanks! 回答1: This can be done using mentioned MessageApi: http://developer.android.com/training/wearables/data

Does Android Wear support direct access to the Internet?

一世执手 提交于 2019-12-28 03:04:49
问题 As an android wear developer, Can we directly access network through http request ? In my case, I want to send a http request to get Yahoo Financial API stock data, but it always fails, Same conditions In stackoverflow Does Android Wear support HttpURLConnection - getting EOFException Direct internet connection on Android Wear? But in latest Android 5.1.1 Update shows "Wifi Support feature" http://officialandroid.blogspot.tw/2015/04/android-wear-wear-what-you-want-get.html It means that Wifi

App for Sony SmartWatch

自作多情 提交于 2019-12-25 18:27:47
问题 sorry for my english :( I get this error when i build my project 01-21 00:27:27.305 20626-20626/ruben.wol.wareable E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: ruben.wol.wareable, PID: 20626 java.lang.NoSuchMethodError: android.support.wearable.view.WatchViewStub.requestApplyInsets at android.support.wearable.view.WatchViewStub.onAttachedToWindow(WatchViewStub.java:119) at android.view.View.dispatchAttachedToWindow(View.java:12752) at android.view.ViewGroup.dispatchAttachedToWindow

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! :)

onCapabilityChanged is not fired on both handheld and wearable while disabling/enabling connections

被刻印的时光 ゝ 提交于 2019-12-25 10:03:16
问题 <service android:name=".SMessage"> <intent-filter> <action android:name="com.google.android.gms.wearable.CAPABILITY_CHANGED" /> <action android:name="com.google.android.gms.wearable.MESSAGE_RECEIVED" /> <data android:host="*" android:pathPrefix="/send-message" android:scheme="wear" /> </intent-filter> </service> public class SMessage extends WearableListenerService { @Override public void onCapabilityChanged(CapabilityInfo capabilityInfo) { super.onCapabilityChanged(capabilityInfo); _A.toast(

onCapabilityChanged is not fired on both handheld and wearable while disabling/enabling connections

*爱你&永不变心* 提交于 2019-12-25 10:03:09
问题 <service android:name=".SMessage"> <intent-filter> <action android:name="com.google.android.gms.wearable.CAPABILITY_CHANGED" /> <action android:name="com.google.android.gms.wearable.MESSAGE_RECEIVED" /> <data android:host="*" android:pathPrefix="/send-message" android:scheme="wear" /> </intent-filter> </service> public class SMessage extends WearableListenerService { @Override public void onCapabilityChanged(CapabilityInfo capabilityInfo) { super.onCapabilityChanged(capabilityInfo); _A.toast(