中国优质的IT技术网站
专业IT技术创作平台
IT职业在线教育平台
现在我开发了一个鸿蒙应用,点击按钮,需要打开微信,请问怎么实现
微信扫码分享
Intent intent = new Intent(); Set<String> entities = new HashSet<>(); entities.add("android.intent.category.LAUNCHER"); Operation operation = new Intent.OperationBuilder() .withDeviceId("") .withBundleName("com.tencent.mm") .withAbilityName("com.tencent.mm.ui.LauncherUI") .withAction("android.intent.action.MAIN") .withFlags(Intent.FLAG_NOT_OHOS_COMPONENT) .withEntities(entities) .build(); intent.setOperation(operation); startAbility(intent);