Broadcaster
This plugin adds exchanging events between native code and your app.
联系我们?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.
Ionic 通信Broadcaster插件的安装(Installation)
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
Ionic 通信Broadcaster插件支持的平台(Supported Platforms)
- Android
- iOS
- Browser
Ionic 通信Broadcaster插件的用法(Usage)
import { Broadcaster } from '@ionic-native/broadcaster/ngx';
constructor(private broadcaster: Broadcaster) { }
...
// 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'));