Select Page
View Categories

Broadcaster

< 1 min read

This plugin adds exchanging events between native code and your app.

GitHub Source Code: https://github.com/bsorrentino/cordova-broadcaster


Requires Cordova plugin: 
cordova-plugin-broadcaster


Supported Platforms #

  • Android
  • iOS
  • Browser

Usage #


// Listen to events from Native
this.broadcaster.addEventListener('eventName').subscribe((event) => console.log(event));

// Send event to Native
this.broadcaster.fireNativeEvent('eventName', {}).then(() => console.log('success'));