wear-os

How to wake up Android Wear when it is in sleep mode?

社会主义新天地 提交于 2019-12-09 11:32:48
问题 When Android Wear goes to sleep mode (screen dimmed), some parts of my code are not executed. I use Timer in background service to trigger some actions, such as sending data from wear to mobile, but the data is not sent. It is sent when I tap the screen to wake it up. I also try to use Timer trigger a notification with vibration when the screen is off, but it doesn't appear until I tap the screen. In debug mode (either Bluetooth or USB), data sending and notification work fine. I suspect this

Voice Capabilities in Android Wear

爱⌒轻易说出口 提交于 2019-12-09 06:52:43
问题 I am trying to add Voice Capabilities in Android Wear and following below URL https://developer.android.com/training/wearables/apps/voice.html Here is my manifest <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.demowearapp" android:versionCode="1" android:versionName="1.0" > <uses-feature android:name="android.hardware.type.watch" /> <uses-permission android:name="android.permission.VIBRATE" /> <uses-sdk android

Access Android Wear Fit Data

試著忘記壹切 提交于 2019-12-09 05:40:54
问题 I'm developing an app for Android Wear on Samsung Gear Live (Google I/O Edition) where it will need access heart rate and steps count history data. I know that later this data might be accessible using Google Fit SDK, but is it possible to read that data without using that SDK right now? I would prefer to access this data without ROOTing my G Watch. Here are the screenshots of the historical data that I would like to extract: Steps History data: Heart Rate History Data: UPDATE 10/28/2014

How to launch android wear activity from mobile

夙愿已清 提交于 2019-12-09 04:55:09
问题 I have been working on a project where I need a button on a mobile to start up an activity on the watch. I have been going through the data layer sample in the sdk but can not get it working. I set up a wearable listener service class, but it is not picking up any messages. The service is added to the manifest but it is still not working. I do have other services too and I am thinking I might have too many services. On the Wear watch, does an activity have to be running in order for it to

Can Android Wearable apps detect the power button as a KeyEvent?

爷,独闯天下 提交于 2019-12-09 03:42:59
问题 Can Android Wearable apps detect the power button as a KeyEvent or by other means? I would like to run a listener service to detect the wearable power button. I tried this but no log corresponding to a KeyEvent occurred. @Override public boolean onKeyDown(int keyCode, KeyEvent event) { Log.e(">>>>>>", "FindPhoneActivity event "+event); if (keyCode == KeyEvent.KEYCODE_POWER) { // Do something here... Log.e(">>>>>>", "FindPhoneActivity onKeyDown"); //event.startTracking(); // Needed to track

Sending data to android wear device

ぐ巨炮叔叔 提交于 2019-12-09 00:34:30
问题 I'm trying to send a String array from my phone to my wear, I've created a service on my phone that is supposed to send the data with this code : public class SendDataService extends Service { private static final String TAG = "SendDataService"; @Override public void onCreate(){ GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() { @Override public void onConnected(Bundle connectionHint) { Log.d(TAG,

Is it possible to get PPG(Photoplethysmogram) data from a smart watch via android?

别来无恙 提交于 2019-12-08 23:55:56
问题 I want to develop a health care app using Android smart watch devices that have an optical heart rate sensor. Examples of such devices are: Samsung gear live, Moto360, LG G watch R, etc. To do this, I need the raw PPG signal data from those devices, but I found that the Android API only supports heart rate data by BPM unit. Does anyone know if the raw signal data is accessible, and if so, how do I get access to that data? 回答1: Yes, it is possible (at least on a Samsung mobile device such as

Why is my wearable not listed as DataSource in Google Fit API?

一曲冷凌霜 提交于 2019-12-08 17:02:02
问题 I'm trying to access the heart rate monitor of a Samsung Gear Live watch. The watch is paired with a 4.4.4 handset and works correctly. I'm following the official BasicSensorsApi sample. I can successfully connect to Google Play Services with the following scope: addScope(new Scope(Scopes.FITNESS_LOCATION_READ_WRITE)) .addScope(new Scope(Scopes.FITNESS_ACTIVITY_READ_WRITE)) .addScope(new Scope(Scopes.FITNESS_BODY_READ_WRITE)) But then, when I want to list all available heart rate monitors, I

Android Wear: Starting a service on Handheld

断了今生、忘了曾经 提交于 2019-12-08 16:39:06
问题 I'm building a Wear app that will communicate with a WearableListenerService on the handheld. However, i want to make sure that service is up and running when the app starts on the watch. My initial thought was either send an intent or a broadcast message to get the service started. However, i've been unable to figure out how to get the watch to send that to the paired handheld instead. On the watch side: Intent intent = new Intent(); intent.setAction("my.wearable.CONNECT"); sendBroadcast

How to support new ambient mode in android wear?

ぐ巨炮叔叔 提交于 2019-12-08 10:32:17
问题 Since last update Android Wear has a new feature - the always-on mode. This means that the Android Wear device doesn’t turn off the screen; it changes to the ambient mode to save battery and keeps certain apps running in the background. How exactly should I implement this? p.s. I'm developing sport application, not watchface. 回答1: What you're looking for is how to support "Ambient Mode" in your Wear app's activity. There is an entire doc dedicated to this: http://developer.android.com