-
-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
How to implement external broadcaster , i.e. send data from one app to another ?
I have tried :-
From App 1 :-
let options1 = {
filterActions: ['com.example.APPS_TOKEN'],
extras: {
'param1': 'abc',
'param2': 'xyz'
}
};
if (this.platform.is('android') && this.platform.is('capacitor')) {
var isGlobal = true
this.broadcaster.fireNativeEvent("APPS_TOKEN", isGlobal, options1).then(res => {
console.log("event fired!");
})
And in App 2 :-
let listener = function( e ) {
console.log( "APPS_TOKEN received! userInfo: " + JSON.stringify(e) );
}
this.broadcaster.addEventListener( "APPS_TOKEN").subscribe( listener );
But here data is not being sent to second app .
Is there a sample or documentation for it ?
Also, do we need to set up anything in AndroidManifest.xml file ?
Metadata
Metadata
Assignees
Labels
No labels