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

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

          <bdo id='Ns5Ry'></bdo><ul id='Ns5Ry'></ul>
      1. 在手机版android中打开google play store的链接

        open link of google play store in mobile version android(在手机版android中打开google play store的链接)

      2. <tfoot id='KYnJx'></tfoot>

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

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

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

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

                • 本文介绍了在手机版android中打开google play store的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的最新应用中有其他应用的链接,我以这种方式打开它们.

                  I have link of my other apps in my latest app, and I open them in that way.

                  Uri uri = Uri.parse("url");
                  Intent intent = new Intent (Intent.ACTION_VIEW, uri); 
                  startActivity(intent);
                  

                  此代码将打开 google play store 的浏览器版本.

                  this codes opens the browser version of google play store.

                  当我尝试从我的手机打开时,手机会提示我是要使用浏览器还是 google play,如果我选择第二个,它会打开手机版的 google play store.

                  When trying to open from my phone, the phone prompts if I want to use a browser or google play and if I choose the second one it opens the mobile version of google play store.

                  你能告诉我这怎么会立即发生?我的意思是不问我,直接打开手机版的google play,我直接从手机打开看到的那个.

                  Can you tell me how can this happen at once? I mean not ask me but directly open the mobile version of google play, the one that I see while open it directly from phone.

                  推荐答案

                  你需要使用指定的 market 协议:

                  You'll want to use the specified market protocol:

                  final String appPackageName = "com.example"; // Can also use getPackageName(), as below
                  startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
                  

                  请记住,这将在任何未安装 Market 的设备(例如模拟器)上崩溃.因此,我建议如下:

                  Keep in mind, this will crash on any device that does not have the Market installed (the emulator, for example). Hence, I would suggest something like:

                  final String appPackageName = getPackageName(); // getPackageName() from Context or Activity object
                  try {
                      startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
                  } catch (android.content.ActivityNotFoundException anfe) {
                      startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + appPackageName)));
                  }
                  

                  使用 getPackageName() 时 来自 Context 或其子类以保持一致性(感谢 @cprcrack!).您可以在此处找到有关市场意图的更多信息:链接.

                  While using getPackageName() from Context or subclass thereof for consistency (thanks @cprcrack!). You can find more on Market Intents here: link.

                  这篇关于在手机版android中打开google play store的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Storing and reading files from Documents directory iOS 5(从 Documents 目录存储和读取文件 iOS 5)
                  How can i use MYSQL database connection in iphone application useing cocos2d?(如何在使用 cocos2d 的 iphone 应用程序中使用 MYSQL 数据库连接?)
                  Smoothly drag a Sprite in cocos2d - iPhone(在 cocos2d 中平滑拖动一个 Sprite - iPhone)
                  CCScrollView scroll and touch events never firing(CCScrollView 滚动和触摸事件永远不会触发)
                  removing jagged edges of my ropes using antialiasing of OpenGLES(使用 OpenGLES 的抗锯齿去除绳索的锯齿状边缘)
                  cocos2d Moving between scene(cocos2d 在场景之间移动)
                    <tbody id='J0Xad'></tbody>
                  <legend id='J0Xad'><style id='J0Xad'><dir id='J0Xad'><q id='J0Xad'></q></dir></style></legend>

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

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

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

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