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

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

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

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

        <tfoot id='AF4Mn'></tfoot>

        Ionic 3:从 PlayStore 链接中获取价值

        时间:2024-04-13
          <tbody id='2IBpx'></tbody>
          <bdo id='2IBpx'></bdo><ul id='2IBpx'></ul>
          1. <legend id='2IBpx'><style id='2IBpx'><dir id='2IBpx'><q id='2IBpx'></q></dir></style></legend>

            <small id='2IBpx'></small><noframes id='2IBpx'>

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

                  本文介绍了Ionic 3:从 PlayStore 链接中获取价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个 Ionic 3 应用程序,我想根据 Playstore 的下载链接在其中设置一些变量.例如,http://linktoplaystore.com/app?account=4 会将我的应用程序中的帐户变量设置为 4.有什么方法可以实现吗?

                  I have an Ionic 3 app and I want to set some variable inside it based on the download link from Playstore. For example, http://linktoplaystore.com/app?account=4 would set the account variable inside my app to be 4. Is there any way to achieve this?

                  推荐答案

                  我终于设法使用 Firebase 动态链接使其工作.

                  I finally managed to make it work using Firebase Dynamic Links.

                  在 Firebase 控制台中设置我的应用后,我手动创建了一个如下所示的链接:

                  After I've setup my app in the Firebase console, I manually created a link which looks like this:

                  https://myapp.page.link/?link=https://play.google.com/store/apps/details?id=com.ionicframework.myapp?account4
                  

                  在我的 Ionic 应用中,我安装并配置了 Firebase 动态链接 插件:https://ionicframework.com/docs/native/firebase-dynamic-links/

                  In my Ionic app, I've installed and configured Firebase Dynamic Links plugin: https://ionicframework.com/docs/native/firebase-dynamic-links/

                  然后,在app.component.ts里面,平台初始化完成后,我使用这段代码:

                  Then, inside app.component.ts, after the platform is initialized, I use this code:

                  firebaseDynamicLinks.onDynamicLink().subscribe((res: any) => {
                   let link = res;
                  }, err => {
                    alert(err);
                  });
                  

                  链接将是一个如下所示的 JavaScript 对象:

                  The link will be a JavaScript object that looks like this:

                  {"deepLink":"https://play.google.com/store/apps/details?id=com.ionicframework.couriermanagerclient1234?account4","clickTimestamp":1535449992657,"minimumAppVersion":0}
                  

                  从这里,我可以解析结果并从 deepLink 属性中提取帐户参数

                  From here, I can parse the result and extract the account parameter from inside the deepLink property

                  这篇关于Ionic 3:从 PlayStore 链接中获取价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Ionic 3 Native:文件:{代码:5,消息:“ENCODING_ERR"} 下一篇:Ionic 3:安装cordova-plugin-camera和Native Web-intent后Android添加平

                  相关文章

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

                  <tfoot id='FU81p'></tfoot>

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

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