如何点击Android按钮然后去Google Play应用 [英] How to click on Android Button then go to google play apps

查看:180
本文介绍了如何点击Android按钮然后去Google Play应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何让一款Android按钮可以点击并重定向用户到Google Play。

例如:我想用户点击后按钮在我的活动用户发送到Android应用(https://play.google.com/store/apps/details?id=com.theopen.android)

如何做到这一点?

问候,


解决方案

  Button.setOnClickListener(新OnClickListener(){
   公共无效的onClick(视图v){
   鉴于=(的WebView)findViewById(R.id.w);
   view.loadUrl(https://play.google.com/store/apps/details?id=com);
}
});

I wonder how to make a android button can click and redirect user to google play.

Example: I want send user to android apps(https://play.google.com/store/apps/details?id=com.theopen.android) after user click on Button in my activity.

How to do this?

Regards,

解决方案

Button.setOnClickListener(new OnClickListener() {
   public void onClick(View v) {
   view=(WebView) findViewById(R.id.w);
   view.loadUrl("https://play.google.com/store/apps/details?id=com");
}
});

这篇关于如何点击Android按钮然后去Google Play应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆