Android Question Notify in Notification Area but not Notification Drawer?

GuyBooth

Active Member
Licensed User
When I notify the user, there are times when I want to place a logo in the Notification area (the line at the very top of the screen) but I don't want to put anything in the Notification Drawer that pulls down below it.

This code works fine for when I want to put a notification in the Drawer:
B4X:
    nNotify.Initialize
    nNotify.Icon = "icon"
    nNotify.Sound=False
    nNotify.Light=False
    nNotify.OnGoingEvent=True
    nNotify.SetInfo(Header, Message, "")
    nNotify.Notify(1)
but I have been unable to find a way to only put an Icon in the Notification area. Filling the SetInfo with empty strings still puts the logo in the drawer; setting the OnGoingEvent to False doesn't seem to change anything at all.
Is there a way to put nothing at all in the Notification Drawer and still put a logo at the top of the screen?
 

GuyBooth

Active Member
Licensed User
Is it possible, as an alternative then, to put an Icon on the action bar/notification area to indicate that a service is running?
 
Upvote 0

DonManfred

Expert
Licensed User
to put an Icon on the action bar/notification area to indicate that a service is running
Setup your Service to be a Sticky service (do not use the starter service for this. Use any other service)
 
Upvote 0

GuyBooth

Active Member
Licensed User
You are probably looking for a foreground service (Service.StartForeground).
That makes sense - I may need to run a service that does nothing at all just to get the "indicator". The service that currently provides the Notify runs every 10 minutes and only runs for milliseconds.
 
Upvote 0
Top