Mehrzad238
Member
after two years I was back in programming and a lot of things had been changed mostly FCM notification, so tried to work with your example and I was faced with that error and I have no idea how to fix this or what it wants
help me understand how to send notifications in B4J and B4A
Thanks in advance
Example link
error message:
the line that gives m this error
help me understand how to send notifications in B4J and B4A
Thanks in advance
Example link
error message:
B4X:
Waiting for debugger to connect...
Program started.
Error occurred on line: 71 (Main)
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:132)
at anywheresoftware.b4j.object.JavaObject.RunMethodJO(JavaObject.java:139)
at b4j.example.main._gettokenvalue(main.java:154)
at b4j.example.main$ResumableSub_Send.resume(main.java:105)
at b4j.example.main._send(main.java:76)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at b4j.example.main.main(main.java:29)
Caused by: java.io.IOException: Error reading credentials from stream, 'type' field not specified.
at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:170)
at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:143)
... 24 more
the line that gives m this error
B4X:
Dim Credentials As JavaObject = GoogleCredentials.RunMethodJO("fromStream", Array(File.OpenInput(FilePath, ""))).RunMethod("createScoped", Array(Array As String("https://www.googleapis.com/auth/firebase.messaging")))