简体   繁体   中英

How can we hide icon from Drawer / Launcher / Application Manager programatically in android

任何人都可以帮我吗“我们如何通过其他任何实用程序来隐藏或取消隐藏电话中的应用程序图标”

Try this,

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

This will remove launcher icon from drawer, not applicable for application manager.

No. This is not possible, for security reasons you cannot hide the app from the app listings. The best you can do is to give your app an obscure name or put something like "preferences" behind its title.

remove

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

from the manifest, so your app won't be listed in the launcher anymore ;)

Hiding it completely from the appListing in the deeps of the settings shouldn't be possible afaik.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM