You need to remove the following line from your AndroidManifest.xml
:
<category android:name="android.intent.category.LAUNCHER"/>
This will remove the application from the default launcher. However, you also need to add the following line such that your BroadcastReceiver
is not completely ignored:
<category android:name="android.intent.category.DEFAULT"/>
You should NOT remove the line below – it is used to specify which Activity
should launch first when your app is opened:
<action android:name="android.intent.action.MAIN"/>
In order to launch the application discussed above from another application, you cannot use the calls shown in your question. You are trying to open the application by creating an Intent
with the CATEGORY_LAUNCHER
tag (i.addCategory(Intent.CATEGORY_LAUNCHER)
) when you have explicitly removed the following line from your AndroidManifest.xml
file:
<category android:name="android.intent.category.LAUNCHER" />
The absence of the above line means that the application you are trying to call will ignore the launch Intent
. In order to launch your application you will need to act upon another Intent
. Here is an example that shows how to open an application, which doesn’t contain a launch intent filter, by responding to a SMS Intent
: How to launch an Android app without “android.intent.category.LAUNCHER”
Which intent you choose to use is up to you – just make sure you add it to your AndroidManifest.xml
file.
1
solved How to modify an apk to hide from launcher? [closed]