有没有办法从指定餐厅的其他应用程序中打开tripadvisor应用程序,就像我们在Facebook页面或play商店中所做的那样?
如下所示:
context.getPackageManager().getPackageInfo("/*tripadvisor package*/", 0);
return new Intent(Intent.ACTION_VIEW,Uri.parse("trip://resturant/313689422066566"));我试着在网上搜索,但没有找到任何有用的东西。有人知道吗?
发布于 2015-08-22 21:32:56
我找到了一个方法..。如果你尝试这样写:
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(link_tripadvisor));
startActivity(browserIntent);您可以选择是使用浏览器还是应用程序打开它
发布于 2013-11-19 20:43:35
尝试使用
Intent i;
PackageManager manager = getPackageManager();
try {
i = manager.getLaunchIntentForPackage("app package name");
if (i == null)
throw new PackageManager.NameNotFoundException();
i.addCategory(Intent.CATEGORY_LAUNCHER);
startActivity(i);
}
catch (PackageManager.NameNotFoundException e) {
}https://stackoverflow.com/questions/20071488
复制相似问题