I don't undestand this error, help please
i inizialize the object firebase
B4X:
PermissionResult=true
PermissionType=android.permission.WRITE_EXTERNAL_STORAGE
PermissionResult=true
FirebaseMessagging-SubscribeToTopics
FirebaseMessagging-SubscribeToTopics-InittializeFirebaseMessaging
Topic=fishwolf@gmail.com
Topic=fishwolf-at-gmail.com
firebasemessaging_subscribetotopics (java line: 391)
java.lang.RuntimeException: Object should first be initialized (FirebaseMessaging).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:50)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.SubscribeToTopic(FirebaseNotificationsService.java:130)
at it.software.castiel.infoagility.firebasemessaging._subscribetotopics(firebasemessaging.java:391)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1179)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6864)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (FirebaseMessaging).
at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1182)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6864)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (FirebaseMessaging).
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:233)
at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1179)
... 7 more
Caused by: java.lang.RuntimeException: Object should first be initialized (FirebaseMessaging).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:50)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.SubscribeToTopic(FirebaseNotificationsService.java:130)
at my.app.firebasemessaging._subscribetotopics(firebasemessaging.java:391)
i inizialize the object firebase
B4X:
Sub Service_Create
Log ("FirebaseMessagging-Service_Create")
fm.Initialize("fm")
End Sub
Public Sub SubscribeToTopics
Dim Topic As String
Log("FirebaseMessagging-SubscribeToTopics")
If fm.IsInitialized = False Then
Log("FirebaseMessagging-SubscribeToTopics-InittializeFirebaseMessaging")
fm.Initialize("fm")
End If
Topic = Main.gParamEmail
Log ("Topic=" & Topic)
Topic = Topic.Replace("@", "-at-")
Log ("Topic=" & Topic)
fm.SubscribeToTopic(Topic)
Log("Token=" & fm.Token)
End Sub