Android安装源 [英] Android install source
问题描述
是否有可能获得从的Android
应用程序安装的来源?
Is it possible to get the source of install from an Android
app?
我的意思是,我想看看,如果应用程序是从安装在 Play商店
,亚马逊的Appstore
或通过执行一个APK。
I mean, I want to see, if the app is installed from the Play Store
, Amazon Appstore
or via executing an APK.
PS:我想看到它,而我的应用程序崩溃,我是能够发送错误报告,我的应用程序是通过 Play商店安装
。如何获得这个值?
PS: I think to see it while my app crashes and I was able to send an bug report, that my app was installed via Play Store
. How do I get this value?
推荐答案
的软件包管理系统类用品的<一个href=\"http://developer.android.com/reference/android/content/pm/PackageManager.html#getInstallerPackageName%28java.lang.String%29\"相对=nofollow> 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.
亚马逊商店的最新版本终于套PackageManager.getInstallerPackageName()为 com.amazon.venezia
,以及与谷歌Play的对比 com.android.vending
The latest version of the Amazon store finally sets PackageManager.getInstallerPackageName() to "com.amazon.venezia
" as well to contrast with Google Play's "com.android.vending
".
来源:<一个href=\"http://stackoverflow.com/questions/10809438/how-to-know-an-application-is-installed-from-google-play-or-side-load\">How要知道应用程序从谷歌播放或侧向载荷安装一个例子:<?一href=\"http://stackoverflow.com/questions/12593621/getinstallerpackagename-returns-null\">getInstallerPackageName返回null
这篇关于Android安装源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!