wear

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

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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 : 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? 回答1: The trick is to include the category android.intent.category.DEFAULT , as stated in the documentation on intents . If it is missing, no implicit intents can be

WearableListenerService, onDataChanged() is not called

匿名 (未验证) 提交于 2019-12-03 01:17:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I followed the tutorial to invoke a Wearable activity from phone, posted here How to send notification from handheld to wear to open Activity on wear device . However, I grab the source code from the answer. However, I couldn't get it running. It looks like onDataChanged() is never called. I ask this as a question on its own because it seems the example works for others. I'm on KitKat 4.4.2, if that matters. Any tip where to check, thanks. 回答1: There are two things you can check: packageName of the wear app should be identical to packageName

Android Wear开发系列教程——搭建开发环境

和自甴很熟 提交于 2019-11-29 19:06:30
前言 很久没有写博客了,伴随着谷歌发布新的Android Wear开发平台,笔者还是决定写点东西了。在接下来的一段时间里,我将跟大家一起去研究这个会被穿在身上的系统。俗话说,工欲善其事必先利其器,今天我们首先要讲的就是搭建开发环境。 IDE 首先说一下我们这一次要用到的IDE,这次我们会用到Android Studio,这款IDE是谷歌针对Android开发推出的一款IDE,对于Android开发做出了多处的优化。对于之前没有使用过的同学可能一开始会感觉有所不便,不过相信上手之后就会慢慢习惯的。 Android Studio的下载地址是: http://developer.android.com/sdk/installing/studio.html 。当然,由于是谷歌的服务,因为众所周知的原因,这需要一些技巧,由于这涉嫌违规,笔者不便多说。有个网友上传了一个奇怪的东西,也不知道是用来做什么的: http://pan.baidu.com/share/home?uk=3023992890#category/type=0 。 下载SDK 下载完Android Studio之后,点击 ,打开SDK Manager,下载Android Wear需要的SDK文件, ,当然,有条件的我推荐把示例代码也下载下来,我在之后的教程中会选取部分谷歌的示例程序进行讲解