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

    1. <small id='DnKLn'></small><noframes id='DnKLn'>

        “评价此应用程序"-手机上 Google Play 商店应用程序中的链接

        时间:2023-11-09
        <tfoot id='GXoYe'></tfoot>
        <i id='GXoYe'><tr id='GXoYe'><dt id='GXoYe'><q id='GXoYe'><span id='GXoYe'><b id='GXoYe'><form id='GXoYe'><ins id='GXoYe'></ins><ul id='GXoYe'></ul><sub id='GXoYe'></sub></form><legend id='GXoYe'></legend><bdo id='GXoYe'><pre id='GXoYe'><center id='GXoYe'></center></pre></bdo></b><th id='GXoYe'></th></span></q></dt></tr></i><div id='GXoYe'><tfoot id='GXoYe'></tfoot><dl id='GXoYe'><fieldset id='GXoYe'></fieldset></dl></div>

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

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

              <tbody id='GXoYe'></tbody>

            • <legend id='GXoYe'><style id='GXoYe'><dir id='GXoYe'><q id='GXoYe'></q></dir></style></legend>

                  本文介绍了“评价此应用程序"-手机上 Google Play 商店应用程序中的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想在 Android 应用中添加评价此应用"链接,以便在用户手机上的 Google Play 商店应用中打开应用列表.

                  I'd like to put a "Rate This App"-link in an Android App to open up the app-listing in the user's Google Play store app on their phone.

                  1. 我必须编写什么代码才能在手机上的 Google Play 商店应用中创建 market://http://-链接?
                  2. 您将代码放在哪里?
                  3. 有人有这方面的示例实现吗?
                  4. 您是否必须指定 market://http:// 链接将放置在哪个屏幕上,哪个最好使用 - market:// 还是 http://?
                  1. What code do I have to write to create the market:// or http://-link open in the Google Play store app on the phone?
                  2. Where do you put the code?
                  3. Does anyone have a sample implementation of this?
                  4. Do you have to specify the screen where the market:// or http:// link will be placed, and which is the best to use - market:// or http://?

                  推荐答案

                  我使用以下代码从我的应用打开 Play 商店:

                  I open the Play Store from my App with the following code:

                              val uri: Uri = Uri.parse("market://details?id=$packageName")
                              val goToMarket = Intent(Intent.ACTION_VIEW, uri)
                              // To count with Play market backstack, After pressing back button, 
                              // to taken back to our application, we need to add following flags to intent. 
                              goToMarket.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY or
                                      Intent.FLAG_ACTIVITY_NEW_DOCUMENT or
                                      Intent.FLAG_ACTIVITY_MULTIPLE_TASK)
                              try {
                                  startActivity(goToMarket)
                              } catch (e: ActivityNotFoundException) {
                                  startActivity(Intent(Intent.ACTION_VIEW,
                                          Uri.parse("http://play.google.com/store/apps/details?id=$packageName")))
                              }
                  

                  选项 2:是使用resolveActivity而不是try..catch

                  Option 2: is to use resolveActivity instead of try..catch

                  if (sendIntent.resolveActivity(getPackageManager()) != null) {
                       startActivity(chooser);
                  } else {
                      openUrl();
                  }
                  

                  这篇关于“评价此应用程序"-手机上 Google Play 商店应用程序中的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在手机版android中打开google play store的链接 下一篇:为什么我的应用没有显示在 Google Play 的平板电脑上?

                  相关文章

                • <small id='XNWhR'></small><noframes id='XNWhR'>

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

                    1. <tfoot id='XNWhR'></tfoot>