Hello,
I am new to the ionic platform and currently trying my hand at ionic + vue js setup.
In my app I am using the GitHub - navarrojava/cordova-broadcaster: Cordova Plugin to allow message exchange between javascript and native (and viceversa) plugin and trying to read the incoming intent in my ionic setup.
but the issue is in my App.vue I am always getting the “broadcaster” as undefined. I have installed using the instructions and build also goes fine. Not sure what is the issue.
- Is defining my bradcaster in App.vue the correct way?
- What is causing it as undefined ?
I have the below written in my App.vue
import broadcaster from '@ionic-native/broadcaster'
.
.
export default {
name: "App",
components: {
IonApp,
},
beforeCreate() {
if (isPlatform('hybrid')) {
const listener = function (e) {
console.log("android.intent.category.BROWSABLE: " + e);
};
const isGlobal = true;
broadcaster.addEventListener(
"android.intent.category.BROWSABLE",
isGlobal,
listener
);
}
},
};