工作中有个需求,需要在自己的app里面调起其他应用的指定页面,在朋友的提醒下,用手机连着studio 调试,打开你要打开的应用,通过查看logcat 的输出日志,可以查看到他的 schema 路径,然后在自己的项目中写入以下代码既可以唤起:
String url = "snssdk1128://user/profile/95627491132?refer=web&gd_label=click_wap_profile_bottom&type=need_follow&needlaunchlog=1"; try { Uri uri = Uri.parse(url); Intent intent = new Intent(Intent.ACTION_VIEW, uri); intent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT); startActivity(intent); } catch (Exception e) { e.printStackTrace(); }
上面的url是通过在logcat里面找到的