Question: I've tried my best to remove `app icon` from `launcher`, everytime it fails.. Sometimes icon is removed but the app fails to run (I've intergrated the app in `Settings` and `onClick` I called to its `MainActivity`. However normal app runs fine)
can anyone please help me out?

Answer: 
If you want to hide the launcher icon after running the app this piece of code will do it. I've hooked mine up to a button on the activity to hide it as the app doesn't need a launcher other than an introductory screen.

```
Button hideLauncherButton = (Button) findViewById(R.id.hideLauncherButton);
hideLauncherButton.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        PackageManager p = getPackageManager();
        p.setComponentEnabledSetting(getComponentName(), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
        finish();
    }
});

```
Remove the Intent filter for launcher from your AndroidManifest.xml

Remove this

```
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

```