您如何创建仅引导用户在 Google Play 上下载完整版本的存根应用程序?

How do you create a stub application that only directs users to download the full version on Google Play?(您如何创建仅引导用户在 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 上下载完整版本的存根应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)