In order to reduce the trouble for developers to update the application version frequently, the SolarEngine introduces online parameter functionality. By delivering parameters, the values of parameters in the application can be adjusted remotely at any time, allowing for application content updates without requiring a new release.
To obtain the SDK using the Gradle build system, please add the following code to the build.gradle file of your project.
If you are a China Mainland developer, please use:
implementation 'com.reyun.solar.engine.china:solar-remote-config:1.3.1.0'
If you are a Non-China-Mainland developer, please use:
implementation 'com.reyun.solar.engine.oversea:solar-remote-config:1.3.1.0'
Note:
If you encounter a failure in pulling the code using the Gradle method, you need to add Maven repository configuration in the build.gradle file located in the project's root directory:
maven {
url "https://dl-maven-android.mintegral.com/repository/se_sdk_for_android/"
}
The SolarEngine SDK does not differentiate between AndroidX and Android Support versions.
Since the Parameter Delivery SDK is a plugin of the SolarEngine SDK, the initialization of the Parameter Delivery SDK depends on the SolarEngine SDK. Please refer to the Android SDK integration documentation for specific details.
Developers can control whether to enable the Parameter Delivery SDK and use its related features through the configuration methods of the SE SDK. If you have initialized the SE SDK first and then added the Parameter Delivery SDK during debugging, you will need to uninstall and reinstall the app on the debugging device.
Method example:
RemoteConfig remoteConfig = new RemoteConfig(true, RemoteConfig.MergeType.WITH_CACHE, customIdProperties, customIDEventProperties, customIDUserProperties, customIDDeviceProperties,30);
SolarEngineConfig config = new SolarEngineConfig.Builder()
.withRemoteConfig(remoteConfig); //Parameter distribution SDK parameter configuration
.build();
RemoteConfig parameter description:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
enable | Whether to send initialization parameters to the SDK (Default false) | boolean | yes |
mergeType | Server and SDK merge type (For details, please refer to the explanation below) | enum | no |
customIDProperties | Custom ID, matches the custom ID set by the user in the background | JSONObject | no |
customIDEventProperties | Custom ID event property value, matches the custom ID event attribute value set by the user in the background. | JSONObject | no |
customIDUserProperties | Custom ID user property value, matches the user attribute value set by the user in the background. | JSONObject | no |
Introduction to mergeType (merge strategy)
Parameter Name | Parameter Meaning |
---|---|
MergeType.WITH_USER | When the app is launched for the first time or the version is updated, use the server configuration to merge with the user's default configuration. This method can clear the local cache configuration. |
MergeType.WITH_CACHE | Use the server configuration to merge with the user's local cache configuration. |
Developers who use parameters to deliver the SDK need to preset a default configuration into the App through the API. The SDK uses this default configuration as an alternative.
Method example:
public synchronized void setRemoteDefaultConfig(JSONArray defaultConfig);
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
defaultConfig | The default configuration passed by the developer | JSONArray | Yes |
Call example:
import com.reyun.remote.config.RemoteConfigManager;
JSONArray dcJsonArray = new JSONArray();
JSONObject defaultConfigO = new JSONObject();
defaultConfigO.put("name", "key1");
defaultConfigO.put("value", "value1");
defaultConfigO.put("type", 1);// 1 string、2 integer、3 boolean、4 json
dcJsonArray.put(defaultConfigO);
JSONObject defaultConfigT = new JSONObject();
defaultConfigT.put("name", "key2");
defaultConfigT.put("value", "value2");
defaultConfigT.put("type", 1);
dcJsonArray.put(defaultConfigT);
RemoteConfigManager.getInstance().setRemoteDefaultConfig(dcJsonArray);
Developers can set custom attributes for events, and the parameter delivery SDK will bring this attribute when requesting server configuration for server-side parameter matching.
Method example:
public synchronized void setRemoteConfigEventProperties(JSONObject eventProperties);
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
eventProperties | Custom event properties | JSONObject | Yes |
Call example:
import com.reyun.remote.config.RemoteConfigManager;
JSONObject eventProperties = new JSONObject();
eventProperties.put("event_key1", "event_value1");
eventProperties.put("event_key2", "event_value2");
RemoteConfigManager.getInstance().setRemoteConfigEventProperties(eventProperties);
Note:
Please do not pass in custom event properties with keys starting with an underscore "_". The SDK will discard such properties by default.
Developers can set custom attributes for users. The parameter delivery SDK will bring this attribute when requesting server configuration for server-side parameter matching.
Method example:
public synchronized void setRemoteConfigUserProperties(JSONObject userProperties);
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
eventProperties | Custom user properties | JSONObject | Yes |
Call example:
import com.reyun.remote.config.RemoteConfigManager;
JSONObject userProperties = new JSONObject();
userProperties.put("user_key1", "user_value1");
userProperties.put("user_key2", "user_value2");
RemoteConfigManager.getInstance().setRemoteConfigUserProperties(userProperties);
Note:
Please do not pass in custom user properties with keys starting with an underscore "_". The SDK will discard such properties by default.
The parameter delivery SDK provides two methods for retrieving parameter configuration: synchronous and asynchronous.
Note:
When retrieving parameters synchronously or asynchronously, the SDK will trigger an event to report which experiment the user is assigned to. Therefore, it is recommended to retrieve parameters when the user reaches the experimental scenario (retrieving parameters signifies that the user has reached the experimental scenario and entered the experiment associated with that parameter). Please refrain from retrieving parameters prematurely.
Method example:
public synchronized Object fastFetchRemoteConfig(String paramKey);
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
paramKey | Parameter delivery key, corresponds to the parameter key configured by the user in the background. | String | Yes |
Return value: Object
Call example:
import com.reyun.remote.config.RemoteConfigManager;
Object result = RemoteConfigManager.getInstance().fastFetchRemoteConfig("key1");
if (result instanceof String) {
String realResult = (String) result;
}
Method example
public synchronized void asyncFetchRemoteConfig(String paramKey, OnRemoteConfigReceivedData callBack);
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
paramKey | Parameter delivery key, corresponds to the parameter key configured by the user in the background. | String | Yes |
callBack | Parameter delivery asynchronous callback | OnRemoteConfigReceivedData | Yes |
Call example
import com.reyun.remote.config.RemoteConfigManager;
RemoteConfigManager.getInstance().asyncFetchRemoteConfig("test1", new OnRemoteConfigReceivedData() {
@Override
public void onResult(Object result) {
if (result instanceof String) {
String realResult = (String) result;
}
}
});
Method example:
public synchronized JSONObject fastFetchRemoteConfig()
Call example
import com.reyun.remote.config.RemoteConfigManager;
JSONObject result = RemoteConfigManager.getInstance().fastFetchRemoteConfig();
Method example:
public synchronized void asyncFetchRemoteConfig(OnRemoteConfigReceivedGenericsData<JSONObject> callBack)
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
callBack | Parameter delivery asynchronous callback | OnRemoteConfigReceivedData | Yes |
Call example:
import com.reyun.remote.config.RemoteConfigManager;
RemoteConfigManager.getInstance().asyncFetchRemoteConfig(new OnRemoteConfigReceivedGenericsData<JSONObject>() {
@Override
public void onResult(JSONObject result) {
//result:异步获取到的所有在线参数配置
}
});
If you need to add obfuscation during your packaging process, please add the following code snippet to your configuration:
-keep class com.reyun.** {*; }
-keep class route.**{*;}
-keep interface com.reyun.** {*; }
-keep interface route.**{*;}
-dontwarn com.reyun.**
————————————
2025-08-13 1.3.1.0
•Aligned with capture SDK
2025-07-28 1.3.0.6
•Optimize traffic distribution events
2025-07-22 1.3.0.5
•Aligned with capture SDK
2025-07-04 1.3.0.3
•Aligned with capture SDK
2025-06-26 1.3.0.2
•Aligned with capture SDK
2025-06-23 1.3.0.1
•Aligned with capture SDK
2025-06-11 1.3.0.0
2025-02-28 1.2.9.6
•Aligned with capture SDK
2024-12-03 1.2.9.2
•Aligned with capture SDK
2024-11-04 1.2.8.3
• Aligned with capture SDK
2024-9-23 1.2.8.3
• Optimize the online parameter routing logic
2024-8-23 1.2.8.1
• Aligned with capture SDK
2024-8-16 1.2.8.0
• Aligned with capture SDK
2024-6-6 1.2.7.6
• Aligned with capture SDK
2024-5-11 1.2.7.5
• Aligned with capture SDK
2024-2-4 1.2.7.0
• Optimize the online parameter routing logic
2023-12-28 1.2.6.1
2023-12-14 1.2.6.0
• Online parameter SDK supports synchronous acquisition of all online parameter configurations
• Online parameter SDK supports asynchronous acquisition of all online parameter configurations
2023-12-01 1.2.4.2-1.2.5.3
• Aligned with capture SDK
2023-10-16 1.2.4.2
• Aligned with capture SDK
• Optimize debug logs
2023-09-14 1.1.1.1
• Aligned with capture SDK
2023-09-01 1.1.1.0
• Parameter delivery module differentiates between China Mainland and International versions
2023-08-21 1.1.0.2
• Optimization parameter acquisition
2023-08-04 1.1.0.1
• Unify public parameters of buried points
2023-05-25 1.1.0.0
• Supports some parameters issued by the setting service
2023-04-26 1.0.3.0
2023-03-30 1.0.2.0
2023-03-29 1.0.1.2
2023-03-23 1.0.1.1
2023-03-20 1.0.1.0
2023-03-10 1.0.0.1
2023-02-08 1.0.0.0