Android 在离子4和角8中。。。。。广播员不工作了。我无法从本机到typescript文件获取数据
在离子4和角8中。。。。。广播员不工作了。我无法从本机到typescript文件获取数据 有人能帮我吗 参考链接 app.component.tsAndroid 在离子4和角8中。。。。。广播员不工作了。我无法从本机到typescript文件获取数据,android,angular,ionic-framework,ionic-native,Android,Angular,Ionic Framework,Ionic Native,在离子4和角8中。。。。。广播员不工作了。我无法从本机到typescript文件获取数据 有人能帮我吗 参考链接 app.component.ts import { Broadcaster } from '@ionic-native/broadcaster/ngx'; constructor(private broadcaster: Broadcaster) { } ... // Listen to events from Native this.broadcaster.addEventL
import { Broadcaster } from '@ionic-native/broadcaster/ngx';
constructor(private broadcaster: Broadcaster) { }
...
// Listen to events from Native
this.broadcaster.addEventListener('TEST.EVENT').subscribe((event) => console.log(event));
安卓代码
void sendJSMessage() {
final Intent intent = new Intent("TEST.EVENT");
final Bundle child = new Bundle();
child.putString( "name", "joker");
final Bundle b = new Bundle();
b.putString( "data", "test");
b.putBoolean( "valid", true );
b.putBundle( "child", child );
intent.putExtras( b);
LocalBroadcastManager.getInstance(this).sendBroadcastSync(intent);
}
什么是错误控制台?错误未显示在控制台中请帮助我,因为在最新的ionic native中不使用angular 8,但较旧的版本正在使用old angular…我需要帮助…你能在这方面帮助我吗?什么是错误控制台?错误未显示在控制台中请帮助我,因为在最新的ionic native中不使用angular 8但旧版本正在与旧版本合作…我需要帮助…你能帮我吗?