如何在Android Wear中支持新的环境模式? [英] How to support new ambient mode in android wear?

查看:127
本文介绍了如何在Android Wear中支持新的环境模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自上次更新以来,Android Wear具有一项新功能-始终在线模式.这意味着Android Wear设备不会关闭屏幕;它更改为环境模式以节省电池并保持某些应用程序在后台运行.

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.

我应该如何实现呢?

p.s.我正在开发运动应用程序,而不是表面.

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

推荐答案

您正在寻找的是如何在Wear应用程序的活动中支持环境模式".

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

以及代码示例:

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

这篇关于如何在Android Wear中支持新的环境模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆