Dim n As NB6
n.Initialize("default", Application.LabelName, "HIGH").SmallIcon(smiley)
n.Build(quot.Get("sms"), "Kabojja Junior School", "tag", Sendsms).Notify(9)
Please help how can i get contents of quot.Get("sms") passed to sendsms page so that they are viewable
You use the tag parameter in the n.Build call (in your case "tag") to pass the value, then you get it by calling HasExtra("Notification_Tag") in the Activity_Resume of the activity that you defined in the n.Build call (in your case Sendsms).
B4X:
Sub Activity_Resume
Dim in As Intent = Activity.GetStartingIntent
If in.IsInitialized And in <> OldIntent Then
OldIntent = in
If in.HasExtra("Notification_Tag") Then
Log("Activity started from notification. Tag: " & in.GetExtra("Notification_Tag"))
End If
End If
End Sub
You use the tag parameter in the n.Build call (in your case "tag") to pass the value, then you get it by calling HasExtra("Notification_Tag") in the Activity_Resume of the activity that you defined in the n.Build call (in your case Sendsms).
This is what i have put on my sendsms but now how to get the contents from my notification and how can i define the oldintent as seen in your example
B4X:
Sub Activity_Resume
Dim in As Intent = Activity.GetStartingIntent
If in.IsInitialized And in <> OldIntent Then
OldIntent = in
If in.HasExtra("Notification_Tag") Then
Log("Activity started from notification. Tag: " & in.GetExtra("Notification_Tag"))
End If
End If
End Sub
Dim in As Intent = Activity.GetStartingIntent
'If in.IsInitialized And in <> OldIntent Then
'OldIntent = in
If in.HasExtra("Notification_Tag") Then
Log("Activity started from notification. Tag: " & in.GetExtra("Notification_Tag"))
End If
'End If
Download the example app attached to the first post in the thread I referenced in my reply. It shows you exactly how to do what you want. I'm not going to write your code for you (unless you're offering me a job of course! ).
Download the example app attached to the first post in the thread I referenced in my reply. It shows you exactly how to do what you want. I'm not going to write your code for you (unless you're offering me a job of course! ).