Android Question cancel a notification NB6

DonManfred

Expert
Licensed User
Longtime User
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

DonManfred

Expert
Licensed User
Longtime User
B4X:
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

SMOOTSARA

Active Member
Licensed User
Longtime User
B4X:
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

Top