In b4a 7.x it working fine, but in b4a 8+ when i call SubscribeToTopic function:
B4X:
fm.SubscribeToTopic("newstopic")
i get this error:
B4X:
java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.tasks.Task com.google.firebase.iid.FirebaseInstanceId.zza(java.lang.String)' on a null object reference
at anywheresoftware.b4a.keywords.Common$13.run(Common.java:1682)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.tasks.Task com.google.firebase.iid.FirebaseInstanceId.zza(java.lang.String)' on a null object reference
at com.google.firebase.messaging.FirebaseMessaging.subscribeToTopic(Unknown Source)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.SubscribeToTopic(FirebaseNotificationsService.java:130)
at com.yemenet.phonezclub.firebasemessaging$ResumableSub_Service_Start.resume(firebasemessaging.java:236)
at anywheresoftware.b4a.keywords.Common$13.run(Common.java:1680)
... 7 more