Hi everyone, I have the following problem with firebase notification: I have several phones to test my applications , on my phone with version 10 of android and version 9 of android it works correctly, the problem is with my phone that has version 7 of android. appears an error.
the code is as follows: this is the Starter service
I go back and repeat in version 9 and 10 of android it works perfect, on a phone that I have with version 7 of android I get the following error:
Thanks in advance
the code is as follows: this is the Starter service
B4X:
Sub OBTENCION_IMEI
Wait For (GetAdvertisingId) Complete (Id As String)
If Id <> "" Then
Log(Id)
mytopic_id = Id.Replace("-","")
CallSubDelayed(FirebaseMessaging, "SubscribeToTopics")
End If
End Sub
I go back and repeat in version 9 and 10 of android it works perfect, on a phone that I have with version 7 of android I get the following error:
B4X:
firebasemessagingonCreate (java line: 49)
java.lang.NoClassDefFoundError: android.app.NotificationChannel
at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
at java.lang.Class.getDexCacheType(Class.java:2551)
at java.lang.reflect.AbstractMethod.getParameterTypes(AbstractMethod.java:169)
at java.lang.reflect.Method.getParameterTypes(Method.java:193)
at java.lang.Class.getDeclaredMethods(Class.java:1812)
at anywheresoftware.b4a.BA.loadHtSubs(BA.java:522)
at com.panel.mipaneljll.firebasemessaging.onCreate(firebasemessaging.java:49)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3481)
at android.app.ActivityThread.-wrap6(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1721)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.app.NotificationChannel" on path: DexPathList[[zip file "/data/app/com.panel.mipaneljll-2/base.apk"],nativeLibraryDirectories=[/data/app/com.panel.mipaneljll-2/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at libcore.reflect.InternalNames.getClass(InternalNames.java:53)
... 15 more
Thanks in advance