Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { public static boolean isMIOSPhone() { String model = android.os.Build.MODEL; boolean isMi = false; if (!TextUtils.isEmpty(model)) { isMi = model.startsWith("Mi"); } if (!isMi) { String manu = android.os.Build.MANUFACTURER; isMi = (manu != null) ? "Xiaomi".equalsIgnoreCase(manu) : false; } return isMi; } }