简体   繁体   English

直接在Play商店中打开应用

[英]Opening an app directly on play store

I am using sharing intent to share my apps link to users via whatsapp,gmail,twitter...etc.. 我正在使用共享意图通过whatsapp,gmail,twitter等将我的应用程序链接共享给用户。

For example if the link is market://details?id=com.imangi.templerun&hl=en 例如,如果链接是market:// details?id = com.imangi.templerun&hl = zh-CN

It just gets posted as plain text and is not clickable. 它只是以纯文本形式发布,并且不可单击。

I tried using http://market.android.com/details?id=com.imangi.templerun&hl=en But the user has to choose another option after clicking the link such as OPEN WITH Chrome or Playstore... 我尝试使用http://market.android.com/details?id=com.imangi.templerun&hl=zh_CN,但是用户必须在点击链接后选择其他选项,例如OPEN WITH Chrome或Playstore ...

What i want to accomplish is once the user clicks, the app should open on the play store... Any suggestions and help would be grateful .. Thanks. 我要实现的是,一旦用户单击,应用程序应在Play商店中打开。任何建议和帮助都将不胜感激..谢谢。

Have a look at this link at stackoverflow . 看一下stackoverflow上的这个链接 You willget answer to your question. 您将得到问题的答案。 market:// is not clickable by default. 默认情况下,market://是不可单击的。 You need to implement click event for view containing this text. 您需要为包含此文本的视图实现click事件。

Try this code to open url directly in play store: 尝试使用以下代码直接在Play商店中打开url:

String url = "http://market.android.com/details?id=com.imangi.templerun&hl=en";
        Intent i = new Intent(Intent.ACTION_VIEW);
        i.setData(Uri.parse(url));
        i.setPackage("com.android.vending");/* Play store package name */
        startActivity(i);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android App-Index开放Play商店 - Android App-Index Opening Play Store Deeplink网址可用于播放商店/应用商店,但无法安装(如果已安装) - Deeplink url takes to play store/app store but not opening app if installed Android:如何直接进入Play商店中应用的下载页面 - Android : How to directly go to the download page of an app in play store Android-Google Play商店关闭应用程序以进行更新,但此后未打开 - Android - Google Play Store closes app for update and not opening it afterwards 在Google Play商店中打开应用 - Opening apps in the Google Play Store 如何从我的 PhoneGap/Cordova 应用程序直接导航到 Google Play 商店中的应用程序? - How do I navigate directly to an app in the Google Play Store from my PhoneGap/Cordova application? 从我们在Android中的应用程序直接打开Play商店评级屏幕 - Directly open up the Play store rating screen from our app in android 我们可以直接从我的应用程序安装Google Play商店应用程序吗? - Can we install google play store applications directly from my app? 将APK直接放到手机上,但从Google Play商店中取出后,我的应用程序崩溃 - My app works when apk put directly onto phone but when taken from Google Play store it crashes 点击应用链接不会直接打开免安装应用 - Clicking on app link is not opening instant app directly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM