阻止应用程序在Bluestacks,Youwave和其他模拟器中运行 [英] Blocking app from running in bluestacks, youwave and other emulators
问题描述
我想阻止我的应用程序在bluestacks/youwave等模拟器中运行.无论如何,我是否可以阻止甚至确定用户是否在bluestacks/youwave中运行?我的应用程序具有登录功能.因此它也可以使用服务器,所以我不介意在客户端/服务器端阻止该用户,只要他被阻止即可.任何帮助将不胜感激.
I would like to block my app from running in emulators such as bluestacks/youwave etc. Is there anyway I can block or even identify if the user is running in bluestacks/youwave? My app has logging in features. So it users the server as well, so I dont mind blocking the user at clientside/serverside as long as he's blocked. Any help would be greatly appreciated.
推荐答案
1:检查SIM卡号,并拒绝访问无SIM卡号的人.这包括平板电脑,因为您已声明要阻止它们.
Java:
1: Check for SIM Number and deny access to whoever has none. This includes tablets since you stated that you wanted to block them.
Java:
TelephonyManager telemamanger = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String getSimSerialNumber = telemamanger.getSimSerialNumber();
String getSimNumber = telemamanger.getLine1Number();
Manifest.xml:
Manifest.xml:
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
2.仿真器内核检查.
如果#1由于用户对其仿真器的修改而失败,请检查(ro.kernel.qemu == 1).该属性是只读的,对于模拟器,它将始终返回1.
2. Emulator kernel check.
If #1 fails because of user modifications to their emulator, check if (ro.kernel.qemu == 1). This property is read-only and will always return 1 for emulators.
这篇关于阻止应用程序在Bluestacks,Youwave和其他模拟器中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!