How do you create a stub application that only directs users to download the full version on Google Play?(您如何创建仅引导用户在 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 上下载完整版本的存根应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:您如何创建仅引导用户在 Google Play 上下载完整版本的存根应用程序?
基础教程推荐
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
