If you just remove your main activity from the Manifest (or better, remove
the intent-filter) your app will simply not appear in the Launchers app
drawer.
So, remove this:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Hope it helps,
Yuvi
--
YuviDroid
Check out Launch-X <http://android.yuvalsharon.net/launchx.php> (a widget to
quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net
On Wed, Oct 13, 2010 at 11:24 PM, Nathan <[email protected]> wrote:
> This is probably obvious to the rest of you, but. . .
>
> Let's suppose I want to install an app that doesn't have a launcher
> icon. Maybe it contains content providers, or maybe it is a license
> key app that just needs to be present.
>
> What is the proper way to do that?
>
> If I don't have an <application> tag at all, that works, but I don't
> think that is the proper way, since <provider> and <receiver> are also
> inside <application>.
>
>
> I've tried this after first run,
>
> //Remove this app from the Launcher
> pkgMgr.setComponentEnabledSetting(
> new ComponentName(PACKAGE_NAME,
> PACKAGE_NAME + ".LicenseActivity"),
>
> PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
> PackageManager.DONT_KILL_APP);
>
> But the user experience is *unacceptable*. Instead of being removed,
> the icon sticks around and says 'Application not installed' until they
> reboot their phone, or, more likely, go for the refund.
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en