Hello,
I wanted to try out Firebase for push notifications. That's why I created a new project in Firebase.
After opening the sample project in B4A I get the error:
Since my Target Sdk version is currently under 30, I have commented out the Permission Part.
This allows the project to be compiled. Unfortunately, I get an error message again when I start it:
The error is thrown when calling
I replaced the code module with a service module as a test and was able to start the app without any problems.
However, the notifications from the B4J sending tool do not arrive - but the job result is "Success". The notifications via the Firebase console arrive.
Is this perhaps due to the B4X version 11.80? Unfortunately I cannot update (see my post here).
Thank you in advance.
I wanted to try out Firebase for push notifications. That's why I created a new project in Firebase.
After opening the sample project in B4A I get the error:
B4X:
B4XMainPage - 51: Unknown member: permission_post_notifications
The recommended value for android:targetSdkVersion is 30 or higher (Manifesteditor). (warning #31)
Since my Target Sdk version is currently under 30, I have commented out the Permission Part.
This allows the project to be compiled. Unfortunately, I get an error message again when I start it:
B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
firebasemessaginggetObject (java line: 11)
java.lang.RuntimeException: Code module does not support this method.
at bfw.testprojekt.firebasemessaging.getObject(firebasemessaging.java:11)
at bfw.testprojekt.b4xmainpage$ResumableSub_B4XPage_Created.resume(b4xmainpage.java:66)
at bfw.testprojekt.b4xmainpage._b4xpage_created(b4xmainpage.java:37)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1085)
at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:1040)
at bfw.testprojekt.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:529)
at bfw.testprojekt.b4xpagesmanager._showpage(b4xpagesmanager.java:866)
at bfw.testprojekt.b4xpagesmanager._addpage(b4xpagesmanager.java:200)
at bfw.testprojekt.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:207)
at bfw.testprojekt.b4xpagesmanager._initialize(b4xpagesmanager.java:717)
at bfw.testprojekt.main._activity_create(main.java:366)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at bfw.testprojekt.main.afterFirstLayout(main.java:105)
at bfw.testprojekt.main.access$000(main.java:17)
at bfw.testprojekt.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:211)
at android.os.Looper.loop(Looper.java:300)
at android.app.ActivityThread.main(ActivityThread.java:8295)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:577)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1074)
The error is thrown when calling
B4X:
CallSubDelayed2(FirebaseMessaging, "SubscribeToTopics", Array("general"))
I replaced the code module with a service module as a test and was able to start the app without any problems.
However, the notifications from the B4J sending tool do not arrive - but the job result is "Success". The notifications via the Firebase console arrive.
Is this perhaps due to the B4X version 11.80? Unfortunately I cannot update (see my post here).
Thank you in advance.