How to remove icon programatically (Android)
<p>By remove the below intent-filter in AndroidManifest.xml, it can remove the icon after install.</p>

<pre><code>&lt;intent-filter&gt;
  &lt;action android:name="android.intent.action.MAIN" /&gt;
  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
&lt;/intent-filter&gt;
</code></pre>

<p>But i have try the below when on Boot than remove the Icon, but the icon still remain after reboot. I have add the permission, and this reboot receiver is work. </p>

<pre><code>public class BootBroadcastReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        PackageManager p = context.getApplicationContext().getPackageManager(); 
        ComponentName componentName = new ComponentName("com.example.removeicon","com.example.removeicon.LauncherActivity");
        p.setComponentEnabledSetting(componentName,PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);

    }
}
</code></pre>

<p>Or Put the Boot on service and AndroidManifest.xml intent-filter is not remove, the service is run and work.</p>

<pre><code>package com.example.removeicon;
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        PackageManager p = getPackageManager();
        ComponentName componentName = new ComponentName("com.example.removeicon","com.example.removeicon.LauncherActivity");
        p.setComponentEnabledSetting(componentName,PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
        startService();
    }
</code></pre>
