@tushar4ic wrote:
I have found one non-angular implementation here : https://www.npmjs.com/package/cordova-plugin-broadcaster, But that's not working.
Here is my code inside app.js's $ionicPlatform.ready function :
if (window.broadcaster) { window.broadcaster.addEventListener( "CUSTOM_EVENT_NAME_BROADCASTED_FROM_NATIVE_LAYER", function( e ) { console.log( "Event received! userInfo: " + JSON.stringify(e) ); }); } else { console.log('windown.broadcaster not available'); }
It's not invoking the else block, and the registered callback-block is not called also.
Any pointer would be helpful.
Thanks
- Tushar
Posts: 1
Participants: 1