Android Question Notification IMPORTANCE_HIGH popup timeout

AHilberink

Active Member
Licensed User
Longtime User
Hi,

Using Notifications (NB6) and set IMPORTANCE_HIGH the notification pops up and disappears automatically after some ms.
My code:
B4X:
nb.Initialize("chauffeur", Application.LabelName, "HIGH").AutoCancel(True).SmallIcon(Icon)

Is there a way to set the time of this popup to extend the time before disappear? I am not refering to the timeout for canceling the notification, just the time of the popup.

Kind regards,
André
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
It is not configurable.

Based on this answer: https://stackoverflow.com/a/48862351/971547 setting the notification category to "call" and making it an ongoing notification will cause it to stay visible.

You can set the category with:
B4X:
NotificationBuilder.RunMethod("setCategory", Array("call")) 'in NB6 class
 
Upvote 0
Top