android判断是否是华为或鸿蒙系统
public String getPhoneBrand() {String manufacturer = Build.MANUFACTURER;if (manufacturer != null && manufacturer.length() > 0) {return manufacturer.toLowerCase();} else {return "unknown"...
·
public String getPhoneBrand() {
String manufacturer = Build.MANUFACTURER;
if (manufacturer != null && manufacturer.length() > 0) {
return manufacturer.toLowerCase();
} else {
return "unknown";
}
}
public String isHuaWei(){
String phoneBrand = getPhoneBrand();
return phoneBrand.contains("HUAWEI") || phoneBrand.contains("OCE")
|| phoneBrand.contains("huawei") || phoneBrand.contains("honor");
}
更多推荐
已为社区贡献2条内容
所有评论(0)