Closed mcfoi closed 4 years ago
Have you found the solution? I have the same issue
Have you found the solution? I have the same issue
No. I gave up any attempt as is something clearly related with some constraints in recent Android platforms.. ..so nothing we can do about until is somewhat documented. Sorry!
Hey, I've found a solution. In case it helps you : Repo TestDPC
Working on Android 10.
While the sample woks flawlessly on Android 8.1, on Android 10 the creation of a Work Profile stars anc completes but no DEVICE_ADMIN_ENABLED event is never captured by the BasicDeviceAdminReceiver. As a consequence the Work Profile is never enabled.
EDIT: adding more detail. I tryed bypassing the receiver (BasicDeviceAdminReceiver) whose only purpose is starting the Profile enabling process in EnableProfileActivity. In this class just two things are done:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.basicmanagedprofile/com.example.android.basicmanagedprofile.EnableProfileActivity}: java.lang.SecurityException: No active admin ComponentInfo