我想检查真实设备用户或虚拟设备用户(如 AVD、Genymotion、bluestack 之类的)
I would like check real device user or virtual device user (like AVD, Genymotion, bluestack something like that)
我的应用程序已检查设备 ID 并获得奖励.如果滥用用户在虚拟设备中运行应用程序,你现在我就是一个乞丐:(
My app is checked device id and rewarded. if abusing users are running app in virtual device, you now I'll be a beggar :(
你可以像这样使用检查:
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");
}
这篇关于如何检查 Android 应用程序是在真实设备还是虚拟设备中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!