androi 开发判断是模拟器 or 真机

isPrototyping = Build.BRAND.toLowerCase().indexOf("generic") != -1
                && Build.MODEL.toLowerCase().indexOf("sdk") != -1;

isPrototyping true:emulator false: device

猜你喜欢

转载自cyhmna.iteye.com/blog/1884276