wear-os

GoogleApiClient onConnected never called on Wearable device

雨燕双飞 提交于 2019-11-27 17:05:51
问题 I have a wearable device that I'm trying to connect to the GoogleApiClient but the callbacks are never called (onConnected, onConnectionSuspended or onConnectionFailed). Everything else is working fine, the DataLayerListenerService is able to receive messages from the handheld and the onPeerConnected is being called when it connects. I've tried in on both the emulator and a Samsung Gear Live device. This is the code that I have in the Activity where I'm trying to connect to the

Wear App and with custom build type with applicationIdSuffix

女生的网名这么多〃 提交于 2019-11-27 14:41:56
问题 I have an app where I'd like to add an Android Wear app extension. The main app has three build types (debug, beta and release). Beta builds have an applicationIdSuffix which allows me to install the play-store version and the current development version in parallel on the same device. This all worked fine until I added the wear app. The main app`s build.gradle looks like this: apply plugin: 'com.android.application' android { ... defaultConfig { ... applicationId "com.example.mainApp" ... }

How to disable the android wear back swipe?

China☆狼群 提交于 2019-11-27 14:40:44
问题 I am creating a Android Wear app that has an touch area. The user is suppose to be able to move it's finger in all directions over the screen (Think touchpad on your laptop). However the back swipe makes this a bit problematic. Any help with getting around this issue would be a great help. How to disable the android wear back swipe? /Jakob 回答1: There is an attribute in window style to disable this behavior: <style name="AppTheme" parent="@android:style/Theme.DeviceDefault.Light"> <item name=

Sending messages from Android Wear to host device

三世轮回 提交于 2019-11-27 11:56:23
I'm writing a custom Android Wear application that's supposed to fire a one-off message to the connected host device (the phone). Digging through the API, I found the following tutorial that should work well: http://developer.android.com/training/wearables/data-layer/messages.html My Android app has a WearableListenerService and my Android Wear app fires off messages using the Message API. The WearableListenerService get's called when the emulator gets connected based on logging the following method, so I'm pretty sure the service is wired up fine @Override public void onPeerConnected(Node

Android exact Alarm is always 3 minutes off

早过忘川 提交于 2019-11-27 11:43:15
I have an app which uses the AlarmManager to regularly wake up the phone at full hour and send a message to an Android Wear watch which than makes a short vibration. I have two users with a Samsung Galaxy S6 with stock Android 5.1.1 and the Sony SW 3 with 5.1.1 who experience a weird bug. At the very first full hour the vibration is at the exact time but all other vibrations are 3 minutes delayed. Sometimes even the first full hour vibration is delayed. Here is some code: final Calendar time = Calendar.getInstance(); time.set(Calendar.SECOND, 0); time.set(Calendar.MILLISECOND, 0); time.set

Fail to create Android virtual Device, “No system image installed for this Target”

房东的猫 提交于 2019-11-27 11:19:00
Unable to create Android Virtual Device i follwed this link. I installed all ARM images for each Android more than 4.0. I installed intel & MIPs as well. But, still my AVD Manager is saying "NO System images installed for this target". why, so? Spring Breaker In order to create an Android Wear emulator you need to follow the instructions below: If your version of Android SDK Tools is lower than 22.6, you must update Under Android 4.4.2, select Android Wear ARM EABI v7a System Image and install it. Under Extras, ensure that you have the latest version of the Android Support Library. If an

Screen record Android Wear

佐手、 提交于 2019-11-27 10:37:31
问题 When executing: adb -s localhost:4444 shell screenrecord /sdcard/dcim/rec.mp4 I get: ERROR: unable to create video/avc codec instance WARNING: failed at 280x280, retrying at 1280x720 ERROR: unable to create video/avc codec instance Is it possible to record the screen on Android Wear? 回答1: On the LG G Watch, here are some commands you can use to capture a video of the display on a watch with 280x280 display and MPlayer: adb shell screenrecord --time-limit 30 --o raw-frames --verbose /sdcard

Does Android Wear support direct access to the Internet?

懵懂的女人 提交于 2019-11-27 09:10:35
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 feature in Android Wear just for "sync data" between phone and wear, or we can do more things on wifi ?

Get Heart Rate from “Sensor” Samsung Gear Live

元气小坏坏 提交于 2019-11-27 08:47:28
How do I get the heartrate from the attached sensor on the Samsung Gear Live I just tried to list all Sensors by SensorManager mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); List<Sensor> deviceSensors = mSensorManager.getSensorList(Sensor.TYPE_ALL); for(Sensor s : deviceSensors){ Log.i(TAG, "" + s.getName()); } But I only get theses Sensors: 07-09 23:18:05.047 3269-3269/com.sample.soma.wapp I/MyActivity﹕ MPU6515 Acceleration Sensor 07-09 23:18:05.047 3269-3269/com.sample.soma.wapp I/MyActivity﹕ MPU6515 Gyroscope Sensor 07-09 23:18:05.057 3269-3269/com.sample.soma

Different text for the wear device and the mobile device

僤鯓⒐⒋嵵緔 提交于 2019-11-27 08:19:04
问题 Is it possible to have a notification that shows a different text (content title and content text) in the Android wear device and in the mobile device? 回答1: Not at the moment. However, you can achieve this effect in the following way: post a notification on the phone with setLocalOnly(true) post a DataItem using a DataAPI that describes the notification and changed text when the wearable receives the DataItem , post the notification with different text, again setting setLocalOnly(true) on