month before it worked, but now the messages do not arrive when application is closed.
on my Huawai it works but on ONEPlus 3t and Gigaset it doesn't.
Starter
Firebase
Manifest
on my Huawai it works but on ONEPlus 3t and Gigaset it doesn't.
Starter
B4X:
#Region Service Attributes
#StartAtBoot: true
#ExcludeFromLibrary: True
#End Region
Sub Process_Globals
End Sub
Sub Service_Create
End Sub
Sub Service_Start (StartingIntent As Intent)
StartService(FirebaseMessaging)
End Sub
Firebase
B4X:
#Region Service Attributes
#StartAtBoot: true
#End Region
Sub Process_Globals
Private fm As FirebaseMessaging
End Sub
Sub Service_Create
fm.Initialize("fm")
fm.SubscribeToTopic("2")
End Sub
Sub Service_Start (StartingIntent As Intent)
If StartingIntent.IsInitialized Then fm.HandleIntent(StartingIntent)
Service.StopAutomaticForeground 'remove if not using B4A v8+.
End Sub
Sub fm_MessageArrived (Message As RemoteMessage)
ToastMessageShow("ok",False)
Log ("ok")
End Sub
Manifest
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)