Intent share

Hi,

looking for some snippet using webintent (example:sending url from chrome to ionic app)

thank you in advance!

Please explain proper what you want so we will help you.

thx for your response!

my goal is very simular to:

actually Iā€™m looking for possibilty to write a url value (got them from chrome -> share -> myInoincApp) to my provider and than to my inputfield.
the problem here, is that either my provider or any variable is accessible in function(intent)ā€¦

!!! *** CODE app.component.ts ***
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();

  if(this.platform.is('android')){
    window['plugins'].intentShim.getIntent(
      function(intent)
      {
        var intentExtras = intent.extras["android.intent.extra.TEXT"];     
        !!! *** MY PROVIDER ***
        myprovider.setValue(intentExtras);
        !!! 
      },
      function()
      {
        console.log('Error getting launch intent');
      });
    }

@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.2
Cordova Platforms : android 6.3.0 browser 5.0.1
Ionic Framework : ionic-angular 3.9.2
System:
Node : v7.9.0
npm : 4.2.0
OS : Windows 10

1 Like