Removing an app icon from launcher
Creating an application that does not appear among the launchable applications with an icon is easy.
Just do not put a launcher activity into AndroidManifest.xml
- <intent-filter>
- <action android:name="android.intent.action.MA
IN" /> - <category android:name="android.intent.category.
LAUNCHER" /> - </intent-filter>
Removing an application icon after installation programatically is a bit more tricky.
You can not disable the icon itself, but you can disable one component of an application. So disabling the applications launcher activity will result its icon to be removed from launcher.
The code to do this is simple:
- ComponentName componentToDisable =
- new ComponentName("com.helloandroid.apptodi
sable", - "com.helloandroid.apptodi
sable.LauncherActivity"); - getPackageManager().setComponentEnabledSetting(
- componentToDisable,
- PackageManager.COMPONENT_ENABLED_STATE_DISABL
ED, - PackageManager.DONT_KILL_APP);
There is a few things to know about this solution:
- the disabled component will not be launchable in any way
- other non disabled activities will be launchable from other applications
- an application can only disable its own component. There is a permission "android.permission.CHANGE_COM
PONENT_ENABLED_STATE", but it wont work, 3rd party applications can not have this permission - the icon will only disapper when the launcher is restarted, so likely on next phone reboot, forcing the launcher to restart is not recommended
New tutorials from Helloandroid
Recent Apps
Android on Twitter
-
@Idevicegazette (iDevice Gazette)
GSM-to-Skype bridge lets you lose those roaming fees http://bit.ly/lbRJeh #android
11 years 45 weeks ago -
@tommy_banane (tom b.)
RT @AndroidFavorite: #Android New Desktop Android Market Is Live, Adds Several New Features http://zorr0.nl/lFwXNz
11 years 45 weeks ago -
@dwilliams5 (Dennis Williams)
just completed a runtastic run of 3.02 km in 40 min 11 s with #runtastic #Android App: http://tinyurl.com/5tvrpe3
11 years 45 weeks ago -
@S_Pinz (Spinz!)
RT @Androidheadline: Out of box #LG Optimus 3D got Quadrant 2420 score. Thanks @blink_c #io2011 #android http://twitpic.com/4whkdz
11 years 45 weeks ago -
@tayaitapps (Taya IT)
Next Google TV Looks A Lot Like Android http://t.co/dvlTim3 via @alleyinsider #google #apple #android #tv #honeycomb
11 years 45 weeks ago
Poll
Useful resources
Android Development Projects
- iOS/Android Developer to take older Games and bring them Current
- Android apps developer - need to finish urgent.
- Buliding MobileApp For onlie order
- looking for android APP developers
- Create an ecommerce app
- text-to voice for smartphones IOS - GOOGLE - HARMONY - AND ALEXA
- Optimize Images on App
- Create small feature with drag-drop text for Android
- Scouting for advanced website and Mobile apps developers. Potential Long-term contract.
- BLACK SCREEN