Hey I would like to add to my android app an option to hide/unhide all home screen icons and widgets, I know LG has done this in LG G2/LG G3. Users on these devices can pinch the home screen and all the apps are hidden then repinch to unhide.
I don't need it to work with pinching I just want to add a button to do so. Is there any method of doing so?
If there isn't a way I thought about adding a new home screen tab and setting it to the default home and the removing when unhide is pressed, is this way possible?
Thanks
EDIT: I found a this code
PackageManager p = getPackageManager();
ComponentName componentName = new ComponentName(this, com.apps.MainActivity.class); // activity which is first time open in manifiest file which is declare as <category android:name="android.intent.category.LAUNCHER" />
p.setComponentEnabledSetting(componentName,PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
over here: Android hide/unhide app icon programmatically
but it uses the package name so its mostly intended for ones own app... Is it possible to get a list of all packages on device and iterate trough them and than remove them?