A K Jha
A K Jha

Reputation: 89

Hide apps from Launcher

I want to make an application in which we show the list of all apps which is installed in my phone with checkbox. When user checked the any application then that apps should be show on Launcher. Otherwise apps should be hide from Launcher.

Upvotes: 1

Views: 1062

Answers (1)

s.d
s.d

Reputation: 29436

Unless you code a launcher app too, it's not possible. Other launcher's will simply look at the apps manifest (using package manager) if it declares launcher intent or not.

In the case where both launcher and settings are in same app, best solution will be to use a shared preferences file:

Set<String> blacklistedApps;

//--add package names--
blacklistedApps.put("com.useless.uselessapp");

//--save as a preference--
SharedPreferences.Editor.putStringSet("blacklisted",blacklistedApps).commit();

//--read preference--
blacklistedApps = SharedPreferences.getStringSet("blacklisted",new Set<String>());

Upvotes: 3

Related Questions