2017-08-09 92 views

回答

0

我最終添加了待定意圖的創建,並將標記/ NDEF過濾器添加到MainActivity。然後onNewIntent分析相關的數據和繼電器它通過

getReactInstanceManager() 
    .getCurrentReactContext() 
    .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) 
    .emit("nfcTagEvent", params); 

到的js然後,在我的主要RN成分

DeviceEventEmitter.addListener('nfcTagEvent', event => 
    // do something with event 
);