Android Question Cancel notifications in the app

Mrphone

Member
Hi again

I want to cancel the notification in my program .. but NB6 does not have the n.Cancel(1) command.
 

Andris

Active Member
Licensed User
Longtime User
NB6 is a builder tool. It builds notifications.

Once the notification has been built you should use it:
B4X:
Dim n As Notification = nb6.Build(...)

n.Cancel(1)

Shouldn't I be able to cancel an existing notification upon UserClosed in Activity_Pause? Desn't seem to work - it's still on the notifications display.
B4X:
Sub Activity_Pause (UserClosed As Boolean)
    If UserClosed Then
        activenotif.Cancel(1)      'activnotif is a global variable, the result of an NB6 build
    End If
End Sub
 
Upvote 0
Top