I was guided in this example https://www.b4x.com/android/forum/threads/admob-mediation-with-inmobi.71396/ to implement mediation with inMobi, but sometimes my application closes and I recive this error:
my application works correctly with admob, just increase some lines according to the tutorial
Code:
Registo conectado a: 9DLDU1730200
** Activity (main) Resume **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
java.lang.NullPointerException: Attempt to invoke virtual method 'void java.util.concurrent.atomic.AtomicBoolean.set(boolean)' on a null object reference
at com.inmobi.rendering.a.c$b$1$1.onPageFinished(ClickManager.java:349)
at xH.c(SourceFile:222)
at ayK.handleMessage(SourceFile:72)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
my application works correctly with admob, just increase some lines according to the tutorial
Code:
B4X:
#Region Project Attributes
#ApplicationLabel:Simulador
#VersionCode: 235
#VersionName: 2.3.5
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#AdditionalJar: libadapterinmobi
#AdditionalJar: InMobi-5.3.1
#AdditionalJar: picasso-2.0.0
#End Region
#Extends: android.support.v7.app.AppCompatActivity
'#AdditionalJar: libadapterinmobi
'#AdditionalJar: InMobi-1
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
#BridgeLogger : True