Android Question cancel a notification NB6

It works the same a before.
When you call BUILD on the notificationbuilder you get a Notification object in which you can use Cancel.
 
Upvote 0
B4X: Copy
Sub Simple_Notification
   Dim n As NB6
   dim notif as Notification
   n.Initialize("default", Application.LabelName, "DEFAULT").AutoCancel(True).SmallIcon(smiley)
   notif = n.Build("Title", "Content", "tag1", Me) 'It will be Main (or any other activity) instead of Me if called from a service.
   notif.Notify(4)
  
   'notif.Cancel(4)
End Sub
 
Upvote 0
B4X: Copy
Sub Simple_Notification
   Dim n As NB6
   dim notif as Notification
   n.Initialize("default", Application.LabelName, "DEFAULT").AutoCancel(True).SmallIcon(smiley)
   notif = n.Build("Title", "Content", "tag1", Me) 'It will be Main (or any other activity) instead of Me if called from a service.
   notif.Notify(4)
 
   'notif.Cancel(4)
End Sub

worked good
thank you very much
 
Upvote 0

Similar Threads

  • Question Question
Android Question NB6 + Target SDK 33
Replies
6
Views
6K
Replies
1
Views
4K
Replies
11
Views
16K
  • Question Question
Android Question NB6 example-problem
Replies
1
Views
4K
Back
Top