Java tutorial
//package com.java2s; //License from project: Open Source License import android.os.Build; public class Main { /** * Determines if the app is running in the Android emulator. * * http://stackoverflow.com/questions/2799097/ -> * how-can-i-detect-when-an-android-application-is-running-in-the-emulator * * @return True if running in the emulator. */ public static boolean isRunningInEmulator() { return Build.PRODUCT.equals("google_sdk") || Build.PRODUCT.equals("sdk") || Build.PRODUCT.equals("full_x86") || Build.FINGERPRINT.contains("generic"); } }