<legend id='pqrfG'><style id='pqrfG'><dir id='pqrfG'><q id='pqrfG'></q></dir></style></legend>

<small id='pqrfG'></small><noframes id='pqrfG'>

      • <bdo id='pqrfG'></bdo><ul id='pqrfG'></ul>
        <i id='pqrfG'><tr id='pqrfG'><dt id='pqrfG'><q id='pqrfG'><span id='pqrfG'><b id='pqrfG'><form id='pqrfG'><ins id='pqrfG'></ins><ul id='pqrfG'></ul><sub id='pqrfG'></sub></form><legend id='pqrfG'></legend><bdo id='pqrfG'><pre id='pqrfG'><center id='pqrfG'></center></pre></bdo></b><th id='pqrfG'></th></span></q></dt></tr></i><div id='pqrfG'><tfoot id='pqrfG'></tfoot><dl id='pqrfG'><fieldset id='pqrfG'></fieldset></dl></div>
        <tfoot id='pqrfG'></tfoot>

        PackageManager.getInstallerPackageName() 可以告诉我我的应用是从亚马逊应用商店安

        时间:2023-11-09
          <tbody id='PVmSx'></tbody>
          <legend id='PVmSx'><style id='PVmSx'><dir id='PVmSx'><q id='PVmSx'></q></dir></style></legend>
        1. <tfoot id='PVmSx'></tfoot>
        2. <i id='PVmSx'><tr id='PVmSx'><dt id='PVmSx'><q id='PVmSx'><span id='PVmSx'><b id='PVmSx'><form id='PVmSx'><ins id='PVmSx'></ins><ul id='PVmSx'></ul><sub id='PVmSx'></sub></form><legend id='PVmSx'></legend><bdo id='PVmSx'><pre id='PVmSx'><center id='PVmSx'></center></pre></bdo></b><th id='PVmSx'></th></span></q></dt></tr></i><div id='PVmSx'><tfoot id='PVmSx'></tfoot><dl id='PVmSx'><fieldset id='PVmSx'></fieldset></dl></div>
            • <bdo id='PVmSx'></bdo><ul id='PVmSx'></ul>

              <small id='PVmSx'></small><noframes id='PVmSx'>

                  本文介绍了PackageManager.getInstallerPackageName() 可以告诉我我的应用是从亚马逊应用商店安装的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我计划在亚马逊应用商店和 Google Play 上发布我的应用程序,并且我的应用程序中的某些内容需要根据应用程序是否从亚马逊应用程序商店安装而略有不同.如果我正确理解了 PackageManager.getInstallerPackageName(String packageName) 方法,它会告诉我安装我的应用程序的应用程序的名称.对?如果是这样,如果我的应用 是从亚马逊应用商店安装的,是否有人知道此方法返回的值是多少?如果没有,是否有人知道我可以使用其他方法来确定我的应用程序是否是从亚马逊应用商店安装的?

                  I plan on publishing my app on Amazon app store as well as Google Play, and have some things in my app that need to behave slightly different depending on whether the app was installed from Amazon app store or not. If I understood the PackageManager.getInstallerPackageName(String packageName) method correctly, it tells me the name of the application that installed my app. Right? If so, does anyone know what the value returned by this method would be if my app was installed from Amazon app store? If not, does anyone know any other methods I can use to determine whether my app was installed from the Amazon app store?

                  注意:我知道有关 Stack Overflow 的其他问题已得到回答,这些问题暗示了PackageManager.getInstallerPackageName(String packageName) 到确定安装我的应用程序的应用程序的名称.然而,搜索堆栈溢出和其他地方,我一直无法确定返回的是什么PackageManager.getInstallerPackageName(String packageName) 将在如果应用是从亚马逊应用商店安装的.

                  Note: I am aware of other questions on Stack Overflow which have been answered alluding to the usage of PackageManager.getInstallerPackageName(String packageName) to determine the name of the application that installed my app. However, searching Stack Overflow and elsewhere, I have not been able to determine what the value returned by PackageManager.getInstallerPackageName(String packageName) would be in case the app was installed from the Amazon app store.

                  推荐答案

                  调用 PackageManager.getInstallerPackageName(myPackageName),其中 myPackageName 是包的名称(属于您希望为其确定安装程序的应用程序)提供以下值:

                  Calling PackageManager.getInstallerPackageName(myPackageName), where myPackageName is the name of the package (of the app for which you wish to determine the installer) gives the following values:

                  • null 如果应用是从亚马逊应用商店安装的
                  • null 如果应用是在任何应用商店之外直接安装的.
                  • com.android.vending 如果应用是从 Google Play 安装的.
                  • null if the app was installed from Amazon app store
                  • null if the app was installed directly outside of any app store.
                  • com.android.vending if the app was installed from Google Play.

                  (感谢@CommonsWare 的指点.)

                  (Thanks @CommonsWare for the pointer.)

                  这篇关于PackageManager.getInstallerPackageName() 可以告诉我我的应用是从亚马逊应用商店安装的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Android 开发者控制台 - 更改应用所有者 下一篇:切换到 Android 应用程序包分发后,应用程序有时会因 Resources$NotFoundException 而崩

                  相关文章

                    <tfoot id='pDr4d'></tfoot>
                    1. <legend id='pDr4d'><style id='pDr4d'><dir id='pDr4d'><q id='pDr4d'></q></dir></style></legend>
                      <i id='pDr4d'><tr id='pDr4d'><dt id='pDr4d'><q id='pDr4d'><span id='pDr4d'><b id='pDr4d'><form id='pDr4d'><ins id='pDr4d'></ins><ul id='pDr4d'></ul><sub id='pDr4d'></sub></form><legend id='pDr4d'></legend><bdo id='pDr4d'><pre id='pDr4d'><center id='pDr4d'></center></pre></bdo></b><th id='pDr4d'></th></span></q></dt></tr></i><div id='pDr4d'><tfoot id='pDr4d'></tfoot><dl id='pDr4d'><fieldset id='pDr4d'></fieldset></dl></div>

                      <small id='pDr4d'></small><noframes id='pDr4d'>

                        <bdo id='pDr4d'></bdo><ul id='pDr4d'></ul>