如何知道一个应用程序从谷歌安装播放或侧向载荷? [英] How to know an application is installed from google play or side-load?

查看:154
本文介绍了如何知道一个应用程序从谷歌安装播放或侧向载荷?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要检测我的应用程序从谷歌播放安装或其他市场,我怎么能得到这些信息?

I need to detect my application is installed from google play or other market, how could I get this information?

推荐答案

在PackageManager类提供的<一个href="http://developer.android.com/reference/android/content/pm/PackageManager.html#getInstallerPackageName%28java.lang.String%29">getInstallerPackageName方法,将告诉你任何安装指定包的包名。侧载应用程序不包含一个值。

The PackageManager class supplies the getInstallerPackageName method that will tell you the package name of whatever installed the package you specify. Side-loaded apps will not contain a value.

编辑:下面注mttmllns回答有关亚马逊的应用程序商店

Note mttmllns' answer below regarding the Amazon app store.

这篇关于如何知道一个应用程序从谷歌安装播放或侧向载荷?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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