
NFC HCE Service Not Triggered When Tag Is Detected
Read the original article:NFC HCE Service Not Triggered When Tag Is Detected Problem Description The HCE (Host Card Emulation) service is not triggered when the user taps their device to an NFC reader. The reader shows "No card detected." Background Knowledge NFC HCE allows an application to emulate a smart card. For the service to be triggered, the config.json must declare the HCE service and match the AID (Application Identifier) expected by the reader. HarmonyOS requires ohos.permission.NFC_CARD_EMULATION permission. Troubleshooting Process Verified that the device supports NFC and that NFC is enabled in system settings. Checked logs using Device Log tool → confirmed that no HCE service was started on tap. Inspected config.json and noticed the AID field did not match the reader’s AID. Confirmed that the ohos.permission.NFC_CARD_EMULATION was missing from permissions. Analysis Conclusion The issue was caused by two misconfigurations: The declared AID in config.json did not match the
Continue reading on Dev.to
Opens in a new tab




