if i click on the notification and the activity start
how can i know that the app start after i pressed the notification?
and if i have more then one notification how can i know wich one was pressed??
Dim noti As Notification
noti.Initialize
noti.Light = False
noti.vibrate = False
noti.OnGoingEvent = True
noti.Sound = False
noti.Icon = "icon"
' noti.SetInfo("Alarm", "Alarm will start at " & DateTime.Time(alarm), menu)
noti.SetInfo2("Alarm", "Alarm will start at " & DateTime.Time(alarm),"notialarm", menu)
noti.Notify(1)
like this u read it:
B4X:
Sub Activity_Resume
Dim inte As Intent
inte = activity.GetStartingIntent
If inte.HasExtra("Notification_Tag") Then
Log(inte.GetExtra("Notification_Tag"))
End If
End Sub
now u can also use this string:
B4X:
Sub Activity_Resume
dim selectednoti as string
Dim inte As Intent
inte = activity.GetStartingIntent
If inte.HasExtra("Notification_Tag") Then
selectednoti = inte.GetExtra("Notification_Tag")
End If
if selectednoti = "notialarm" then STARTALARM
End Sub