Android Question java.lang.NoSuchMethodError: No virtual method subscribeToTopic

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User

DonManfred

Expert
Licensed User
Longtime User
Firebase notification is a internal library.
From the xml in the internal library folder.
<version>1.21</version>

I suggest to update your B4A.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Contact [email protected] and ask to get a downloadlink for this jar. Maybe it is available in forum somewhere but i can´t remember if and where.

In fact it is google who changed the SDK and the Library must be updated to work with the newest Mavenrepositories.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Notifications will not work properly with B4A v7.8 as it will not handle the requirements added in Android 8+. See the targetSdkVersion tutorial for more information.

The app will crash on Android 8+ devices when targetSdkVersion is set to 26.
The latest version of the library is attached.
 

Attachments

  • FirebaseNotifications.zip
    8.2 KB · Views: 342
Upvote 0

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
Thanks Erel,
I install new version of firebaseNotifications, and I have sdk 28, but app craches again
My tablet has Android 8.1.
Need new version of B4a?
upload_2019-5-16_9-41-56.png
 
Upvote 0

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
** Activity (main) Resume **
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
firebasemessaging_subscribetotopics (java line: 253)
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:15)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.SubscribeToTopic(FirebaseNotificationsService.java:130)
at com.mamavi.slimup.firebasemessaging._subscribetotopics(firebasemessaging.java:253)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1135)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Reload the page and use the link i used. I do NOT search and post it again

Note that we are talking about Firebaseintegration! So the firebaseintegrationtutorial should be the place to look for it, right?

Do not check Google Map Tutorial or Bluetooth Tutorial. They will not help.
 
Upvote 0

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
Sorry, but for two days I can't work for this error....
I find snippets, I substitute the new (not added) but now I have this error
Sorry again
upload_2019-5-16_13-40-44.png
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
How dfo you expect we could help you here with this LESS Infos you provide?
Upload a small project which shows the issue.

I´m out here: i´m not interested to further try to help.

Theme.IAPTheme comes from admob. Are you using addmob and also added admob to your project? I guess yes as you are adding the Snippet for ADS.
 
Upvote 0

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
Ok I understand!!!
Not need snippets for ADS
Now I haven't errors.

Sorry for my problems, but I have a deadline and these problems.....
Sorry again.

Now I try to read token
I hope all is ok
Thanks again
 
Upvote 0
Top