'when a notification is clicked
Sub ActivityResume
LogColor("MainPage.Activity_Resume...", xui.Color_Magenta)
Dim in As Intent = B4XPages.GetNativeParent(Me).GetStartingIntent
If in.IsInitialized And in <> LastIntent Then
LastIntent = in
If in.HasExtra("Notification_Tag") Then
Dim stag As String = in.GetExtra("Notification_Tag")
modX.FromNotification = True
modX.NotificationPosition = modAgriTrax.Json2Map(stag)
Dim smsgtype As String = modX.NotificationPosition.Get("msgtype")
Select Case smsgtype
Case "registration"
B4XPages.ShowPage("MainPage")
Case "08", "09", "03", "04"
If myloc.gmap.IsInitialized = False Then
Wait For (myloc.InitializeMap) Complete (Success As Boolean)
myloc.MapReady = Success
If myloc.MapReady Then
myloc.gmap.AddMarker(0, 0, "Center")
End If
End If
B4XPages.ShowPage("myloc")
End Select
End If
End If
End Sub