I'm using this lib Firebase RemoteConfig and works fine, but in device with Android 4.2, I get this error:
I checked the problem and the cause is in manifest snippet.
The instructions of the lib FirebaseConfig says:
Replace in the Manifest editor the line
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
with
CreateResourceFromFile(Macro, FirebaseRemoteConfig.Firebase)
If I replace the snippet, the error will be generated.
I can check the SDK version in the code and initialize the lib only if SDK > 18 (4.4+) but it possible check the SDK version in the manifest and select the new snippet only to SDK 19+?
Thanks in advance for any tip.
B4X:
main$ResumableSub_Activity_Createresume (java line: 1051)
java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process br.com.myprofiles. Make sure to call FirebaseApp.initializeApp(Context) first.
at com.google.firebase.FirebaseApp.getInstance(com.google.firebase:firebase-common@@19.3.0:184)
at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(com.google.firebase:firebase-config@@19.1.4:79)
at de.donmanfred.FirebaseRemoteConfigwrapper.Initialize(FirebaseRemoteConfigwrapper.java:36)
at br.com.myprofiles.main$ResumableSub_Activity_Create.resume(main.java:1051)
at br.com.myprofiles.main._activity_create(main.java:1017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at br.com.myprofiles.main.afterFirstLayout(main.java:104)
at br.com.myprofiles.main.access$000(main.java:17)
at br.com.myprofiles.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
The instructions of the lib FirebaseConfig says:
Replace in the Manifest editor the line
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
with
CreateResourceFromFile(Macro, FirebaseRemoteConfig.Firebase)
If I replace the snippet, the error will be generated.
I can check the SDK version in the code and initialize the lib only if SDK > 18 (4.4+) but it possible check the SDK version in the manifest and select the new snippet only to SDK 19+?
Thanks in advance for any tip.