How to hide activity from menu?

by f...@r@0n » Mon, 12 Oct 2009 02:48:48 GMT

Sponsored Links
 Hello guys,

Does anybody know how to hide activity icon from menu? I am trying to
write simple multiview application. So, I have two activities there,
the first (main) activity starts the second one. However, my second
activity icon is visible in installed apps menu grid and can be
started from menu as separate standalone app :)
Is there any special activity tag I can use in manifest to hide icon?




How to hide activity from menu?

by Mark Murphy » Mon, 12 Oct 2009 03:07:02 GMT


In the AndroidManifest.xml file, both of your activities probably have
an <intent-filter> element that looks like:

        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />

That tells Android to put an icon in the Launcher for that activity.
Remove that <intent-filter> from any activity that is not supposed to be
in the Launcher.

Mark Murphy (a Commons Guy)  | 

Need Android talent? Ask on HADO! 


Sponsored Links

How to hide activity from menu?

by f...@r@0n » Mon, 12 Oct 2009 22:35:01 GMT

 Yeah, removing LAUNCHER category works fine. This is what I need.

Such kind of things always happen when copy-paste code without clear
understanding what you are doing. Will try to avoid this in future :)

Thanks again!


Other Threads

1. Activity managed indeterminate ProgressDialog problem


I am trying to reuse a single instance of a ProgressDialog by multiple
Tasks (by only changing its displayed message during the
onPrepareDialog callback), but whenever I show the PDLG after a
previous call to dismissDialog, the dialog's indeterminate ProgressBar
is not rotating/animating.

I have tried looking at the code, found how to get to the Drawable and
tried calling
      getIndeterminateDrawable().setVisible(true, true);
in an attempt to restart the animation, but to no avail.

My UGLY workaround for now is to call removeDialog() wherever I would
normally call dismissDialog(), which of course defeats the purpose of
managed dialogs, but at least keeps the animation running..

Thank you for any suggestion/explanation,



2. Changed file permissions in Donut 1.6 stops TRIAL software

My trial software used to limit use to 100 uses. The number of times
the user had used it was stored in


This worked great because this directory is not browseable, but it is
writeable by applications. You could only read/write/delete the file
if you knew the exact name of the file eg:


I could store the number of uses in this file and if the user
uninstalled the app and re-installed it the app would still remember
the number of times they used the app.

Problem is, in 1.6 they seem to have changed the permissions of this
file and I cannot write to


any more. Short of accessing the network and transmitting the usage
accross the internet to a license server, can anyone think of a way to
replicate this?

Is there another directory with the same miraculous properties?


3. Create Connection failed msg like the browser app

4. Debug.startMethodTracing() - can't dump file

5. DDMS won't load (or doesn't parse?) KML file

6. Problems with WakeLock

7. how to make user-contorl??