Android Question Detect click from notification

Stevenindonesia

Member
Licensed User
How can i detect user launch application by notification?
I am using B4X and i tried below code :

B4X:
Sub Process_Globals
    Private LastIntent As Intent
End Sub

Sub Activity_Resume
    Dim in As Intent = Activity.GetStartingIntent
    If in.IsInitialized And in.HasExtra("Notification_Tag") And in <> LastIntent Then
        LastIntent = in
        Dim tag As String = in.GetExtra("Notification_Tag")
        Msgbox("User clicked notification: " & tag,"Message")
    End If
End Sub

I still couldn't capture the intent and message did not pop up.
 
Top