[英]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.