Android Question FirebaseNotifications crash on start

ThePuiu

Active Member
Licensed User
Longtime User
I tried to reproduce the FirebasePushMessage example (watching the video):
https://www.b4x.com/android/forum/t...-messages-firebase-cloud-messaging-fcm.67716/

After installation on the phone, the application closes immediately with the following error message:

Logger connected to: asus P01Z
--------- beginning of crash
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
firebasemessaging_subscribetotopics (java line: 228)
java.lang.NoSuchMethodError: No virtual method subscribeToTopic(Ljava/lang/String;)V in class Lcom/google/firebase/messaging/FirebaseMessaging; or its super classes (declaration of 'com.google.firebase.messaging.FirebaseMessaging' appears in /data/app/xxi.medadmin-1/base.apk)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.SubscribeToTopic(FirebaseNotificationsService.java:130)
at xxi.medadmin.firebasemessaging._subscribetotopics(firebasemessaging.java:228)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1154)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5255)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)

Can you help me to identify the problem?
Attached is the archive of the test program.

Thank You!
 

Attachments

  • sample.zip
    9.1 KB · Views: 128

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

ThePuiu

Active Member
Licensed User
Longtime User
Although I installed the latest version of B4A, it seems that Firebase libraries were not upgraded. After copying the last version, everything works! Thank you!
 
Upvote 0
Top