Monday, July 20, 2015

How to recognize that CyanogenMod in Android


static public boolean checkCyanogenMod() {
final Properties properties = System.getProperties();
String version = properties.getProperty("os.version");
final PackageManager pm = getAppContext().getPackageManager();

if (version.contains("cyanogenmod") || version.contains("-CM-")
|| pm.hasSystemFeature("com.cyanogenmod.account")
|| pm.hasSystemFeature("com.cyanogenmod.updater")) {
return true;
}

return false;
}

No comments:

Post a Comment