wear-os

Extending AppWidget to Wearable App

淺唱寂寞╮ 提交于 2019-12-12 01:49:20
问题 I have basic Android widgets which are already running well on phone. How to extend it to Android Wear devices? Should I be able to extend it somehow? So only 1 source code for both phone and wear devices. Or I must implement a new project for Android wear devices? Thanks 回答1: You can extend wear app support just one application.(You not have to upload other Wear application at Play Store. Add wear module in your project by Android studio. (File -> New Module -> Android Wear Module) Maybe

Android Wear onDataChanged isn't called

感情迁移 提交于 2019-12-12 01:37:35
问题 I downloaded a ready phone app and trying to implement a watchface for my android wear project. The goal is to pass temperature information from phone to the wear device and have it update the watchface. I have tried: 1. same package name 2. same applicationId 3. same dependencies versions 4. same permissions 5. on my phone side I know for sure that my data is different every time (so the update has to happen) I also use data items so my data has to get synced. private void syncWatch(String

Android Wear Google Play Services

假装没事ソ 提交于 2019-12-12 01:24:54
问题 I developing an android wear app. While synchonization the data I have to use Google Play Services in order to update information between devices (phone and wear). I have some problems: While synronization Google Play Services have to update to the lates version. The original version is 8.7. But after sycning they become 9.8 ! Not the latest: 10.0.1! WHY? The phone have got the latest (10.0.1). So, it is not possible to sync the data. Will this problem appear for published APK file? Will

Android Wearable API: how to pass a dynamic List?

风格不统一 提交于 2019-12-12 01:17:00
问题 This is how I'm using DataAPI PutDataMapRequest dataMapReq = PutDataMapRequest.create(PATH); dataMapReq.getDataMap().putFloatArray(KEY, list); PutDataRequest putDataReq = dataMapReq.asPutDataRequest(); Wearable.DataApi.putDataItem(mGoogleApiClient, putDataReq); list could be an array[] or ArrayList<> . If I add a new element then I'll have to put the list in the data map again. This will cause a retransmission of every previously inserted elements? 回答1: Yes, if you change an element in the

NotificationListenerService Wearable

会有一股神秘感。 提交于 2019-12-11 23:44:09
问题 I am trying to implement a way to detect the notifications that are sent to the android wearable devices. After googling around, I have found it is not possible to use notificationListenerService on the wearable. In current implementation, I have implemented the notificationListenerService on the mobile handheld and am using the DataLayer to send the notifications over. My issue is: With the notificationListener, it detects everything that appears. Is there a reliable way to detect which

Android Wear setContentAction starts and soon stops Activity causing: Performing pause of activity that is not resumed

痴心易碎 提交于 2019-12-11 20:35:01
问题 I am doing Android Wear project. Notification is displayed to user with contentAction , so user can tap it. After taping it SomeActivity is displayed with DelayedConfirmationView giving user time to cancel upcoming API request. When DelayedConfirmationView finish API call is made. After API call succeeds ConfirmationActivity is shown. When ConfirmationActivity returns we finish() SomeActivity and cancel the notification. The problem I face is that after SomeActivity starts it is mysteriously

Why can't I start an Activity from a page Notification on Android Wear?

寵の児 提交于 2019-12-11 19:29:44
问题 I just succesfully created a bunch of pages notifications on my Wear device. The only problem is that the PendingIntent does not seems to start an Activity (which is of course declared in Manifest). Here is my code: List extras = new ArrayList(); Intent viewIntent = new Intent(getApplicationContext(), DetailActivity.class); viewIntent.putExtra("KEY", "TEST123"); //Note: I also tried: Intent viewIntent = new Intent(getApplicationContext(), DetailActivity.class).setFlags(Intent.FLAG_ACTIVITY

Gracenote (GNSDK) on Android Wear

别等时光非礼了梦想. 提交于 2019-12-11 19:27:15
问题 I'm trying to develop an Android Wear app that can identify songs with Gracenote's GNSDK. I'm building upon their sample app. I'm having trouble with the Wifi on the wearable device. The sample app is working in terms of a song identification attempt but misses an internet connection. (Although other apps work perfectly.) So what happens: When the watch is in Wifi and not connected to the phone via bluetooth but solely via Wifi it works. Now connecting the phone to the watch via bluetooth the

Migrate to AndroidX for Wear Support Libraries after Android Pie?

▼魔方 西西 提交于 2019-12-11 15:20:02
问题 Starting in Fall of 2019 the Google Play Console requires your wearable application targets at least Android 9 (API level 28). August 1, 2019: Required for new apps November 1, 2019: Required for app updates After changing my build.gradle to target 29 it gives me a warning recommending I use AndroidX libraries when targeting Android Q or newer. What should I change the com.android.support dependencies to? implementation 'com.android.support:wear:28.0.0' implementation 'com.android.support

How to get dimensions of a connected Android Wear device for making bitmaps smaller?

核能气质少年 提交于 2019-12-11 14:18:35
问题 I would like to resize large images for connected Android Wear device. I don't want to transmit large images over Bluetooth. Is there some generic way? I don't want to hardcode screen size for a specific device. 回答1: If you want such kind of optimizations you can ask particular device for a configuration (resolution etc.) For the communication you can use one of WearableApi: https://developer.android.com/training/wearables/data-layer/index.html Either DataApi or MessageApi. But I think you