Android Question FirebaseNotifications - Push messages

zmrcic

Member
Licensed User
Longtime User
Trying to do everything like here https://www.b4x.com/android/forum/threads/firebasenotifications-push-messages-firebase-cloud-messaging-fcm.67716/
but I get stuck when adding firebasenotification i libraries manager...it is missing. I think it has something to do with paths, sdk manager or something.
in sdk manager everything is looking OK, but still no firebasenotification in the list. This is the third day now. I'm going crazy. Any suggestions? maybe to add it like external library(I did that with firebase analytics)
 

DonManfred

Expert
Licensed User
Longtime User
FirebaseNotification is a internal library. Just check it in the Library tab
 
Upvote 0

zmrcic

Member
Licensed User
Longtime User
check it over and over...nope, it is not there

B4A Version: 7.80
Parsing code. Error
Error parsing program.
Error description: Unknown type: firebasemessaging
Are you missing a library reference?
Error occurred on line: 2 (FirebaseMessaging)
Private fm As FirebaseMessaging
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

zmrcic

Member
Licensed User
Longtime User
thanks, I'll do that...but I think the problem is somewhere in Configured paths, jre or something...
 
Upvote 0

zmrcic

Member
Licensed User
Longtime User
thanks, Don, it's OK now. following the upper example on firebase my app crash when it gets a message. I have installed b4j...followed steeps...
I get error in log

java.lang.IllegalAccessError: Field 'com.google.android.gms.internal.firebase_messaging.zzf.zzb' is inaccessible to class 'com.google.firebase.messaging.zzc' (declaration of 'com.google.firebase.messaging.zzc' appears in /data/app/myname.firebase-wyAP10M6jhDgw9ticWh5NQ==/base.apk)

?
 
Upvote 0

zmrcic

Member
Licensed User
Longtime User
I have SDK manager v. 3.20, I also have one big project(MSSQL library, Emcryption...) that is working just fine.
additional resources? I have downloaded them from here https://www.b4x.com/android/forum/threads/androidresources.16847/. is that OK? placed in External libraries folder. Added to the project but still the same. this is full error

** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
java.lang.IllegalAccessError: Field 'com.google.android.gms.internal.firebase_messaging.zzf.zzb' is inaccessible to class 'com.google.firebase.messaging.zzc' (declaration of 'com.google.firebase.messaging.zzc' appears in /data/app/xxxxxx.yyyy-v4isdNKC0wdQDEClOznYWQ==/base.apk)
at com.google.firebase.messaging.zzc.<init>(com.google.firebase:firebase-messaging@@20.1.2:4)
at com.google.firebase.messaging.FirebaseMessagingService.<init>(com.google.firebase:firebase-messaging@@20.1.2:1)
at anywheresoftware.b4a.objects.FirebaseNotificationsService.<init>(FirebaseNotificationsService.java:32)
at java.lang.Class.newInstance(Native Method)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3945)
at android.app.ActivityThread.-wrap5(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2092)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7529)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)

when I start B4J project and send message, then my receiving app crashes with upper message.
 
Upvote 0

zmrcic

Member
Licensed User
Longtime User
and also in tutorial by Erel there is first line...
Use B4A Sdk Manager tool to install all recommended items.

what are those? what do I need more?
txh Erel
 
Upvote 0

zmrcic

Member
Licensed User
Longtime User
always felt it has something to do with paths. That is why I started all over again(see the dates)...latest b4a version...
Untitled.png

Untitled1.png

Untitled2.png
 
Upvote 0

zmrcic

Member
Licensed User
Longtime User
yes...I will start all over again, on other HDD...will report results
thanks for all, I use VS for web and desktop, everything is simpler there, maybe I just didn't use to all this :)
 
Upvote 0

zmrcic

Member
Licensed User
Longtime User
repeated all steeps and it is working now...don't know what went wrong?!
thank you Erel, you are the boss...it's not the first time you came to rescue and believe me, it is not the last :)
 
Upvote 0
Top