安卓是否有什么方法来检测的CyanogenMod及其版本?有什么、方法来、版本、CyanogenMod

2023-09-13 01:47:28 作者:绕过椅背

我的工作,需要均衡器是Android的媒体播放器。然而,均衡器仅适用于姜饼及以上,但的CyanogenMod 6已经修改audioflinger充当均衡器,所以我想检测操作系统版本。

I'm working on an android media player which needs equalizer. However, equalizer is only available on Gingerbread and above, but cyanogenmod 6 has modified audioflinger to act as equalizer, so I want to detect OS version.

推荐答案

您可以阅读 os.version 财产和对阵是:

You can read the os.version property and match against that:

String version = System.getProperty("os.version");
if (version.contains("cyanogenmod")) {
    isCyanogenMode = true;
}

在我的设备, os.version 2.6.37.6-的CyanogenMod-01509-g8913be8