wear-os

Wearable app does not install from mobile apk

梦想的初衷 提交于 2019-11-29 16:26:17
With the following Gradle files of my three modules (common, mobile, and wear), I was wondering why my wearable app doesn't install on the wearable device when I run the mobile app with both the wear virtual emulator and my mobile device running and connected (through USB and the Android wear app), and signed both apks through the mobile module (currently in the mobile directory): Common module: apply plugin: 'com.android.library' android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { minSdkVersion 9 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release

Sending data from an Activity to WearableListenerService

久未见 提交于 2019-11-29 14:46:26
问题 When I read about communication between an Activity and Service , I found that we can use either IBinder Messenger AIDL I am interested in the first two. So when I tried implementing this to communicate between an Activity and WearableListenerService , I needed to override the onBind function. But then, I am getting a compiler error saying it cannot override final method "onBind" I dont get such an error when I use a normal Service . So, 1. Does that mean we cannot use IBinder or Messenger

Android Wear, connect to bluetooth device

僤鯓⒐⒋嵵緔 提交于 2019-11-29 14:01:01
I want to connect a 3rd party bluetooth device to my Android Wear watch (Samsung Gear Live). I am trying to find documentation on how to do this but I am not having any luck. All the searches I do seem to think I want to attach to a phone. Does anyone know of a good example that shows how to connect, for example, a bluetooth heart rate monitor (or other device) to the Android Wear so I can keep a history when the phone isn't present? Is this even possible? Would it be the same protocols as doing it from a phone/tablet? It is not possible to connect 3rd party bluetooth devices to an Android

WearableListenerService onMessageReceived is not called on device

陌路散爱 提交于 2019-11-29 13:55:11
I am trying to send a simple message from my Android wear app to my phone app using the Wearable.MessageApi . This is my onConnected callback from GoogleApiClient on the Wear device. final PendingResult<Status> status = Wearable.DataApi.addListener(googleApiClient, this); status.setResultCallback(new ResultCallback<Status>() { @Override public void onResult(Status status) { if (!status.isSuccess()) { return; } NodeApi.GetConnectedNodesResult nodes = Wearable.NodeApi.getConnectedNodes(googleApiClient).await(); for (Node node : nodes.getNodes()) { System.out.println("Sending message: " + node

Round Android Wear Emulator is Square

泄露秘密 提交于 2019-11-29 11:59:49
问题 The title and picture say it all--my round android wear emulator shows the rect layout. I'd appreciate any tips that help me get the round emulator to show the correct interface. Created AVD using instructions from: Android Documentation Android Studio 0.8.1 Beta, SDK Tools 23.0.2, Wear target is 4.4W(API 20) Creating the AVD using Wayne's Command Line method created an AVD that shows the correct UI 回答1: Make sure when you create you AVD that you select the following options for a round

How to create an Android Wear app with the note-taking voice action?

為{幸葍}努か 提交于 2019-11-29 11:56:00
I can't seem to figure out how to create an Android Wear application which would allow me to use it to take notes via built-in voice actions. I declare the intent filter as stated in Adding Voice Capabilities : <intent-filter> <action android:name="android.intent.action.SEND"/> <category android:name="com.google.android.voicesearch.SELF_NOTE"/> </intent-filter> However, that does nothing, and the Wear app on the phone doesn't allow me to set the application as the default note-taking app. What do I need to do to make that happen? The trick is to include the category android.intent.category

Android wear not show notification

心已入冬 提交于 2019-11-29 11:31:08
I've probblem. My android wear emulator not show notification. Here is my code for mobile: private void notifyToWear() { NotificationCompat.WearableExtender wearableExtender = new NotificationCompat.WearableExtender() .setHintShowBackgroundOnly(true); NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_launcher) .setContentTitle("Request text") .setContentText("Speak something then your phone will search it.") .extend(wearableExtender); NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);

Android Wear - start wear activity from handheld action

别说谁变了你拦得住时间么 提交于 2019-11-29 11:04:55
I'm sending a notification from an android handheld device to an android wear device. I'd like to include an action with the notification that starts an activity on the android wear device. How do I set the pending intent to an activity on the wear device? I'm able to launch the activity if the notification is created on the wearable, but not if the notification is created on the phone and then sent to the wearable. // creating action for push notification created on handheld public NotificationCompat.Action CreateWearAppAction(Integer metricId) { // I wasnt able to look up the wear's main

android wear - eclipse : not recognizing support library

拟墨画扇 提交于 2019-11-29 10:44:01
Im trying to develop with the new Wear sdk. I have downloaded everyting needed including support libraries and set up android wear to go. the problem I have is that the project cant find the wearable libararies. code error lines example: WatchActivity cannot be resolved to a type and The import android.support.wearable cannot be resolved Thank you, Yakir. I've gone through the same issues using Eclipse and the answer to my problem was following link that I've found: http://blog.benjamin-cabe.com/2014/07/04/how-to-setup-eclipse-for-android-wear-development WatchActivity: just don't use

Android Wear generate two apk

我怕爱的太早我们不能终老 提交于 2019-11-29 09:18:18
I just created my first android wear app. I have two modules, mobile and wear. I have on my mobile module a dependency that points to the wear module as described on the documentation. When I generate the apk I end up with two apks, one called mobile and one called wear. Should I just ignore the wear apk or did I not do something right? I think that there should only be one apk. There are two apks because (for debugging/testing) you can (and should) install the wear apk directy on the Android Wear device. However, when you are going to publish the "Android Wear-ready" app to the Play Store,