Hi,
I look all example and try all of them, but always notification is coming when app is running.
I only want to show message when notification is coming if app is running
Please help me
I look all example and try all of them, but always notification is coming when app is running.
I only want to show message when notification is coming if app is running
B4X:
'B4A version 8.30
'Target SDK: 26
Sub Service_Start (StartingIntent As Intent)
FM.HandleIntent(StartingIntent)
Sleep(0)
Service.StopAutomaticForeground 'Call this when the background task completes (if there is one)
End Sub
Sub FM_MessageArrived (Message As RemoteMessage)
Select Message.GetData.Get("key")
Case "VOTE"
Dim n As Notification
n.Initialize
n.Icon = "icon"
n.AutoCancel=True
Dim f As funcs
f.Initialize
n.SetInfo("test","test", test)
RndSeed(DateTime.Now)
Dim rint As Int=Rnd(1,65536)
n.Notify(rint)
End Select
End Sub
Please help me