Android Question Service with no Icon

Discussion in 'Android Questions' started by tchart, Mar 26, 2015.

  1. tchart

    tchart Active Member Licensed User

    So Ive read this thread;

    I was wondering if it is possible with b4a to have an ongoing notification without an icon in the tray along the top. I know this is technically possible as the Pebble app has an ongoing notification in the notification but does not show an icon in the tray along the top.

    For now Ive used Service.StartForeground(0, Null) to hide the notification altogether.

  2. Erel

    Erel Administrator Staff Member Licensed User

    Dim p As Phone
    If p.SdkVersion >= 16 Then
    Dim jo As JavaObject = n
    Dim minPriority As Int = -2
    "priority", minPriority)
    End If
    lemonisdead likes this.
  3. tchart

    tchart Active Member Licensed User

    Thanks Erel, this seems to be the official method but whether the icon in the notification tray is shown or not is up to the OS and how many notifications are visible. In my case the icon still shows.

    Doing some further research it seems that the only way to guarantee the icon is not shown is to use a black icon and push it to the right (max priority?).

    I think for now I will just stick with letting the user choose if they want the notification or not.
  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