• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to remove the launcher icon in android 10(Q)

Before API 29, we can remove the launcher icon in the device by removing
Code:
    <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
in the manifest file.
As stated in https://developer.android.com/reference/android/content/pm/LauncherApps#public-methods_1
As of Android Q, at least one of the app's activities or synthesized activities appears in the returned list unless the app satisfies at least one of the following conditions:
The app is a system app.
The app doesn't request any permissions.
The app doesn't have a launcher activity that is enabled by default. A
launcher activity has an intent containing the ACTION_MAIN action and
the CATEGORY_LAUNCHER category.
Additionally, the system hides
synthesized activities for some or all apps in the following
enterprise-related cases:

If the device is a fully managed device, no synthesized activities for
any app appear in the returned list. If the current user has a work
profile, no synthesized activities for the user's work apps appear in
the returned list.

The third condition states as the same as not to have a launcher activity that is enabled.
How to achieve this in android 10?
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones