IT影子

关注

Android开发判断是否为鸿蒙系统

IT影子

关注

阅读 75

2022-05-16

public static boolean isHarmonyOs(){
try {
Class<?> buildExClass = Class.forName("com.huawei.system.BuildEx");
Object osBrand = buildExClass.getMethod("getOsBrand").invoke(buildExClass);
return "harmony".equalsIgnoreCase(osBrand.toString());
}catch (Throwable e){
return false;
}
}




相关推荐

戴老师成长记录仪

Android java判断是否为false

戴老师成长记录仪 56 0 0

微笑沉默

Android判断字符是否为空

微笑沉默 186 0 0

sullay

Android系统开发-判断相机是否在使用

sullay 23 0 0

修炼之士

Android 判断图片是否为动图处理

修炼之士 87 0 0

洒在心头的阳光

判断是否为素数

洒在心头的阳光 63 0 0

辰鑫chenxin

判断是否为质数

辰鑫chenxin 89 0 0

林肯公园_97cc

判断是否为数字

林肯公园_97cc 75 0 0

若如初梘

android app 判断是否有系统签名

若如初梘 67 0 0

月孛星君

java判断是否为int

月孛星君 57 0 0

向上的萝卜白菜

java判断是否为子集

向上的萝卜白菜 43 0 0

精彩评论(0)

0 0 举报