![]() |
nRF Connect SDK API 3.3.99
|
| 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.
| [in] | android_package_name | Pointer to the Android package name string. If NULL, the Android Application Record will be skipped. |
| [in] | android_package_name_len | Length of the Android package name. |
| [in] | universal_link | Pointer to the Universal Link string. If NULL, the Universal Link Record will be skipped. |
| [in] | universal_link_len | Length of the Universal Link. |
| [out] | buf | Pointer to the buffer for the message. |
| [in,out] | len | Size of the available memory for the message as input. Size of the generated message as output. |
| 0 | if the message was successfully created. |
| -EINVAL | if both android_package_name_len and universal_link were invalid (equal to NULL). |
| -ENOMEM | if the predicted message is larger than the provided buffer space. |
| Other | codes might be returned depending on the functions nfc_ndef_msg_encode and nfc_ndef_msg_record_add |