Android examples for App:App Running
Determines if the app is running in the Android emulator.
//package com.java2s; import android.os.Build; public class Main { /**/* w ww. j av a2 s . c om*/ * 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"); } }