我正在尝试使用cordova-broadcaster插件来接收Android广播意图。 我注册了广播事件。
window.broadcaster.addEventListener("com.android.action.SEND_SCAN_RESULT", function (e) {
console.log("com.android.action.SEND_SCAN_RESULT received.");
});
console.log("com.android.action.SEND_SCAN_RESULT registered");
但是如果意图被触发了
V/ActivityManager( 775): Broadcast: Intent { act=com.android.action.SEND_SCAN_RESULT flg=0x10 (has extras) } ordered=false userid=0 callerApp=ProcessRecord{1418277c 775:system/1000}
回调函数没有被触发。 唯一的日志信息是: com.android.action.SEND_SCAN_RESULT已注册。