问题
I would like check real device user or virtual device user (like AVD, Genymotion, bluestack something like that)
My app is checked device id and rewarded. if abusing users are running app in virtual device, you now I'll be a beggar :(
回答1:
You can use checks like this:
public boolean isGenymotionEmulator(String buildManufacturer) {
return buildManufacturer != null &&
(buildManufacturer.contains("Genymotion") || buildManufacturer.equals("unknown"));
}
public boolean buildModelContainsEmulatorHints(String buildModel) {
return buildModel.startsWith("sdk")
|| "google_sdk".equals(buildModel)
|| buildModel.contains("Emulator")
|| buildModel.contains("Android SDK");
}
来源:https://stackoverflow.com/questions/32732585/how-to-check-android-app-is-running-in-real-device-or-virtual-device