Closed adurandet closed 2 weeks ago
By using the following code, though I can see termsFlowSettings
is deprecated, I managed to see the popup you can see in screenshot but taping continue I am still facing a crash.
val initConfig = AppLovinSdkInitializationConfiguration.builder(AppLovinKey.appLovinKey, context)
.setMediationProvider(AppLovinMediationProvider.MAX)
.configureSettings { settings ->
settings.termsAndPrivacyPolicyFlowSettings.apply {
isEnabled = true
}
settings.termsFlowSettings.apply {
privacyPolicyUri = Uri.parse(Urls.privacy)
termsOfServiceUri = Uri.parse(Urls.terms)
}
}
.build()
AppLovinSdk.getInstance(context)
.initialize(initConfig) {
_isInitialized.value = true
}
FATAL EXCEPTION: main
Process: com.xyz.ft.debug, PID: 4979
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equalsIgnoreCase(java.lang.String)' on a null object reference
at com.applovin.impl.r4.a(SourceFile:19)
at com.applovin.impl.r4.a(SourceFile:5)
at com.applovin.impl.r4$c.onClick(Unknown Source:19)
at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:175)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8501)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
Issue has been resolved by adding the following proguard rule
-keep class org.json.** { *; }
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 5 days since being marked as stale.
MAX SDK Version
12.4.2
Device/Platform Info
Is not device / plateform specific
Current Behavior
I am trying to add Terms and Privacy UMP flow. I followed your documentation.
I did a first attempt programmatically and try the json integration but both solution lead to a crash.
Programmaticly - Logs
JSON - logs
The crash doesn't occur when the app is NOT minify. So it could be a R8/Progruard issue.
Expected Behavior
UMP flow should be dispay and app not crash.
How to Reproduce
Build an app to display UMP flow with minify enabled. Init AppLovin SDK -> App crash.
Additional Info
No response