We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
见文档:https://dev.mi.com/console/doc/detail?pId=1159 代码修改如下
// /** //// * 判断是否为MIUI6以上 //// */ //// public static boolean isMIUI6Later() { //// try { //// Class<?> clz = Class.forName("android.os.SystemProperties"); //// Method mtd = clz.getMethod("get", String.class); //// String val = (String) mtd.invoke(null, "ro.miui.ui.version.name"); //// val = val.replaceAll("[vV]", ""); //// int version = Integer.parseInt(val); //// return version >= 6; //// } catch (Exception e) { //// return false; //// } //// } /** * 判断是否为MIUI6以上9以下 */ public static boolean isMIUI6LaterAnd9Before() { try { Class<?> clz = Class.forName("android.os.SystemProperties"); Method mtd = clz.getMethod("get", String.class); String val = (String) mtd.invoke(null, "ro.miui.ui.version.name"); val = val.replaceAll("[vV]", ""); int version = Integer.parseInt(val); return version >= 6 && version < 9; } catch (Exception e) { return false; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
见文档:https://dev.mi.com/console/doc/detail?pId=1159
代码修改如下
The text was updated successfully, but these errors were encountered: