Code base on gingo/android-emulator-detector 用于沙箱检测
Add it to your build.gradle with:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
and:
dependencies {
compile 'com.github.coleflowers:android-emulator-detector-android-studio:1.0.2'
}
and:
import net.skoumal.emulatordetector.EmulatorDetector;
if (EmulatorDetector.isEmulator()){
// do something
} else {
// do something
}