Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/196.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android WebView:为什么我不能从WebView重定向到play store?_Android_Webview_Uiwebview_Android Webview_Webviewclient - Fatal编程技术网

Android WebView:为什么我不能从WebView重定向到play store?

Android WebView:为什么我不能从WebView重定向到play store?,android,webview,uiwebview,android-webview,webviewclient,Android,Webview,Uiwebview,Android Webview,Webviewclient,我正在尝试将url传递到webview,它应该重定向到play store,但它不起作用 我尝试的是: String url = "https://play.google.com/store/apps/details?id=com.matchify"; webView.loadUrl(url); 但是它只在webview中加载,我如何解决这个问题 提前感谢在play store应用程序使用上打开您的应用程序/任何其他应用程序的页面: startActivity(new Intent(Inten

我正在尝试将url传递到webview,它应该重定向到play store,但它不起作用

我尝试的是:

String url = "https://play.google.com/store/apps/details?id=com.matchify";
webView.loadUrl(url);
但是它只在webview中加载,我如何解决这个问题


提前感谢

在play store应用程序使用上打开您的应用程序/任何其他应用程序的页面:

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackName)));
其中appPackName是:

 String appPackName = getPackageName();
Play Store应用程序具有意图过滤器,该过滤器将侦听意图并启动uri(因为它以market://开头,它将打开Play Store。)如果要在浏览器中打开,请使用uri参数:

https://play.google.com/store/apps/details?id=" + appPackName

有用链接:

改用意图……没关系。是否可以从webview到play store?