Hello, I was checking Android 5.0 samples, there was a BasicManagedProfile sample. Using this, I successfully created a managed profile. But he only managed Market applications (downloadable from Google Play) as a managed application. But I tried with custom to say this HelloWOrld application, which is not available on the Market. This gave me the error "java.lang.IllegalArgumentException: only system applications can be enabled."
devicePolicyManager.enableSystemApp( BasicDeviceAdminReceiver.getComponentName(activity), packageName);
which I used to enable the application. Is there a way or API to enable a user application in a managed profile.
source share