appidea / react-native-hce

Emulate smart cards inside React-Native application.
MIT License
67 stars 26 forks source link

Appropiate installation #9

Closed freeridre closed 2 years ago

freeridre commented 2 years ago

Hi there!

First of all, thank you so much for this library! I assume something, I would like to know if am I right or not. So I assume that if I did everything correctly, then the hce service should appear in the Android settings of services, where we can select the service. So if I developed well my current app, the service should appear isn't it? At present the service does not appear. :/ Thank you for your reply.

appidea commented 2 years ago

From my understanding, in Android OS, the HCE service lifecycle starts on card read, and ends when the communication has been ended.

Basically Android is continuously listening for the available NFC devices in the background, and if the card is recognized and the AID match the one defined in aid_list.xml, the OS is starting the specific HCE service (here: the react-native-hce's internal service) to start an APDU exchange.

See the official Android documentation to get more knowledge about that: Host-based card emulation overview