从App启动Android Market [英] Start Android Market from App

查看:93
本文介绍了从App启动Android Market的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Android上的应用开发精简版。如何启动Intent以打开Android Market,最好显示我的应用程序的完整版本?这很难在模拟器上测试(这是我最接近的设备),因为似乎没有合法的方法在其上安装市场。

I'm developing a lite version for an app on the Android. How can I start an Intent to open the Android Market, preferably with the full version of my app displayed? This is difficult to test on an emulator (which is the closest thing to a device I have), as there seems to be no legal way of installing the Market on it.

推荐答案

最后找到答案:

Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setData(Uri.parse("market://search?q=pname:MyApp")); 
startActivity(intent);

但是,无法在模拟器上进行测试。

No way of testing on emulator, though.

这篇关于从App启动Android Market的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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