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

      • <bdo id='YCwey'></bdo><ul id='YCwey'></ul>
        <tfoot id='YCwey'></tfoot>

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

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

        查找 Android 应用程序的包名称以使用 Intent 从 Web 启动 Market 应用程序

        时间:2023-11-09

      1. <legend id='GDepD'><style id='GDepD'><dir id='GDepD'><q id='GDepD'></q></dir></style></legend>
        <tfoot id='GDepD'></tfoot>

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

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

                  <tbody id='GDepD'></tbody>
                <i id='GDepD'><tr id='GDepD'><dt id='GDepD'><q id='GDepD'><span id='GDepD'><b id='GDepD'><form id='GDepD'><ins id='GDepD'></ins><ul id='GDepD'></ul><sub id='GDepD'></sub></form><legend id='GDepD'></legend><bdo id='GDepD'><pre id='GDepD'><center id='GDepD'></center></pre></bdo></b><th id='GDepD'></th></span></q></dt></tr></i><div id='GDepD'><tfoot id='GDepD'></tfoot><dl id='GDepD'><fieldset id='GDepD'></fieldset></dl></div>
                  本文介绍了查找 Android 应用程序的包名称以使用 Intent 从 Web 启动 Market 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在创建一个移动网站,其中包含一个页面,人们可以从该页面下载我们推荐的相关应用.我发现 instructions 用于创建链接以启动市场,但这假设您是相关应用程序的开发人员并且知道确切的包名称.

                  I'm creating a mobile website that will include a page from which people can download relevant apps that we recommend. I've found instructions for creating the links to launch the Market but this assumes that you are the developer of the app in question and know the exact package name.

                  除了联系开发者询问外,有什么方法可以获取包名吗?

                  Is there any way to get the package name, other than just contacting the developers and asking?

                  此外,事实证明,这些说明对于创建 Web 超链接并不真正有效.它们只为您提供一个 URI,供您在另一个 Android 应用程序的 Java 代码字符串中引用.我们的站点在 Drupal 中,所以 Java 无法运行.

                  Also, it turns out that those instructions don't really work for creating web hyperlinks. They only give you a URI to reference in a string of Java code in another Android app. Our site is in Drupal, so Java is not going to work.

                  对于 iPhone,我发现 简单说明我需要来自 iTunes 商店的 URL/链接样式,所以我正在寻找类似的信息.

                  For the iPhone, I found easy instructions for getting the URL/link style I need from the iTunes store, so I'm looking for info like that.

                  推荐答案

                  这取决于你想从哪里获取信息.你有很多选择:

                  It depends where exactly you want to get the information from. You have a bunch of options:

                  • 如果您有 .apk 的副本,只需将其作为 zip 文件打开并查看 AndroidManifest.xml 文件即可.顶级 <manifest> 元素将具有 package 属性.
                  • 如果您在设备上安装了该应用并且可以使用 adb 进行连接,则可以启动 adb shell 并执行 pm list packages -f,显示每个已安装 apk 的包名称.
                  • 如果你只是想手动查找几个包名,你可以在 http 上搜索应用://www.cyrket.com/m/android/,包名显示在URL中
                  • 您也可以使用 PackageManager
                  • 从 Android 应用程序中执行此操作
                  • If you have a copy of the .apk, it's just a case of opening it as a zip file and looking at the AndroidManifest.xml file. The top level <manifest> element will have a package attribute.
                  • If you have the app installed on a device and can connect using adb, you can launch adb shell and execute pm list packages -f, which shows the package name for each installed apk.
                  • If you just want to manually find a couple of package names, you can search for the app on http://www.cyrket.com/m/android/, and the package name is shown in the URL
                  • You can also do it progmatically from an Android app using the PackageManager

                  获得包名后,您只需链接到 market://search?q=pname:<package_name>http://market.android.com/search?q=pname:<package_name>.两者都将在 Android 设备上打开市场;后者显然也有可能在其他硬件上工作(目前还没有).

                  Once you've got the package name, you simply link to market://search?q=pname:<package_name> or http://market.android.com/search?q=pname:<package_name>. Both will open the market on an Android device; the latter obviously has the potential to work on other hardware as well (it doesn't at the minute).

                  这篇关于查找 Android 应用程序的包名称以使用 Intent 从 Web 启动 Market 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在 Android App 中实现 Rate It 功能 下一篇:如何在 Android 上以“提供反馈"模式启动 Google Play 意图?

                  相关文章

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

                  • <bdo id='d0Gc7'></bdo><ul id='d0Gc7'></ul>

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