简体   繁体   English

Android,佩戴操作系统。 检测 Always-On-Display 是否打开/关闭

[英]Android, Wear OS. Detect Always-On-Display is on/off

I'm trying to understand how you can determine that Always-On-Display mode is on/off.我试图了解您如何确定始终显示模式是开/关。 Before starting my process, I must know whether this option is selected in advance in the device's system menu.在开始我的过程之前,我必须知道是否在设备的系统菜单中提前选择了这个选项。 In the question (another question ), one way or another was given the answer, but this is not a direct way to identify it and it is limited in application.问题(另一个问题)中,给出了一种或另一种方式的答案,但这不是一种直接的识别方式,它的应用受到限制。

Is there a way to understand whether the Always-On-Display (AOD) option is enabled in Android and in particular Wear OS?有没有办法了解 Android 尤其是 Wear OS 中是否启用了 Always-On-Display (AOD) 选项?

I use Samsung Galaxy Watch 4 (SM-R860).我使用三星 Galaxy Watch 4 (SM-R860)。 I also did not find a way to understand this using Samsung's SDK.我也没有找到使用三星的 SDK 来理解这一点的方法。

In Activity:在活动中:

try {
    boolean ambientEnabled = Settings.Global.getInt(getContentResolver(), "ambient_enabled") == 1;
} catch (Exception e) {
    // handler
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM