wear-os

CapabilityApi does not return any Nodes

独自空忆成欢 提交于 2019-12-04 17:26:20
I'm attempting to communicate between my handheld and wearable app and I am trying to find the correct Node by using the CapabilityApi . I know that the devices are connected - other apps and samples work just fine - but when I run my wearable app neither calls to getCapability() or getAllCapabilities() return any Nodes at all. Everything else seems to work properly - in fact I can find the handheld device just fine if I use the NodeApi and sending messages with the MessageApi also seems to work properly - but the capabilities of each device are just not advertised for some reason. I have

Trouble setting up Hello, World watch app in Android Studio

痞子三分冷 提交于 2019-12-04 13:54:43
When deploying the wear version of the included Hello, World watch app in Android Studio I get this error: Failure [INSTALL_FAILED_OLDER_SDK] Update: Removing details about trying a hacked version of L from the Reddit post as that was not a solution for me and it may have created more confusion. mobile/build.gradle apply plugin: 'com.android.application' android { compileSdkVersion 20 buildToolsVersion "20.0.0" defaultConfig { applicationId "com.example.erikbabel.myapplication" minSdkVersion 15 targetSdkVersion 20 versionCode 1 versionName "1.0" } buildTypes { release { runProguard false

How to send sensor data directly to PC from Android Wear using bluetooth

冷暖自知 提交于 2019-12-04 13:31:36
Let say I have bluetooth dongle on my PC. How can I send data to my PC directly. I don't want to use the phone a middle man. (which is normally used when debugging Wear over bluetooth) Can I pair Android Wear with PC directly, and then transmit any data? You would need to reverse engineer the Bluetooth protocol between the Android Wear watch and the Wear App on the phone. Given that the Wear App is used to update the OS Wear software on the watch, Google can change the protocol at any time. So while you might be able to sniff the traffic and duplicate the behavior of the Wear App to be able to

Android Wear: how to store image data into watch

一曲冷凌霜 提交于 2019-12-04 13:30:06
I'm looking for how to store image data into my app on Android Wear. What I want to do are followings: Take a photo and send it to my watch. (via DataMap) My watch displays the photo. When my app on Android Wear restarts, the app displays the photo taken before. For now, the photo is cleared after restart the app. I want to store the photo. Are there any ways to save the photo into the watch. Thanks. [UPDATE1] I tried to save an image by using Environment.getExternalStorageDirectory() But "NOT EXISTS" is returned. String imagePath = Environment.getExternalStorageDirectory()+"/test.jpg"; try {

Moto 360 Malfunctioning Gyroscope After Android 5.1 Update

大城市里の小女人 提交于 2019-12-04 13:00:16
Since the Android 5.1 update (or not sure if this was always the case, but I don't suspect it was), the Moto 360 no longer reports useful gyroscope data. I've verified this abnormal behavior across three different Moto 360 devices. Here is a link to a Google Spreadsheet that contains raw sensor data (capturing my arm flailing motion) for the Moto 360 on page 1, and then the sensor data for the G Watch R on page 2. Note that sensorType 0 is for gyroscope, and 1 is for accelerometer. https://docs.google.com/spreadsheets/d/11154fiVCSro111apVkYSlz1s4VW8D5X82WZsNTTHnCE/edit?usp=sharing As you can

How do you prevent an Android Wear activity from having multiple instances?

时光毁灭记忆、已成空白 提交于 2019-12-04 12:31:43
问题 Sometimes, most of the time when my LG G watch closes the app automatically by going to sleep/dim mode, if I open the app again by going to the start menu there are two instances of the activity opened (when I slide one off the previous one is underneath). This never happens in a phone, is this how activities work in Android Wear? Should I "finish()" them in onPause()? Thanks. 回答1: Have you looked at the android:launchMode attribute in the AndroidManifest.xml for the activity? perhaps android

Cant connect Android Wear Device via bluetooth

耗尽温柔 提交于 2019-12-04 12:03:59
问题 I have USB debugging on and I am showing that the Target is connected I however am unable to connect the host. When I run the below command on my PC I get output indicating that the command is not complete. adb forward tcp:4444 localabstract:/adb-hub; adb connect localhost:4444 Output: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Android Studio>adb forward tcp: 4444 localabstract:/adb-hub;adb connect localhost:4444 Android Debug Bridge version 1.0.31 -a - directs adb to listen on all

Long Running Apps on Android Wear

别说谁变了你拦得住时间么 提交于 2019-12-04 11:36:31
The Android Wear ecosystem seems to be built around quick tasks which a user will interact with, and then close. This works great for most applications, but what about one which covers a long running task, and should not be automatically closed when the watch sleeps? My specific case: Swing by Swing Golf GPS . The preferred operation would be to have the application remain active, and shown when the screen wakes due to user action. And the life-time of a single use will be between 2 to 4 hours. What are some methods to go about keeping an application front and center on the Android Wear device

Hide the open on phone action on wearable

安稳与你 提交于 2019-12-04 10:59:00
How can I supress the "open on phone" action on a wearable? I added a more helpful custom action which is now a dublicate action. Any idea how I can remove it? Here is a snip it how I build the Notification: NotificationCompat.Builder builder = new NotificationCompat.Builder(context) .setContentTitle("Title") .setContentText("Message") .setSmallIcon(R.drawable.icon) .setContentIntent(openIntent); NotificationCompat.WearableExtender extender = new NotificationCompat.WearableExtender(); extender.addAction(new NotificationCompat.Action.Builder(icon, "do something", openIntent).build()); builder

How to access Android Heart Rate Sensor RAW DATA? (reflected light, not the heart beat)

↘锁芯ラ 提交于 2019-12-04 09:16:38
问题 The android sdk on heart rate sensor only returns the calculated bpm which I have no interest. I need to access to android heart rate sensor RAW data, e.g. in terms of intensity of reflected value would be great. (because basically heart rate sensor uses led and measures the reflectance over time) If possible, access the the raw image collected by the whatever image sensor would be greater. thanks. Related SO question: Read underlying color/light data from Android Wear heart rate sensor? 回答1: