wear-os

Android synchronizing database with wearable - DataMapItems are overwritten

有些话、适合烂在心里 提交于 2019-12-11 02:06:02
问题 I try to synchronize data from a SQLite database on the handheld to a wearable. Therefore I use the Data API with the following code on the handheld: cursor.moveToFirst(); while (!cursor.isAfterLast()) { final PutDataMapRequest putRequest = PutDataMapRequest.create("/SAMPLE"); putRequest.setUrgent(); final DataMap map = putRequest.getDataMap(); int i = 0; for (String columnName: cursor.getColumnNames()) { map.putString(columnName,cursor.getString(i)); i++; } Wearable.DataApi.putDataItem

Kiosk Mode / Screen Pinning in Android wear

雨燕双飞 提交于 2019-12-11 01:13:00
问题 I am developing an Android wear app for Sony Smartwatch 3 with Android Lollipop and can't seem to find a way implement a working kiosk mode. I've looked everywhere but nothing seems to work. Also tried screen pinning but there isn't an option to do it on the watch (manually) and adding startLockStart() to my onCreate doesn't seem do to anything - I can still exit the app. Any help or confirmation that it is not possible will be greatly appreciated 回答1: Make sure you run Android L MR1 (Android

Android Wear CircledImageView (and DelayedConfirmationView) Always Square

我与影子孤独终老i 提交于 2019-12-10 21:51:46
问题 Anytime I try to use a CircledImageView (I'm developing on an LG G Watch) my image has a squared background. I get the same result with a DelayedConfirmationView , plus there is no "countdown animation." 回答1: Turns out the issue with the rounding was that I was specifying the layout_width and layout_height in dp instead of using wrap_content . The issue with the "countdown" animation is that there needs to be a border width and color specified. EDIT: Here's a sample of what I was using ( app

Sending data from mobile app to Android Wear delay [duplicate]

▼魔方 西西 提交于 2019-12-10 20:02:23
问题 This question already has an answer here : WearListenerService onDataChanged strange behavior (1 answer) Closed 3 years ago . I'm trying to sync data between a settings app and a watch face and I'm having no luck. I've tried using a googleApiClient with listeners & onDataChanged and DataMaps, but there is a huge delay on the wear device to receive the data. (I'm talking like 5 minutes or more from being sent on from the mobile). I've also tried to use Teleport Library for Wearable and I can

Android Wear Bundled Notifications and Background Images

一曲冷凌霜 提交于 2019-12-10 19:43:45
问题 I'd like to setup an android wear app that extends push notifications by stacking multiple notifications and then displaying different background images and action on each stacked notification. http://developer.android.com/training/wearables/notifications/stacks.html This is how the stacked notifications would look and then cards in the 2nd and 3rd columns would have unique background images. I can get the background image to show up on a single notification, but when I moved to stacked

Android Fitness API not reading data from wearable sensors

大憨熊 提交于 2019-12-10 18:26:01
问题 I have been reading about Google Fit API, specially the Sensors API (https://developers.google.com/fit/android/sensors), which says : The Sensors API provides access to raw sensor data streams from sensors available on the Android device and from sensors available in companion devices, such as wearables. Also, watching Google's example video, they says "They could be sensors available on the Android Device or sensors available on companion devices. For example, for steps, Fit will use the

Android Wear - receiving message from Wear without WearableListenerService?

北慕城南 提交于 2019-12-10 18:15:30
问题 I'm working on an app for Android Wear which can start an activity on the phone. Everything works great, but I'd like to not rely on a constantly running background service on the phone to pick up this message. Ideally, I would have the WearableListenerService start at the same time as the app and stay running until onPause. Is there a way of intercepting a message from Wear with a broadcast receiver and intent filter, and then starting the app/service from the receiver? Here's some of the

Android L devices not sending notification card to Android Wear SmartWatch

可紊 提交于 2019-12-10 18:14:00
问题 I'm trying to send a notification to an Android Wear SmartWatch when a button is clicked. It's working in all devices I have tested, except for the ones with Android L. Does anyone have any idea about what may be the problem? I have even paired the devices with an Android Wear SmartWatch emulator, but, again, it does not work with Android L devices. Below is my button: // the button click listener button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {

Packaging wearable apps

て烟熏妆下的殇ゞ 提交于 2019-12-10 17:26:59
问题 I'm in the last stage of developing a watchface service for the android wear devices. The problem is the following: Every time i try to sign my app, two files are being generated: wear-release.apk and mobile-release.apk , there is no other apk. Shouldnt the apk name be my Packagename of the projectdirectory? -Because i tried opening both files with my compatible Smartphone (with a weardevice attached), which always ends instantly in a phrasing error. Thinngs i have noticed: There is no

Add Android Wear Module To My App

China☆狼群 提交于 2019-12-10 17:07:55
问题 I want to make an Android Wear that will be installed when you install the Phone's app from the play store. I looked around and found that the way to do this is to create new Android Wear Module and build it there. But, I have a problem with that. Because the phone module minimum SDK is 13 and the Wear Minimum SDK must be 20 (4.4W), I can't install the app itself on my phone, Only on the watch. How can I fix this to work? Thanks (And sorry about my not-so-good english). 回答1: The phone