您如何创建仅引导用户在 Google Play 上下载完整版本的存根应用程序? [英] How do you create a stub application that only directs users to download the full version on Google Play?

查看:21
本文介绍了您如何创建仅引导用户在 Google Play 上下载完整版本的存根应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想创建一个存根应用程序,它只会在应用程序启动后引导用户在 Google Play 上下载完整版本.

Just looking to create a stub application that does nothing but direct the user to download the full version on Google Play once the application is launched.

我假设存根 apk 显然需要相同的包名称,使用相同的证书签名,但版本代码较低.一直只指向 Google Play 产品页面.这就是所有需要的吗?

I'm assuming the stub apk will obviously need the same package name, signed with the same certificate but have a lower version code. All while only pointing to the Google Play product page. Is that all that's needed?

您能否在从 Google Play 启动时获取 apk 更新,而不指示用户开始点击更新按钮?

Can you have the apk update upon launch from Google Play without directing the user to initiate clicking the update button?

谢谢!

推荐答案

试试这个:

final String appName = "com.example";
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+appName)));

请记住,用户可以没有安装 GooglePlay,在这种情况下,您想捕获 ActivityNotFoundException(或类似的东西),并提供指向浏览器的链接.

Remember that user can have no GooglePlay Installed, in that case you want to catch ActivityNotFoundException (or something like that), and give link to browser.

您的应用存根必须具有相同的包名称,并且必须使用与 GooglePlay 中相同的证书进行签名.

Your app stub has to have same package name, and must be signed with same certificate as one in GooglePlay.

这篇关于您如何创建仅引导用户在 Google Play 上下载完整版本的存根应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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