nfc_get_channel_status()

Retrieve the current status of an NFC service channel of the specified type.

Synopsis:

#include <nfc/nfc.h>
 
NFC_API nfc_result_t nfc_get_channel_status(nfc_channel_type_t type, uint64_t *bitmask)

Since:

BlackBerry 10.0.0

Arguments:

type

The channel type, which must be one of type nfc_channel_type_t.

bitmask
Contains all the information about the current status of the specific channel of the NFC service. The list of supported statuses includes:
  • NFC_CHANNEL_STATUS_HARDWARE_PRESENT: Indicates an NFC hardware support type. The bit is set when the device hardware supports NFC.
  • NFC_CHANNEL_STATUS_CARRIER_SUPPORTED: Indicates a carrier support type. The bit is set when the carrier configuration allows NFC.
  • NFC_CHANNEL_STATUS_IT_POLICY_ALLOWED: Indicates an IT policy support type. The bit is set when IT policy allows NFC.
  • NFC_CHANNEL_STATUS_WIRELESS_CHARGER_ALLOWED: Indicates the NFC status relative to the wireless charging status. This bit is set when NFC is allowed while the device is not on a wireless charger. When a device is on a wireless charger, the wireless field disturbs the NFC field, and NFC doesn’t work. For devices that are capable of wireless charging, NFC is disabled while a device is on a wireless charger.

Library:

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

Description:

This function retrieves the current status of the specific channel of the NFC service, including Hardware Support, IT Policy, etc. Refer to nfc_channel_status_mask_t for a list of supported states.

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