I'm using the following code to get the device id:
String androidID = Settings.Secure.getString(getActivity().getContentResolver(), Settings.Secure.ANDROID_ID);
According to the doc here, ANDROID_ID value is unique to each user. What I found is that the above string "androidID" is null when I tested my app under a managed profile (using BasicManagedProfile sample).
I'm assuming Android for Work is built on multi-user implementation. Why ANDROID_ID value is NULL here?
EDIT: Is there any other way to get device id from the work profile?
Try this: