gpt4 book ai didi

android - 如何检测 Android Go?

转载 作者:行者123 更新时间:2023-12-04 23:39:30 24 4
gpt4 key购买 nike

有什么方法可以检测到该设备正在运行 Android Go 版本?需要确定设备是否能够提供 SYSTEM_ALERT_WINDOW从 API 29 开始。

根据引用,Settings.canDrawOverlays(Context context)在 API 29 Go 上将始终返回 false。不知道系统是否可以访问 SYSTEM_ALERT_WINDOW很难解决这个问题。

最佳答案

ActivityManager am = (ActivityManager) context.getSystemService(ACTIVITY_SERVICE);
am.isLowRamDevice();
ActivityManager.java 中提供以下代码
    /**
* Returns true if this is a low-RAM device. Exactly whether a device is low-RAM
* is ultimately up to the device configuration, but currently it generally means
* something with 1GB or less of RAM. This is mostly intended to be used by apps
* to determine whether they should turn off certain features that require more RAM.
*/
public boolean isLowRamDevice() {
return isLowRamDeviceStatic();
}

关于android - 如何检测 Android Go?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58340558/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com