Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the custom adapter, the parameter value cannot be retrieved using getCustomParameters() in the initialize method #760

Closed
algorix-code opened this issue Dec 13, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@algorix-code
Copy link

MAX SDK Version

13.0.0

Device/Platform Info

Android 12, Redmi K30

Current Behavior

1: Initialize the max sdk
AppLovinSdkInitializationConfiguration initConfig = AppLovinSdkInitializationConfiguration.builder
(AdConfig.MAX_APP_KEY, this.getApplicationContext() )
.setMediationProvider(AppLovinMediationProvider.MAX)
.build();

    // Initialize the AppLovin SDK
    AppLovinSdk.getInstance( this ).initialize(initConfig, configuration -> {
        Log.i(TAG, "AppLovinSdk-init:" );
    } );

2: When configuring AD slots, json parameters are added to custom params

3: In the custom adapter, in the initialize method, the parameter value is not retrieved via getCustomParameters()
Bundle bundle = parameters.getCustomParameters();
String sid = bundle.getString("sid");
String token = bundle.getString("token");
String debug = bundle.getString("isdebug");

The sid,token, and debug values are all null

Expected Behavior

We expect the value of the custom parameter to be retrieved from getCustomParameters()

How to Reproduce

1: When configuring AD slots, json parameters are added to custom params
(https://github.com/user-attachments/assets/b648f045-c4f2-47ef-9f05-e04c8519d3ca)

2: max sdk init
private void initSdk() {
// Max 13版本及以上
AppLovinSdkInitializationConfiguration initConfig = AppLovinSdkInitializationConfiguration.builder
(AdConfig.MAX_APP_KEY, this.getApplicationContext() )
.setMediationProvider(AppLovinMediationProvider.MAX)
.build();

    // Initialize the AppLovin SDK
    AppLovinSdk.getInstance( this ).initialize(initConfig, configuration -> {
        Log.i(TAG, "AppLovinSdk-init:" );
    } );
}

3: In the custom adapter
@OverRide
public void initialize(MaxAdapterInitializationParameters parameters, Activity activity, final OnCompletionListener onCompletionListener) {
Log.d(TAG, "initialize alx sdk……");
Log.d(TAG, "applovin-adapter-version:" + ADAPTER_VERSION);

    Bundle bundle = parameters.getCustomParameters();
    String sid = bundle.getString("sid");
    String token = bundle.getString("token");
    String debug = bundle.getString("isdebug");

}

Reproducible in the demo app?

Yes

Additional Info

No response

@algorix-code algorix-code added the bug Something isn't working label Dec 13, 2024
@applovinAsh applovinAsh added duplicate This issue or pull request already exists and removed bug Something isn't working labels Dec 17, 2024
@applovinAsh
Copy link
Contributor

duplicate issue, please follow along here: #759

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants