Receive URL in Ionic/Cordova

后端 未结 2 1051
悲哀的现实
悲哀的现实 2021-02-02 18:04

I\'m trying to set up a way to receive a url from another app. Like, you are in browser, click share, and send the link to another app (my app). I found this cordova plugin, and

相关标签:
2条回答
  • 2021-02-02 19:01

    I've been working on something similar. I was able to get the url by using this plugin by Initsogar

    The plugin can be found here https://github.com/Initsogar/cordova-webintent

    You can get the incoming url as follows:

    var incomingURL
    window.plugins.webintent.getExtra(window.plugins.webintent.EXTRA_TEXT,
          function(url) {
            incomingURL = url
            console.log(incomingURL);
          }, function() {
            incomingURL = false;
          }
      );
    

    Hope this helps, and good luck on the app! Ionic is awesome :)

    0 讨论(0)
  • 2021-02-02 19:02

    For general help and recent developments I want to add an answer to this.

    There is a cordova plugin called Custom URL scheme. For the documentation of plugin is solid I don't add any further information.

    0 讨论(0)
提交回复
热议问题