【发布时间】:2021-01-08 07:26:51
【问题描述】:
使用创建反应原生 NFC 读/写应用程序 https://github.com/whitedogg13/react-native-nfc-manager -> 使用这个插件。 但是在将 NDEF 记录写入标记后,我无法写入锁。
try{
await NfcManager.writeNdefMessage(bytes)
.then(()=>NfcManager.makeReadOnlyAndroid())//Write_lock android
.then((result)=>{
console.log("Make read Only result:->",result);
});
}
catch (ex) {
console.warn('exception', ex);
_cleanUp();
}
NDEF 记录写入成功,但写入锁失败。 下面给出了使用的标签信息。
{
"canMakeReadOnly":false,
"id":"043743CE80",
"isWritable":true,
"maxSize":254,
"ndefMessage":[],
"techTypes":[
"android.nfc.tech.IsoDep",
"android.nfc.tech.NfcA",
"android.nfc.tech.Ndef"
],
"type":"NFC Forum Type 4"
}
同样的标签可以用恩智浦“TagWritter”安卓移动应用程序写入锁定。
他们是否有任何方式使用 transceive() 方法来锁定/更改特定的“锁定位”或启动一些用于 NFC 写锁定的自定义命令。
【问题讨论】:
标签: android react-native nfc readwritelock