is Xiao Mi - Android Hardware

Android examples for Hardware:Vendor

Description

is Xiao Mi

Demo Code


//package com.java2s;

import android.util.Log;

public class Main {
    private static final String TAG = "CameraHelper";

    public static boolean isXiaoMi3() {
        String model = android.os.Build.MODEL;
        String manufacturer = android.os.Build.MANUFACTURER;
        Log.i(TAG, "model: " + model);
        Log.i(TAG, "manufacturer: " + manufacturer);
        if ("Xiaomi".equalsIgnoreCase(manufacturer)
                && "MI 3".equalsIgnoreCase(model)) {
            return true;
        } else {/*from  www.  j av  a  2  s. co  m*/
            return false;
        }
    }
}

Related Tutorials