I'm currently developing an app and have the following issue.
While using NFC for device owner provisioning, I would like to send a string, which would be used by the new device owner app.
I'm aware of the standard MIME properties for device owner provisioning, found here
Here's a snippet that can give you a better visual of my issue. Notice the "myCustomValue" property.
Properties properties = new Properties();
properties.put("myCustomValue", value);
properties.put(DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME, "com.example.some.app");
try {
properties.store(stream, "NFC Provisioning");
ndefMessage = new NdefMessage(new NdefRecord[{NdefRecord.createMime(DevicePolicyManager.MIME_TYPE_PROVISIONING_NFC, stream.toByteArray())});
} catch (IOException e) {
}
This snippet lies inside
public NdefMessage createNdefMessage(NfcEvent event)
and you can find a template here
In case this is possible, I also would like to know how to retrieve that string value as soon as the provisioned app has started.