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 received by the app. Besides that, it is important to include the MIME type text/plain. The complete declaration is as follows:



回答2:

@Malcolm answer with add this line also. It will be working fine.

The full part is



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!