SDK Name: SolarEngine Android SDK v1.3.4
Developer: Huiliang Cloud (Beijing) Technology Co., Ltd.
SDK Version: 1.3.4
Description: SolarEngine (SE) is an all-in-one mobile app growth analytics and data intelligence platform. It supports data management across global channels, assisting developers to monitor every stage of business development. With our attribution tracking and user-granular ROI analysis, you'll be able to measure the true value every channel creates and optimize future growth strategies. SE also offers various analysis models and A/B testing feature to help fully visualize the user journey, identify potential pain points, implement targeted product enhancements and ultimately drive large-scale app growth.
Privacy Policy: https://www.solar-engine.com/privacyPolicyEN.html
Compliance Guideline: https://help.solar-engine.com/en/docs/Compliance-Guideline
Note:
The SolarEngine SDK supports Android 5.0(APILevel 21) and above.
Access Path: Asset Management - App Management - AppKey

Note: This method does not apply for apps on Transsion appstore. If you need to publish on Transsion appstore, please contact your customer manager for assistance.
Please add the maven repository configuration to the build.gradle file in the project root directory as follows:
repositories {
google()
jcenter()
mavenCentral()
//SE SDK repository address
maven { url "https://maven-android.solar-engine.com/repository/se_sdk_for_android/"}
maven { url "https://developer.huawei.com/repo/" }
maven { url "https://developer.hihonor.com/repo/" }
}If the download from the above address maven-android-cn.solar-engine.com fails, you can try using the backup address below:
https://maven-android-cn.solar-engine.com/repository/se_sdk_for_android/
Note: In the root directory's build.gradle, the repositories under both buildscript and allprojects need to be configured with the Maven repository address.
To obtain the SDK using the Gradle build system, please add the following code to the build.gradle file of your project.
If your product data storage area is in China Mainland, please use:
implementation 'com.reyun.solar.engine.china:solar-engine-core:1.3.4'If your product data storage area is in Non China Mainland, please use:
implementation 'com.reyun.solar.engine.oversea:solar-engine-core:1.3.4'Please download via SDK Demo
If you meet errors like "com.hihonor.ads.identifier.AdvertisingIdClient$Info is defined multiple times", please exclude HUAWEI and HONOR OAID library,:
implementation 'com.reyun.solar.engine.china:solar-engine-core:1.3.4'
{
exclude group: 'com.huawei.hms', module: 'ads-identifier'
exclude group: 'com.hihonor.mcs', module: 'ads-identifier'
}
Locate the file AndroidManifest.xml in your project and add the following permissions:
//Network related permissions (necessary)
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
//Phone state permissions (optional)
<uses-permission android:name="android.permission.READ_PHONE_STATE" />Note: The android.permission.READ_PHONE_STATE is a non-essential permission. If you need this permission to collect IMEI and the Android system is version 6.0 or higher, you will need to dynamically request this permission and get user consent.
If obfuscation is required during packaging, please add the following code to the obfuscation configuration file.
-keep class com.reyun.** {*; }
-keep class route.**{*;}
-keep interface com.reyun.** {*; }
-keep interface route.**{*;}
-dontwarn com.reyun.**
-dontwarn org.json.**
-keep class org.json.**{*;}
# Google lib
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
java.lang.String getId();
boolean isLimitAdTrackingEnabled();
}
-keep public class com.android.installreferrer.** { *; }
# If the OAID plugin is used, please add the following obfuscation strategy:
-keep class com.huawei.hms.**{*;}
-keep class com.hihonor.**{*;}When the application is first launched after install, the SDK is initialized. During this time, the SDK does not collect any personal information or report data to SolarEngine.
Please ensure that the user has agreed to the Privacy Policy before you call other function.
Function
public synchronized void preInit(Context context, String appKey)Parameter Description
| Parameter | Description | Type | Required |
|---|---|---|---|
| context | The context of the application | Context | Yes |
| appKey | AppKey obtained in Step 1 | String | Yes |
Sample Code
import com.reyun.solar.engine.SolarEngineManager;
SolarEngineManager.getInstance().preInit(context, "Appkey");If you have enabled local debugging logs and see "solar engine sdk preInit success", it means that the SDK has been successfully pre-initialized.
SolarEngineConfig parameter description
This configuration class is used to fine‑tune service capabilities and data‑collection behaviors during SDK initialization. Its parameters fall into three categories: core‑feature switches, auxiliary feature switches, and data collection switches.
The config returned by this method is optional. If not set, the default values will be applied.
Sample Code
import com.reyun.solar.engine.SolarEngineConfig;
SolarEngineConfig config = new SolarEngineConfig.Builder()
.logEnabled()
.build();It controls the enablement or disablement of core SDK capabilities, directly determining whether core services such as attribution and analytics take effect.
Note: Disabling relevant core feature switches will disrupt the data reporting. You will no longer be able to fully utilise all functions within SolarEngine dashboard.
| Method | Data Type | Required | Description |
|---|---|---|---|
| enableAttribution | boolean | No | Whether to enable SolarEngine attribution service. Enabled by default. Disabling it will turn off all attribution relevant capabilities, including attribution results, deferred deeplinks and deeplinks, etc. If the analytics service is disabled at the same time, the SDK will stop reporting all data. |
| enableAnalytics | boolean | No | Whether to enable SolarEngine analytics service. Enabled by default. Disabling it can make all analytics features unavailable, such as A/B testing and online parameter. If the attribution service is disabled at the same time, the SDK will stop reporting all data. |
| Parameter | Type | Required | Description |
|---|---|---|---|
| logEnabled | void | No | Whether to enable local debug logs. Disabled by default. |
| enable2GReporting | boolean | No | Whether to report events in 2G network. Disabled by default. |
| isDebugModel | boolean | No | Whether to enable debug mode. Disabled by default. Before using, please check function description. |
| isGDPRArea | boolean | No | If your product is operated within the EU region, there will be GDPR restrictions to follow. Please make sure to set isGDPRArea(true) if users reject the device information collection. Disabled by default. |
| adPersonalizationEnabled | boolean | No | If your product is operated within the EU regions and advertised on Google Ads, please send the results about whether users allow Google Ads to use their data for ad personalization into this parameter, so that you will comply with Google's EU user consent policy. Disabled by default. |
| adUserDataEnabled | boolean | No | If your product is operated within the EU regions and advertised on Google, please send the results about whether users allow their personal data to be shared with Google into this parameter, so that you will comply with Google's EU user consent policy. Disabled by default. |
| setCoppaEnabled | boolean | No | If your app is required to comply with Children's Online Privacy Protection Rule ("COPPA"), please set "setCoppaEnabled = true". |
| setKidsAppEnabled | boolean | No | If your app is targeting kids under 13 years old, please mark your app as "Kids App" category and set "setKidsAppEnabled = true. |
| setFbAppID | String | No | If you need to enable Meta attribution on SolarEngine, please set meta appid here. |
| enableDeferredDeeplink | boolean | No | Whether to enable deferred deeplink. Disabled by default. |
| supportMultiProcess | boolean | No | Whether to enable multi-process support. Disabled by default. This feature has been supported since version v_1.2.9.4. If you need to use it, please upgrade SDK version to v_1.2.9.4 or later. If this property is set to true, please refer to Config multi process. |
| enableSeparatedAttribution | boolean | No | Whether to enable new attribution feature. After enabled, corresponding attribution results can be retrieved quickly. |
It controls whether data such as IPv6, OAID and UA is collected.
Note: Disabling corresponding data collection parameters will impair attribution and analytics services, and you will not be able to use relevant functions normally on SolarEngine dashboard.
| Method | Type | Required | Description |
|---|---|---|---|
| enableLanguage | boolean | No | Whether to collect device language. Set to false to disable collection. Default true (enabled). |
| enableLocale | boolean | No | Whether to collect device locale. Set to false to disable collection. Default true (enabled). |
| enableTimeZone | boolean | No | Whether to collect device time zone. Set to false to disable collection. Default true (enabled). |
| enableScreenWH | boolean | No | Whether to collect screen width and height. Set to false to disable collection. Default true (enabled). |
| enableDensity | boolean | No | Whether to collect screen density. Set to false to disable collection. Default true (enabled). |
| enableNetworkType | boolean | No | Whether to collect network status. Set to false to disable collection. Default true (enabled). |
| enableUA | boolean | No | Whether to collect User-Agent (UA). Set to false to disable collection. Default true (enabled). |
| isOAIDEnabled | boolean | No | Whether to collect OAID. Set to false to disable collection. |
| isImeiEnabled | boolean | No | Whether to collect IMEI. Set to false to disable collection. |
| isAndroidIDEnabled | boolean | No | Whether to collect Android ID. Set to false to disable collection. |
| enableIPV6Address | boolean | No | Whether to collect IPv6 address. Default true (enabled). Supported in China Mainland only. |
| withDisableOAIDRetry | boolean | No | Whether to disable OAID retry. Default false. |
| withDisableGAIDRetry | boolean | No | Whether to disable GAID retry. Default false. |
Please initialize the SE SDK in the Application's onCreate() method.
This method must be called before any other methods, otherwise they will be invoid. Only methods for setting public event properties, setting the channel, and setting preset event properties can be called without prior initialization.
Function
public synchronized void initialize(Context context, String appKey, SolarEngineConfig config,OnInitializationCallback onInitializationCallback)Parameter Description
| Parameter | Description | Type | Required |
|---|---|---|---|
| context | The context of the application | Context | Yes |
| appKey | AppKey | String | Yes |
| config | Can be blank. Default value if blank. | SolarEngine Config | No |
| OnInitializationCallback | Initialization Callback | OnInitializationCallback | No |
Sample Code
import com.reyun.solar.engine.SolarEngineManager;
import com.reyun.solar.engine.SolarEngineConfig;
SolarEngineConfig config = new SolarEngineConfig.Builder().build();
SolarEngineManager.getInstance().initialize(context, "Appkey",config, new OnInitializationCallback() {
@Override
public void onInitializationCompleted(int code) {
if(code == 0) {
//Initialization success
} else {
//Initialization failed, please check the code table below for specific failure reason
}
}
});If you have enabled local debugging logs and see "solar engine SDK Init success", it means that the SDK has been successfully initialized.
Initialization Callback Code:
| 0 | Initialization success |
| 101 | SDK is not pre-initialized |
| 102 | illegal appkey |
| 103 | null context |
| 104 | failed generating distinct_id |
| 105 | excpetion occurred during initialization |
Sample Code
SolarEngineConfig config = new SolarEngineConfig.Builder().build();
// Enable new attribution feature. (Note: if not set, subsequent callbacks will not return data)
builder.enableSeparatedAttribution(true);
// Monitor new user attribution results
config.setUAAttributionListener(new OnAttributionListener() {
@Override
public void onAttributionSuccess(JSONObject attribution) {
//Action on successful attribution result retrieval
}
@Override
public void onAttributionFail(int errorCode) {
//Action on failed attribution result retrieval
}
});
// Monitor re-targeting attribution results
config.setREAttributionListener(new OnAttributionListener() {
@Override
public void onAttributionSuccess(JSONObject attribution) {
//Action on successful attribution result retrieval
}
@Override
public void onAttributionFail(int errorCode) {
//Action on failed attribution result retrieval
}
});
SolarEngineManager.getInstance().initialize(getApplicationContext(),"appkey",config)Important: For callback‑based attribution result retrieval, configure attribution listeners prior to invoking initialize. Defining listeners post‑initialization may cause imprecise attribution data. See the sample code above.
In addition to setting attribution callbacks at initialization, attribution results can be retrieved by calling the API proactively in subsequent business processes.
Important: This API retrieves device local cached data and returns "null" when cache generation is incomplete.Sample Code
import com.reyun.solar.engine.SolarEngineManager;
import org.json.JSONObject;
// Get new user attribution data
JSONObject uaAttribution = SolarEngineManager.getInstance().getUAAttributionData();
// Get re-targeting attribution data
JSONObject reAttribution = SolarEngineManager.getInstance().getREAttributionData();Attribution error code descriptions and detailed attribution results can be found in:
https://help.solar-engine.com/en/docs/SDK-Attribution-Result-Details