[英]Add settings to WatchFace in Android Wear app
I noticed that some WatchFaces have an option "Get Companion App", clicking on this setting Android Wear leads user to Google Play page of the relevant application. 我注意到有些WatchFaces具有“获取伴侣应用程序”选项,单击此设置,Android Wear会将用户引导至相关应用程序的Google Play页面。
How is it possible to implement so? 如何实现呢?
This question is really too broad to provide a complete answer here. 这个问题的确涉及面太广,无法在此处提供完整的答案。 But at a high level, here's how you'd implement it:
但是,从高层次上讲,这是实现方式:
PreferenceScreen
. PreferenceScreen
构建的单独应用。 This is your companion app. Preference
values to your watch face. Preference
值发送到您的表盘。 Obviously, there are a lot of details to each step - but they're all well documented elsewhere. 显然,每个步骤都有很多细节-但在其他地方都有充分的文献记载。 I'd also suggest that you look at (or build from) Google's example watch face app, https://developer.android.com/samples/WatchFace , which includes a handheld configuration app.
我还建议您查看Google的示例表面应用程序https://developer.android.com/samples/WatchFace (或从其构建),该应用程序包括一个手持式配置应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.