Android Question hide my app icon

Discussion in 'Android Questions' started by Devv, Mar 23, 2015.

  1. Devv

    Devv Active Member Licensed User

    i am trying to hide app icon from launcher

    i tried the following code without any success

    Sub Activity_Create(FirstTime As Boolean)
    End Sub

    Sub PMsetComponentEnabledSetting (enable As Boolean)

    Dim r As Reflector
    Dim cn As Object = r.CreateObject2("android.content.ComponentName",  _
    Array As Object("cb56.testtwoicons""cb56.testtwoicons.activity2"), Array As String("java.lang.String""java.lang.String"))
       r.Target = r.GetContext
       r.Target = r.RunMethod(
    Dim e As Int

    If enable = True Then
          e = 
          e = 
    End If
       r.Target = r.RunMethod4(
    "setComponentEnabledSetting"Array As Object(cn, e, 0), _
    Array As String("android.content.ComponentName"""""))

    End Sub
  2. walterf25

    walterf25 Well-Known Member Licensed User

    If all you want to do is prevent the app icon to appear in the app drawer, then you can use this
    AddReplacement(android.intent.action.MAIN, unused_action)
    However the app will still appear in the applications manager list.

    Hope this helps,
  3. Devv

    Devv Active Member Licensed User

    this is mainfest code ?
  4. walterf25

    walterf25 Well-Known Member Licensed User

    Yes, sorry forgot to mention that!
    Daniel-White and Devv like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice