wear-os

Cannot send an Asset to an Android Wear device

ぐ巨炮叔叔 提交于 2019-12-12 07:17:04
问题 I'm trying to send an Asset to my Sony SmartWatch3. I followed the Google's documentation (https://developer.android.com/training/wearables/data-layer/assets.html) but it doesn't work. My handheld activity's code : public class MainActivityHandheld extends ActionBarActivity { private GoogleApiClient mGoogleApiClient; private static final String MY_KEY = "com.example.andy.key.mykey"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

android-wear embedding old (cached) wear apk in the mobile-release apk

醉酒当歌 提交于 2019-12-12 07:15:48
问题 I am generating the signed apk using the option Build -> Generate Signed APK Problem is mobile-release.apk doesn't embed the updated wear apk. I have tried changing text / logic, but it always display the old thing. I have tried all of the following, any ideas why it keep embedding the old wear apk instead of creating the new one. File -> Invalidate cache / Restart. Build -> Clean + Rebuild project Clear cache of wear app on phone Settings -> Resync all apps (option on handheld wear app)

Launching an activity on micro app (android wearable)

依然范特西╮ 提交于 2019-12-12 06:39:42
问题 I am creating notification from my app on Phone in the below way. private void launchMicroAppFromWearableNotif() { int notificationId = 001; // The below action has been defined in the micro app Intent i = new Intent("com.microapp.action.PLAY_MUSIC"); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent playPendingIntent = PendingIntent.getActivity(this, 0, i, 0); NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.play_music)

Android Wear Round Emulator inflating Square Layout

一笑奈何 提交于 2019-12-12 06:04:48
问题 I first want to say that I know there are already questions like this one on here, but none of them fixed this issue I am using the Round Android Wear Emulator (Android 5.0.1 and x86) on Ubuntu. The screen appears round, and all other features on the emulator (set watch face, cards) appear as they would on a round watch. However in my app, I am using a WatchViewStub, and the round emulator is inflating the square layout despite me specifying the following in the layout: app:rectLayout="

onDataChanged isn´t called on android wear

一曲冷凌霜 提交于 2019-12-12 06:01:45
问题 I want to send just simple Strings from Smartphone to android wear. I looked in this Question before: Unable to push data to android wear (Emulator) and tried to do the same way, but onDataChanged only when i delete the hole App on my Phone, but not when push StringstoWear is called. Hope for Help... Here is my Code on Phone: package de.gruppe8.culturehelper; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import

Insistent notification on Android Wear

心不动则不痛 提交于 2019-12-12 06:00:07
问题 Notification.FLAG_INSISTENT works on my Android device. Notification vibrates and sounds repeatedly. However it only vibrates once on my Android Wear. I have followed the Android Developer guide to create an Android Wear notification, but no luck. https://developer.android.com/training/wearables/notifications/creating.html I want the effect of the stock Android Alarm Clock app's notification. Any hint before I dig into the source code of the app? 回答1: You need to add an Android Wear app to

Android wearable GPS on moto 360 gen 1

ぃ、小莉子 提交于 2019-12-12 05:16:27
问题 I would like to develop a app on the moto 360 that gets the users current gps coordinates, is this possible even though they say it doesnt have built in gps connectivity? The reason I ask is it also says you can "track your watches location".. How would this be possible if it doesnt have gps? Does it just use the host device for this? 回答1: Is this possible even though they say it doesnt have built in gps connectivity? Yes it is possible, based on the document "Detecting Location on Android

Android Wear - Unexpected error code 16

三世轮回 提交于 2019-12-12 04:55:09
问题 I have an app that uses Android Wear API. To create it I followed the guides here: https://developer.android.com/training/building-wearables.html I access the wearable APIs using: new GoogleApiClient.Builder(context) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(Wearable.API) .build(); In my onConnectionFailedListener , I am getting an error code 16, resulting in a popup to the user saying "GooglePlayServicesUtil﹕ Unexpected error code 16". @Override public void

How to download an image on Android wear?

本小妞迷上赌 提交于 2019-12-12 04:53:08
问题 I have an ArrayList of Serialization objects on my handheld. I found a solution to send it to my wearable device. Can I send custom objects to Android Wear? In my Object I have the URL of an image and in my handheld I am using Picasso to download the image from the URL (es in a ImageView). Can I download the image in the wearable? (I think no). Should I download all the images of the ArrayList in the handheld and send it putting them as assets in a DataMap? 回答1: You can't download images

WearableListenerService only handles onMessageReceived() on second try

送分小仙女□ 提交于 2019-12-12 04:49:38
问题 I've got a simple Android Wear demo to illustrate the Message API. I'm capturing input on a watch and passing it off to a handheld device for cloud processing, so the following class that extends WearableListenerService is running on a phone: public class ListenerService extends WearableListenerService { private static final String MESSAGE_PATH = "/handle-inbound-message"; @Override public void onMessageReceived(MessageEvent messageEvent) { super.onMessageReceived(messageEvent); if