SDK Name: SolarEngine uni-appx SDK v1.0.4
Developer: Huiliang Cloud (Beijing) Technology Co., Ltd.
SDK Version: 1.0.4
Supported: The SolarEngine SDK supports Android 5.0(APILevel 21) and above.
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
Access Path: Asset Management - App Management - AppKey
Please login to the live version and get appkey for your own product.

manifest.json file in the Demo root directory and set the appid to your own project's App ID.App.uvue file in the Demo root directory and set the appkey to your own project's App Key.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.** { *; }
# Please add the following if you used the plugin for obtaining OAID.
-keep class com.huawei.hms.**{*;}
-keep class com.hihonor.**{*;}Please note that only Xcode 14.0, iOS 11.0 or above supported.
When the application is first launched after install, the SDK is pre-initialized. During pre-initialization, the SDK does not collect any personal information or report data to SolarEngine.
import * as solarengine from '@/uni_modules/solarengine-sdk'
solarengine.preInitialize(appkey)| Parameter Name | Parameter Meaning | Parameter Type | Required |
|---|---|---|---|
| appKey | AppKey | string | Yes |
| config | SolarEngine SDK configuration | SEUniConfig | Yes |
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. |
It controls non-core features like the SDK's running mode, debug logs, network policy, authorization wait, and deferred deep linking.
| Parameter | Type | Required | Description |
|---|---|---|---|
| logEnabled | boolean | No | Whether to enable local debug logs. Disabled by default. |
| isGDPRArea | boolean | No | Whether it belongs to the GDPR region (Default false) |
| adPersonalizationEnabled | boolean | No | Whether users allow Google Ads to use their data for ad personalization,developers can customize this value. The field is not reported by default when left unset. Valid only on Android. iOS does not support this field, no configuration needed. |
| adUserDataEnabled | boolean | No | Whether users allow Google Ads to use their data for ad personalization,developers can customize this value. The field is not reported by default when left unset. Valid only on Android. iOS does not support this field, no configuration needed. |
| fbAppID | string | No | If overseas developers need Meta attribution, set the Meta appid here. This parameter takes effect only on Android. iOS does not support this field and no configuration is required. |
| attAuthorizationWaitingInterval | number | No | Supports ATT Authorization Waiting for up to 120 seconds when iOS devices report events for the first time. Then SDK will report the install event only after users authorize ATT or when waiting time is up. (Unit: second) |
| isDebugModel | boolean | No | Whether to enable debug mode. Disabled by default. Before using, please check function description |
| isCoppaEnabled | boolean | No | Whether COPPA compliance is supported. Disabled by default. |
| isKidsAppEnabled | boolean | No | Whether Kids App mode is supported. Disabled by default. |
| enableDelayDeeplink | boolean | No | Whether to enable deferred deeplink. Disabled by default. |
| enableSeparatedAttribution | boolean | No | Whether to enable new attribution feature. After enabled, attribution results can be retrieved faster. |
| remoteConfig | SEUniRemoteConfig | No | Remote config initialization config |
| initComplete | (code : number) => void | No | Initialization callback |
| attributionSuccess | (data : UTSJSONObject) => void | No | Attribution success callback |
| attributionFail | (code : number) => void | No | Attribution fail callback |
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). |
| 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). |
| enableIPV6Address | boolean | No | Whether to collect IPv6 address. Default true (enabled). Supported in China Mainland only. |
remoteConfig parameter description: (For Online Parameter feature)
| Parameter name | Parameter Meaning | Type | Required |
|---|---|---|---|
| enable | Whether to enable online parameter function (default false) | bool | no |
| mergeType | By default, the server configuration is merged with the local cached configuration. 0: On the first launch of the app or during a version update, merge the server configuration with the user's default configuration; this method can clear the local cached configuration. 1: Merge the server configuration with the user's existing local cached configuration (default this option) | number | no |
| customIDEventProperties | Custom ID event properties | object | no |
| customIDUserProperties | Custom ID user properties | object | no |
Initialization example:
import * as solarengine from '@/uni_modules/solarengine-sdk'
let appkey = ''
solarengine.preInitialize(appkey)
const config = {
logEnabled : true,
initComplete: (code : number) => {
if (code == 0) {
console.log("sdk init success")
} else {
console.log("sdk init fail")
console.log(code)
}
}
} as solarengine.SEUniConfig
solarengine.initialize(appkey, config)Initialization Callback Codes
| Code | Meaning |
|---|---|
| 0 | Initialization success |
| 101 | Initialization failed, as pre-initialization is not called |
| 102 | Initialization failed, due to illegal appkey |
| 103 | null context (Android only) |
| 104 | distinct_id generation failed (Android only) |
SolarEngine SDK provides two methods to retrieve attribution result information, allowing developers to use the attribution data for event tracking and other data processing.
1. Set attribution results callback: When the SDK successfully or failed to obtain the attribution result, a callback will be given (asynchronous).
2. Get attribution results directly: Get the attribution results directly from the SDK cache. If the SDK has no attribution results yet, it will directly return nil (synchronous).
Sample Code
import * as solarengine from '@/uni_modules/solarengine-sdk'
let appkey = ''
solarengine.preInitialize(appkey)
const config = {
logEnabled : true,
enableSeparatedAttribution: true, // enable new attribution
initComplete: (code : number) => {
if (code == 0) {
console.log("sdk init success")
} else {
console.log("sdk init fail")
console.log(code)
}
},
uaAttributionFail:(errorCode:number) => {
console.log("[uni-appx CN] uaAttributionFail", errorCode)
},
uaAttributionSuccess:(data: UTSJSONObject | null) => {
console.log("[uni-appx CN] uaAttributionSuccess", data)
},
reAttributionFail:(errorCode:number) => {
console.log("[uni-appx CN] reAttributionFail", errorCode)
},
reAttributionSuccess:(data: UTSJSONObject | null) => {
console.log("[uni-appx CN] reAttributionSuccess", data)
}
} as solarengine.SEUniConfig
solarengine.initialize(appkey, config)Important: For callback‑based attribution result retrieval, configure attribution listeners prior to initialize. Defining listeners post‑initialization may cause imprecise attribution data. See the sample code above.
Important: This API retrieves device local cached data and returns "nil" when cache generation is incomplete.Sample Code
const data = solarengine.getUAAttributionData()
console.log('UA attribution read complete', JSON.stringify(data))
const data = solarengine.getREAttributionData()
console.log('RE attribution read complete', JSON.stringify(data))Attribution error code descriptions and detailed attribution results can be found in:
https://help.solar-engine.com/en/docs/SDK-Attribution-Result-Details