以下代码从我的android应用程序打开Play商店:
final String appPackageName = getPackageName();
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri
.parse("market://details?id=" + appPackageName)));
} catch (android.content.ActivityNotFoundException anfe) {
startActivity(new Intent(
Intent.ACTION_VIEW,
Uri.parse("http://play.google.com/store/apps/details?id="
+ appPackageName)));
}
我以编程方式希望用户在Play商店打开后立即查看其所有“文件资源管理器”的搜索结果。当我激发意图时,我看到的是Picture1。是否有可能?提前致谢。
试试这个:
startActivity(new Intent(Intent.ACTION_VIEW, Uri
.parse("market://search?q=File%20Explorers")));
将“ market://”解析为Google Play商店的网址,“ search?q = File%20Explorers”将打开搜索给定参数。%20
是空格的编码。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句