当前位置: 首页> 汽车> 车展 > 免费商品列表网页模板源代码_深圳蚂蚁网络网站建设_今天有哪些新闻_济南网络推广公司

免费商品列表网页模板源代码_深圳蚂蚁网络网站建设_今天有哪些新闻_济南网络推广公司

时间:2025/7/11 16:09:30来源:https://blog.csdn.net/generallizhong/article/details/142338350 浏览次数: 0次
免费商品列表网页模板源代码_深圳蚂蚁网络网站建设_今天有哪些新闻_济南网络推广公司

一个识别工具类,android12-14测试有效,其他版本未测:

public class EmulatorDetectionUtil {private static final String[] PKG_NAMES = {"com.mumu.launcher", "com.ami.duosupdater.ui", "com.ami.launchmetro", "com.ami.syncduosservices", "com.bluestacks.home","com.bluestacks.windowsfilemanager", "com.bluestacks.settings", "com.bluestacks.bluestackslocationprovider", "com.bluestacks.appsettings", "com.bluestacks.bstfolder","com.bluestacks.BstCommandProcessor", "com.bluestacks.s2p", "com.bluestacks.setup", "com.bluestacks.appmart", "com.kaopu001.tiantianserver", "com.kpzs.helpercenter","com.kaopu001.tiantianime", "com.android.development_settings", "com.android.development", "com.android.customlocale2", "com.genymotion.superuser","com.genymotion.clipboardproxy", "com.uc.xxzs.keyboard", "com.uc.xxzs", "com.blue.huang17.agent", "com.blue.huang17.launcher", "com.blue.huang17.ime","com.microvirt.guide", "com.microvirt.market", "com.microvirt.memuime", "cn.itools.vm.launcher", "cn.itools.vm.proxy", "cn.itools.vm.softkeyboard","cn.itools.avdmarket", "com.syd.IME", "com.bignox.app.store.hd", "com.bignox.launcher", "com.bignox.app.phone", "com.bignox.app.noxservice", "com.android.noxpush","com.haimawan.push", "me.haima.helpcenter", "com.windroy.launcher", "com.windroy.superuser", "com.windroy.launcher", "com.windroy.ime", "com.android.flysilkworm","com.android.emu.inputservice", "com.tiantian.ime", "com.microvirt.launcher", "me.le8.androidassist", "com.vphone.helper", "com.vphone.launcher", "com.duoyi.giftcenter.giftcenter"};private static final String[] PATHS = {"/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "/system/lib/libc_malloc_debug_qemu.so", "/sys/qemu_trace", "/system/bin/qemu-props","/dev/socket/qemud", "/dev/qemu_pipe", "/dev/socket/baseband_genyd", "/dev/socket/genyd"};private static final String[] FILES = {"/data/data/com.android.flysilkworm", "/data/data/com.bluestacks.filemanager"};// 包名检测public static boolean isSimulator3(Context paramContext) {try {List pathList = new ArrayList();pathList = getInstalledSimulatorPackages(paramContext);if (pathList.size() == 0) {for (int i = 0; i < PATHS.length; i++)if (i == 0) {if (new File(PATHS[i]).exists()) continue;pathList.add(Integer.valueOf(i));} else {if (!new File(PATHS[i]).exists()) continue;pathList.add(Integer.valueOf(i));}}if (pathList.size() == 0) {pathList = loadApps(paramContext);}return (pathList.size() == 0 ? null : pathList.toString()) != null;} catch (Exception e) {e.printStackTrace();}return false;}private static List getInstalledSimulatorPackages(Context context) {ArrayList localArrayList = new ArrayList();try {for (int i = 0; i < PKG_NAMES.length; i++)try {context.getPackageManager().getPackageInfo(PKG_NAMES[i], PackageManager.COMPONENT_ENABLED_STATE_ENABLED);localArrayList.add(PKG_NAMES[i]);} catch (PackageManager.NameNotFoundException localNameNotFoundException) {}if (localArrayList.size() == 0) {for (int i = 0; i < FILES.length; i++) {if (new File(FILES[i]).exists())  // 检测的特定文件localArrayList.add(FILES[i]);}}} catch (Exception e) {e.printStackTrace();}return localArrayList;}public static List loadApps(Context context) {Intent intent = new Intent(Intent.ACTION_MAIN, null);intent.addCategory(Intent.CATEGORY_LAUNCHER);List<String> list = new ArrayList<>();List<ResolveInfo> apps = context.getPackageManager().queryIntentActivities(intent, 0);//for循环遍历ResolveInfo对象获取包名和类名for (int i = 0; i < apps.size(); i++) {ResolveInfo info = apps.get(i);String packageName = info.activityInfo.packageName;CharSequence cls = info.activityInfo.name;CharSequence name = info.activityInfo.loadLabel(context.getPackageManager());if (!TextUtils.isEmpty(packageName)) {if (packageName.contains("bluestacks")) {list.add("蓝叠");return list;}}}return list;}
}

在自带的模拟器上一般的设置都能,识别,三方的模拟器很难识别,此工具可以满足三方模拟器的识别成功率,可能也不是百分百管用。

关键字:免费商品列表网页模板源代码_深圳蚂蚁网络网站建设_今天有哪些新闻_济南网络推广公司

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: