I am implementing an application that uses DevicePolicyManager. I have provisioned my device using adb and my app is running on device admin mode.
I am using setApplicationHidden method to hide/unhide applications using their package name. I want to do a whitelist system where I can specify a few apps to not disable and I want to disable the rest of the apps installed on the phone. I can hide the apps that are not on my whitelist but once they are hidden I cannot get any info about them using packagemanager or any other method.
All I can get the information about unhidden applications.
Is there a way I can retrive this information without storing the package names of the apps I've hidden somewhere?