Search...
Menu

Customized Segment

💡Tips

  • All custom parameter configurations must be completed before SDK initialization

UserId

java Copy
// UserId
MCSDK.setUserId("your_user_id");  

Channel Information

java Copy
// Channel  
MCSDK.setChannel("your_channel");  

// Sub-channel  
MCSDK.setSubChannel("your_sub_channel");  

Custom Rules

java Copy
Map<String, Object> customRule = new HashMap<>();  
customRule.put("your_custom_key", "your_custom_value");  
MCSDK.setCustomRule(customRule);  

📌 Sample Code
java Copy
public class DemoApplication extends Application {  
    @Override  
    public void onCreate() {  
        super.onCreate();  
        
        // Configure UserId  
        MCSDK.setUserId("user id");
        
        // Configure channel settings  
        MCSDK.setChannel("channel");
        MCSDK.setSubChannel("sub-channel");  
        
        // Configure custom rules  
        Map<String, Object> customRule = new HashMap<>();  
        customRule.put("your customized key", "your customized value"); 
        MCSDK.setCustomRule(customRule);  
        
        // Initialize SDK  
        MCSDK.init(this, "your app id", "your app key", new MCInitListener() {
              @Override
              public void onMediationInitFinished(MCInitResult mcInitResult) {
                ...
              }
         });
    }  
}  
Previous
Customized Mediation Adapter
Next
Preset Strategy
Last modified: 2025-03-25Powered by