-3

I have an android app which must be launch by another app in same device and i want to hide the first app launcher icon on andorid,how can i accomplish this ?

Code:

PackageManager p = getPackageManager();
        p.setComponentEnabledSetting(getComponentName(), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);

Error Code : Unable to find explicit activity class

What is your solution for resolve my problem? Thanks

1 Answers1

0

Don't do that within your java code. Simply remove this tags from your manifest:

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

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

These tags are in your first activity tags in your manifest.

A. Badakhshan
  • 1,045
  • 7
  • 22