我想要打开另一个应用并打开其中的某个页面!在他们的指南中,他们建议使用以下代码作为默认操作
android.intent.action.VIEW
使用意图的一种,如下所示,前往特定页面:
somecompany://details?id=com.example.calendar
但是我不知道如何做!我尝试了很多解决方案,但都失败了!
谢谢你的帮助。
我想要打开另一个应用并打开其中的某个页面!在他们的指南中,他们建议使用以下代码作为默认操作
android.intent.action.VIEW
使用意图的一种,如下所示,前往特定页面:
somecompany://details?id=com.example.calendar
我想这就是你所询问的内容。这将会在 Google Play 商店中打开特定应用的页面。
startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse(
"market://details?id=com.mycompany.mypackage")));
不要替换"市场"这个词。这是Android专门保留用来打开Google Play商店的。
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, "video/mp4");