Example usage for android.os Build HARDWARE

List of usage examples for android.os Build HARDWARE

Introduction

In this page you can find the example usage for android.os Build HARDWARE.

Prototype

String HARDWARE

To view the source code for android.os Build HARDWARE.

Click Source Link

Document

The name of the hardware (from the kernel command line or /proc).

Usage

From source file:Main.java

public static String getHardwareName() {
    return Build.HARDWARE;
}

From source file:Main.java

private static boolean isEmulator() {
    return Build.HARDWARE.contains("goldfish");
}

From source file:Main.java

public static String GetDeviceInfo() {
    String deviceInfo = "Device={0};Hardware={1};ID={2};Model={3};Product={4};MANUFACTURER={5};User={6};";
    return String.format(deviceInfo, Build.DEVICE, Build.HARDWARE, Build.ID, Build.MODEL, Build.PRODUCT,
            Build.MANUFACTURER, Build.USER);
}

From source file:Main.java

public static boolean isExynosDevice() {
    if (mIsExynosDevice != null)
        return mIsExynosDevice;

    mIsExynosDevice = Build.HARDWARE.toLowerCase(Locale.US).contains("smdk");
    return mIsExynosDevice;
}

From source file:Main.java

public static void logDeviceInfo(String tag) {
    Log.d(tag,//w  ww  .  j  a v  a  2s  . c om
            "Android SDK: " + Build.VERSION.SDK_INT + ", " + "Release: " + Build.VERSION.RELEASE + ", "
                    + "Brand: " + Build.BRAND + ", " + "Device: " + Build.DEVICE + ", " + "Id: " + Build.ID
                    + ", " + "Hardware: " + Build.HARDWARE + ", " + "Manufacturer: " + Build.MANUFACTURER + ", "
                    + "Model: " + Build.MODEL + ", " + "Product: " + Build.PRODUCT);
}

From source file:Main.java

/** Information about the current build, taken from system properties. */
public static void logDeviceInfo(String tag) {
    Log.d(tag,/*w  w  w  .  j av  a 2s .  c om*/
            "Android SDK: " + Build.VERSION.SDK_INT + ", " + "Release: " + Build.VERSION.RELEASE + ", "
                    + "Brand: " + Build.BRAND + ", " + "Device: " + Build.DEVICE + ", " + "Id: " + Build.ID
                    + ", " + "Hardware: " + Build.HARDWARE + ", " + "Manufacturer: " + Build.MANUFACTURER + ", "
                    + "Model: " + Build.MODEL + ", " + "Product: " + Build.PRODUCT);
}

From source file:Main.java

public static boolean runningOnEmulator() {
    return Build.HARDWARE.equals("goldfish") && Build.BRAND.startsWith("generic_");
}

From source file:Main.java

public static String getHardware() {
    return Build.HARDWARE;
}

From source file:Main.java

public static boolean isRunningOnEmulator() {
    return Build.BRAND.contains("generic") || Build.DEVICE.contains("generic") || Build.PRODUCT.contains("sdk")
            || Build.HARDWARE.contains("goldfish") || Build.MANUFACTURER.contains("Genymotion")
            || Build.PRODUCT.contains("vbox86p") || Build.DEVICE.contains("vbox86p")
            || Build.HARDWARE.contains("vbox86");
}

From source file:altermarkive.uploader.Report.java

private static JSONObject reportDevice(Context context) throws JSONException {
    JSONObject device = new JSONObject();
    device.put("id", hash(id(context)));
    device.put("manufacturer", Build.MANUFACTURER);
    device.put("brand", Build.BRAND);
    device.put("product", Build.PRODUCT);
    device.put("model", Build.MODEL);
    device.put("design", Build.DEVICE);
    device.put("board", Build.BOARD);
    device.put("hardware", Build.HARDWARE);
    device.put("build", Build.FINGERPRINT);
    return device;
}