当前位置:   article > 正文

小米如何跳转至应用详情页面?_小米应用商店旧版详情页停用,新版如何跳转

小米应用商店旧版详情页停用,新版如何跳转
Intent intent = new Intent();
intent.setComponent(ComponentName.unflattenFromString("com.miui.securitycenter/com.miui.appmanager.ApplicationsDetailsActivity"));
intent.putExtra("package_name", activity.getPackageName());
intent.putExtra("package_label", activity.getString(R.string.app_name));
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
PackageManager packageManager = HSApplication.getContext().getPackageManager();
List activities = packageManager.queryIntentActivities(intent,
        PackageManager.MATCH_DEFAULT_ONLY);
if (activities.size() > 0) {
    try {
        activity.startActivity(intent);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/378242
推荐阅读
相关标签
  

闽ICP备14008679号