nfc_start_iso14443_4_emulation()

Start Host Card Emulation (HCE) for the calling application.

Synopsis:

#include <nfc/nfc.h>
 
NFC_API nfc_result_t nfc_start_iso14443_4_emulation(const nfc_iso14443_4_card_t *card)

Since:

BlackBerry 10.0.0

Arguments:

card

The structure containing the information that will be emulated

Library:

libnfc (For the qcc command, use the -l nfc option to link against this library)

Description:

HCE emulates an ISO 14443-4 smart card. This function registers card emulation information within the NFC service. It also starts HCE when the application is in the foreground. Only one instance of HCE is allowed at one time, and emulation is only active while this application is in the foreground. If an application is placed in the background, the NFC service automatically stops the appplication's HCE.

If you want to start HCE in the background, you can use nfc_hce_register_aid() with a dedicated AID for the registration.

Once the application is placed in the foreground again, the NFC service resumes HCE. If an application attempts to call this function while it is already emulating an ISO 14443-4 card, the second call will fail with NFC_RESULT_LIMITATION_EXCEEDED.

During HCE, the following events can occur:

Returns:

NFC_RESULT_SUCCESS, or one of the following:

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus