Hello,
I am trying to start the App on click on the firebase push message.
I am able to receive the push message, but upon click on the push message the app is not starting.
But I found several apps where I can start/open the app upon click on push messages.
Below is the code I have written...
Please advice.
Thanks
I am trying to start the App on click on the firebase push message.
I am able to receive the push message, but upon click on the push message the app is not starting.
But I found several apps where I can start/open the app upon click on push messages.
Below is the code I have written...
B4X:
Dim smiley As Bitmap
Log("Message arrived")
Log($"Message data: ${Message.GetData}"$)
smiley = LoadBitmapResize(File.DirAssets, "smiley.png", 24dip, 24dip, False)
Dim n1 As NB6
n1.Initialize("default", Application.LabelName, "DEFAULT").AutoCancel(True).SmallIcon(smiley)
Dim cs As CSBuilder
Dim title As Object = cs.Initialize.Color(Colors.Red).Append(Message.GetData.Get("title")).PopAll
Dim Content As Object = cs.Initialize.Underline.Bold.Append(Message.GetData.Get("body")).PopAll
Dim largeIcon As Bitmap = LoadBitmapResize(File.DirAssets, "icon.png", 256dip, 256dip, True)
n1.LargeIcon(largeIcon)
n1.Color(Colors.Yellow)
n1.BadgeIconType("SMALL").Number(1)
n1.ShowWhen(DateTime.Now)
n1.Build(title, Content, "tag2", Me).Notify(5)
Please advice.
Thanks