enterprise-samples
enterprise-samples copied to clipboard
Android NfcProvisioning Sample does not work on Android 10 (Pixel 2) trying to provision DO on Android 8 (Samsung S7)
I am trying the sample app, installed on a Pixel 2 (Android 10) to provision а factory reset Samsung S7 with Android 8.0. For a device owner I am using the Test DPC app. However it seems that the createNdefMessage
is not called at all - nothing happens on the NFC programmer app either.
I see the API is deprecated but it is still the recommended approach for NFC provisioning. Note that NFC provisioning is officially supported from Android 6+ looking at the Android Management API documentation. Nevertheless, I can find places that say that Android Beam (used by NFC) will work on Android 9 and below: https://support.google.com/nexus/answer/2781895?hl=en also https://www.xda-developers.com/google-deprecate-android-beam-api-nfc-share-files/
Additionally on the Android 10 I can not find a Setting to enable/disable the Beam.
So could you please help me with:
- Is NFC provisioning not possible from Android 10 NFC programmer device? If so, maybe you could update the documentation.
- If it is not supported, could you recommend another option to automatically provision a device - w/o the need to point the device at a QR code, enter an identifier/URL or have a device manufacturer configure something.
Thank you!
I just tried the sample on Android 9 to provision the same device - Samsung S7 w/ Android 9 - and it worked fine. Seems to be an Android 10 issue indeed.
I'm facing the same issue, there is a bug open here as well: https://issuetracker.google.com/issues/144370914
Thanks for sharing the bug. Will put a link to this issue there too.
@idalv could you please share your solution building on Android 9? I am unable to provision a device using this sample, here is the link to the issue I am having: https://github.com/android/enterprise-samples/issues/32
Can Android10 devices be set to DeviceOwner via NFC?