How to support new ambient mode in android wear?

ぐ巨炮叔叔 提交于 2019-12-08 10:32:17

问题


Since last update Android Wear has a new feature - the always-on mode. This means that the Android Wear device doesn’t turn off the screen; it changes to the ambient mode to save battery and keeps certain apps running in the background.

How exactly should I implement this?

p.s. I'm developing sport application, not watchface.


回答1:


What you're looking for is how to support "Ambient Mode" in your Wear app's activity.

There is an entire doc dedicated to this:

http://developer.android.com/training/wearables/apps/always-on.html

As well as a code sample:

https://github.com/googlesamples/android-AlwaysOn/




回答2:


We have also created a code lab to run through the steps. Please find it here:

https://io2015codelabs.appspot.com/codelabs/always-on#1



来源:https://stackoverflow.com/questions/30606170/how-to-support-new-ambient-mode-in-android-wear

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