code: protected static Boolean isEmulator() {
          try {
              return Build.FINGERPRINT.startsWith("generic")
                  || Build.FINGERPRINT.startsWith("unknown")
                  || Build.MODEL.contains("google_sdk")
                  || Build.MODEL.contains("Emulator")
                  || Build.MODEL.contains("Android SDK built for x86")
                  || Build.MANUFACTURER.contains("Genymotion")
                  || (Build.BRAND.startsWith("generic") && Build.DEVICE.startsWith("generic"))
                  || "google_sdk".equals(Build.PRODUCT);
          } catch (Exception e) {
              Log.e(TAG, "Error checking whether application is running in an emulator.", e);
              return null;
          }
      }
docs: Check whether the application is running in an emulator. http://stackoverflow.com/a/21505193
  
  @return true if the application is running in an emulator, false otherwise