Hi.
I’m currently building an Android app with Ionic 3, where I want to save links which should be sent from Chrome via Intent to my app.
I am trying to use the WebIntent like it is described here:
This is what I am doing right now, but I always get a blank page when it’s opened (my regular content isn’t loaded).
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { WebIntent } from '@ionic-native/web-intent';
@Component({
selector: 'page-stream',
templateUrl: 'stream.html'
})
export class StreamPage {
intent : WebIntent;
constructor(public navCtrl: NavController, public webIntent : WebIntent) {
this.intent = webIntent;
}
ionViewDidLoad() {
let filter = [
'com.darryncampbell.cordova.plugin.intent.ACTION'
];
this.intent.registerBroadcastReceiver(filter);
let result = this.intent.getIntent();
console.log(result);
}
}
Do I use it the right way? Could somebody help me to get this working?
Thank you so much!
Update:
Ok, i forgot to add the plugin to the providers in app.modules. But now I get the error ‘plugin_not_installed’, but I installed the plugin. I think this is the same issue: https://github.com/ionic-team/ionic-native/issues/1609 --> Fixed it!