check By Emulator Build - Android Android OS

Android examples for Android OS:OS Build

Description

check By Emulator Build

Demo Code

public class Main {

   static boolean checkByEmulatorBuild() {
    String BOARD = android.os.Build.BOARD;
    String BOOTLOADER = android.os.Build.BOOTLOADER;
    String BRAND = android.os.Build.BRAND;
    String DEVICE = android.os.Build.DEVICE;
    String HARDWARE = android.os.Build.HARDWARE;
    String MODEL = android.os.Build.MODEL;
    String PRODUCT = android.os.Build.PRODUCT;
    if (BOARD == "unknown" || BOOTLOADER == "unknown" || BRAND == "generic" || DEVICE == "generic" || MODEL == "sdk"
        || PRODUCT == "sdk" || HARDWARE == "goldfish") {
      return true;
    }//  www.ja  va  2s  .c  om
    return false;
  }
}

Related Tutorials