如何在Android 11&#x2B上进行编程检测如果我们的应用程序是从Google Play安装的

发布于 2025-02-11 01:01:09 字数 493 浏览 1 评论 0原文

由于“无效的交通问题”,ADMOB广告服务仅限于某些应用程序。我意识到这些应用程序已在某些国家 /地区的Google Play外安装。 (例如 - https://www.9apps.com/bn/bn/android-android-apps )。

如果未从Google Play下载该应用程序,我想禁用广告。因此,是否可以从Google Play下载应用程序?

我已经经历了Stackoverflow中的多个线程,但是所有人都建议我们使用在Android 11+上不起作用的PackageManager(未经特殊许可)。一些人建议移动应用程序证明解决方案(例如,来自firebase),但这是为了使服务器API与模仿移动应用程序的应用程序相关。

因此,关于如何区分源与应用程序下载/安装的源的任何输入都将有所帮助。谢谢。

AdMob ad serving is limited to certain apps due to "invalid traffic concerns". I realized that the apps were getting installed outside of Google Play in certain countries. (For example - https://www.9apps.com/bn/android-apps).

I want to disable ads if the app is not downloaded from Google Play. So is there a way to detect whether or not an app is downloaded from Google Play?

I have gone through multiple threads in stackoverflow, but all suggest us to use PackageManager which doesn't work on Android 11+ (without special permission). Some suggest Mobile App Attestion solution (eg. from Firebase), but that is for securing server APIs from apps that impersonate our mobile app.

So any inputs on how I can differentiate the source from where the apps were downloaded/installed from will he helpful. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文