framgia / android-emulator-detector

Easy to detect android emulator
Apache License 2.0
425 stars 98 forks source link

TelephonyManager.getDeviceId will crash on Android 10 #29

Open oldbirdy opened 4 years ago

oldbirdy commented 4 years ago

https://developer.android.google.cn/reference/android/telephony/TelephonyManager.html#getDeviceId()

if the calling app is targeting API level 29 or higher, then a SecurityException is thrown.

saeidparvizi commented 4 years ago

You can use the following library. https://github.com/mofneko/EmulatorDetector