本文为个人学习笔记分享,没有任何商业化行为,对其他文章的引用都会标记。如有侵权行为,请及时提醒更正!如需转载请表明出处
在做Push聚合适配的时候需要对不同的品牌加载不同的策略,如何判断手机厂商呢?
android.os.Build.BRAND
/** The consumer-visible brand with which the product/hardware will be associated, if any. */
public static final String BRAND = getString("ro.product.brand");
String brand = android.os.Build.BRAND;
/**
* 手机品牌
*/
// 小米
public static final String PHONE_XIAOMI = "xiaomi";
// 华为
public static final String PHONE_HUAWEI1 = "Huawei";
// 华为
public static final String PHONE_HUAWEI2 = "HUAWEI";
// 华为
public static final String PHONE_HUAWEI3 = "HONOR";
// 魅族
public static final Strin