nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ nfc_launchapp_msg_encode()

int nfc_launchapp_msg_encode ( uint8_t const *  android_package_name,
uint32_t  android_package_name_len,
uint8_t const *  universal_link,
uint32_t  universal_link_len,
uint8_t *  buf,
size_t *  len 
)

#include <include/nfc/ndef/launchapp_msg.h>

Function for encoding an NFC NDEF launch app message.

This function encodes an NFC NDEF message into a buffer.

Parameters
[in]android_package_namePointer to the Android package name string. If NULL, the Android Application Record will be skipped.
[in]android_package_name_lenLength of the Android package name.
[in]universal_linkPointer to the Universal Link string. If NULL, the Universal Link Record will be skipped.
[in]universal_link_lenLength of the Universal Link.
[out]bufPointer to the buffer for the message.
[in,out]lenSize of the available memory for the message as input. Size of the generated message as output.
Return values
0if the message was successfully created.
-EINVALif both android_package_name_len and universal_link were invalid (equal to NULL).
-ENOMEMif the predicted message is larger than the provided buffer space.
Othercodes might be returned depending on the functions nfc_ndef_msg_encode and nfc_ndef_msg_record_add