#Region Service Attributes
#StartAtBoot: False
#End Region
Sub Process_Globals
Dim Firebase As FirebaseMessaging
End Sub
Sub Service_Create
Firebase.Initialize("Push")
Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_NEVER
End Sub
Sub Service_Start(StartingIntent As Intent)
Firebase.HandleIntent(StartingIntent)
Sleep(0)
Service.StopAutomaticForeground
End Sub
Sub Subscribe
Firebase.SubscribeToTopic("enquiry")
End Sub
Sub Push_MessageArrived(Message As RemoteMessage)
Dim N As Notification
N.Initialize
N.Icon = "icon"
N.Sound = True
N.Vibrate = True
N.SetInfo2(Message.GetData.Get("title"), Message.GetData.Get("text"), Message.GetData.Get("tag"), Main)
Service.StartForeground(1, N)
End Sub
Sub Service_Destroy
End Sub