Android examples for Android OS:OS Build
check By Emulator Build
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; } }