### Example Initialization and Usage Source: https://developer.umeng.com/docs/147377/detail/214850 Demonstrates the sequence of calling preInit, init, and then using UMVerifyHelper for authentication services like checking environment availability and getting login tokens. ```java com.umeng.commonsdk.UMConfigure.preInit(...); com.umeng.commonsdk.UMConfigure.init(...); com.umeng.umverify.UMVerifyHelper helper = com.umeng.commonsdk.UMVerifyHelper.getInstance(...); //设置密钥 helper.setAuthSDKInfo(...); //检测终端网络环境是否支持一键登录或者号码认证 helper.checkEnvAvailable(); //调用预取号或者一键登录接口 helper.getLoginToken(...); ``` -------------------------------- ### Activate Configuration Example Source: https://developer.umeng.com/docs/119267/detail/159942 Example of activating the remote configuration with a nil completion handler. ```Objective-C - (void)viewDidLoad { [super viewDidLoad]; [UMRemoteConfig activateWithCompletionHandler:nil]; } ``` -------------------------------- ### Fetch Configuration Value Example Source: https://developer.umeng.com/docs/119267/detail/159942 Example of fetching a configuration value for 'home_color'. ```Objective-C - (void)viewDidLoad { [super viewDidLoad]; [UMRemoteConfig configValueForKey:@"home_color"]; } ``` -------------------------------- ### Example: Own Account Login Source: https://developer.umeng.com/docs/119267/detail/2936711 Example of how to log a user sign-in when they use their own account credentials. ```java MobclickAgent.onProfileSignIn("userID"); ``` -------------------------------- ### Android App: Get Article ID from New Install Parameters Source: https://developer.umeng.com/docs/191212/detail/3025995 For Android apps, after a new user installs the app, the article ID can be obtained by calling the new install parameters interface to get the `wakeupurl`. ```java 如是安卓端App,在新安装参数接口处可以获取到此小说文章id ``` -------------------------------- ### Example of Umeng SDK Formal Initialization Source: https://developer.umeng.com/docs/119267/detail/118588 A practical example demonstrating how to call the UMConfigure.init method with specific parameters for device type and push secret. This should be called after user authorization. ```java UMConfigure.init(this,"您的appkey","您的渠道",UMConfigure.DEVICE_TYPE_PHONE, ""); ``` -------------------------------- ### Example: Get Verification Code Source: https://developer.umeng.com/docs/143070/detail/189164 This example shows how to call the getVerificationCode method and handle the success or failure callbacks on the UI thread. ```java UMSMS.getVerificationCode(mPhoneET.getText().toString().trim(),"1",newUMSMSCodeListener(){ @Override publicvoid getCodeSuccess(finalString ret){ MainActivity.this.runOnUiThread(new Runnable(){ @Override publicvoid run(){ mResT.setText(ret); } });} @Override publicvoid getCodeFailed(finalint errCode,finalString errMsg){ MainActivity.this.runOnUiThread(newRunnable(){ @Override publicvoid run(){ mResT.setText(errCode +"+"+errMsg); }}); } }); ``` -------------------------------- ### Example of Umeng Push SDK Initialization Source: https://developer.umeng.com/docs/147377/detail/210156 Demonstrates the order of calling preInit, init, and the push registration method. Ensure user consent to the privacy policy before calling these methods. ```java com.umeng.commonsdk.UMConfigure.preInit(...); com.umeng.commonsdk.UMConfigure.init(...); ``` -------------------------------- ### Get Install Parameters (Older API) Source: https://developer.umeng.com/docs/191212/detail/191260 This older API retrieves installation parameters and enables clipboard reading by default. It's recommended to call this only on the first launch of a newly installed app. ```Objective-C [MobClickLink getInstallParams:^(NSDictionary*params, NSURL *URL,NSError*error) { if(error){ NSLog(@"getInstallParams===="); return; } NSLog(@"getInstallParams URL:(%@)",URL); NSLog(@"getInstallParams params:(%@)",params); }]; return YES; ``` -------------------------------- ### Example: Initialize with Custom Version Source: https://developer.umeng.com/docs/193624/detail/194595 Example of initializing the application with custom version and build numbers, followed by Umeng SDK initialization. ```objectivec - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [UMCrashConfigure setAppVersion:@"2.0" buildVersion:@"3"]; [UMConfigure initWithAppkey:@"5fb6009173749c24fd9cb357" channel:@"App Store"]; } ``` -------------------------------- ### iOS App: Get Article ID from New Install Parameters Source: https://developer.umeng.com/docs/191212/detail/3025995 For iOS apps, after a new user installs the app, the article ID is retrieved from the `wakeupurl` obtained via the new install parameters interface. ```objective-c 如是iOS端App,在新安装参数接口处可以获取到此小说文章id ``` -------------------------------- ### Example Podfile Configuration for U-Share SDK Source: https://developer.umeng.com/docs/128606/detail/193653 This example shows how to configure your Podfile to integrate U-Share, UMDevice, sharing UI, WeChat, QQ, and U-Link SDKs. ```ruby target 'UMPlusDemo'do pod 'UMCommon' pod 'UMDevice' pod 'UMShare/UI' pod 'UMShare/Social/WeChat' pod 'UMShare/Social/QQ' pod 'UMLink' end ``` -------------------------------- ### Get Trackcode Example Source: https://developer.umeng.com/docs/128606/detail/202264 An example of how to call the `trackcode` function to generate a root track code. It includes sample user info and handles the completion callback to log the result or error. ```objective-c -(void)getTrackcode{ [UMShareLink trackcode:@"5861e5daf5ade41326001eab" url:@"https://developer.umeng.com" umid:[UMConfigure umidString] uid:nil userInfo:@{@"param1":@"value1",@"param2":@"value2",@"param3":@"value3"} completionHandler:^(id _Nullable result, NSError * _Nullable error) { if (result) { NSLog(@"result:%@",result); } else{ NSLog(@"error:%@",error); } }]; } ``` -------------------------------- ### Umeng U-Verify SDK Initialization and Usage Source: https://developer.umeng.com/docs/143070/detail/144780 Demonstrates the essential steps for initializing the Umeng U-Verify SDK, including pre-initialization, main initialization, setting up listeners, and calling core functions like checking environment availability and getting a login token. ```java /** * 为满足工信部合规要求,请确保按照合规指南进行预初始化 * https://developer.umeng.com/docs/119267/detail/182050 */ UMConfigure.preInit(this, "替换为Appkey,服务后台位置:应用管理 -> 应用信息 -> Appkey", "渠道信息"); /* * 0.在Application的onCreate方法中初始化Appkey等信息 */ UMConfigure.init(this,"替换为Appkey,服务后台位置:应用管理 -> 应用信息 -> Appkey","渠道信息",UMConfigure.DEVICE_TYPE_PHONE,""); /* * 1.初始化获取token实例 */ mTokenListener =new UMTokenResultListener(){} /* * 2.初始化SDK实例 */ umVerifyHelper = UMVerifyHelper.getInstance(context, mTokenListener); /* * 3.设置SDK密钥 */ umVerifyHelper.setAuthSDKInfo(); /* * 4.检测终端网络环境是否支持一键登录或者号码认证 */ umVerifyHelper.checkEnvAvailable(); /* * 5.若步骤4支持,则根据业务情况,调用预取号或者一键登录接口 * 详见demo接入工程 */ umVerifyHelper.getLoginToken(context,5000); ``` -------------------------------- ### AND Condition Example for Filtering Source: https://developer.umeng.com/docs/67966/detail/149296 Example of an 'and' condition combining multiple filters: registered user, specific app version, recent activity, installation time range, and push switch status. ```json "where": { "and": [ {"tag":"registered_user"},//开发者自定义tag {"app_version":"1.0"},// app-version {"launch_from":"2020-09-30"},// X天活跃/不活跃 {"install_in":"2020-09-01"},//设备注册时间在9月1号(含)之后 {"install_before":"2020-09-22"},//设备注册时间在9月22号(不含)之前 {"push_switch":"true"}//设备通知开关是打开状态 ] } ``` -------------------------------- ### Get Install Parameters (Newer API) Source: https://developer.umeng.com/docs/191212/detail/191260 Use this newer API to retrieve installation parameters. Set `enablePasteboard` to `NO` to disable clipboard access and rely on IP or cross-device matching. Set to `YES` to enable clipboard reading. ```Objective-C + (void)getInstallParams:(void (^)(NSDictionary *params, NSURL *URL, NSError *error))completion enablePasteboard:(BOOL)enablePasteboard; ``` -------------------------------- ### Install Umeng SDK for QQ Mini Program (Beta) Source: https://developer.umeng.com/docs/147615/detail/184228 Use this command to install the beta version of the Umeng SDK for QQ mini-programs. ```bash npm install umtrack-qq@beta --save ``` -------------------------------- ### Get Active Users API Example Source: https://developer.umeng.com/docs/67641/detail/67644 This snippet demonstrates how to call the `umeng.uapp.getActiveUsers` API to retrieve active user data for a specified period. It includes the request URL structure, parameter explanations, and examples of successful and error responses. ```APIDOC ## Get Active Users API ### Description This API retrieves the number of active users for a given application within a specified date range and period type. ### Method GET ### Endpoint `https://gateway.open.umeng.com/openapi/param2/1/com.umeng.uapp/umeng.uapp.getActiveUsers/100000` ### Parameters #### Query Parameters - **appkey** (string) - Required - The application key for authentication. - **startDate** (string) - Required - The start date for the data retrieval (YYYY-MM-DD). - **endDate** (string) - Required - The end date for the data retrieval (YYYY-MM-DD). - **periodType** (string) - Required - The type of period for the data (e.g., 'daily'). - **_aop_timestamp** (long) - Optional - Timestamp for request validation (milliseconds since epoch). - **_aop_signature** (string) - Optional - Request signature for authentication. ### Request Example ``` https://gateway.open.umeng.com/openapi/param2/1/com.umeng.uapp/umeng.uapp.getActiveUsers/100000?appkey=5801e94ee0f55a576600447a&startDate=2018-01-01&endDate=2018-01-02&periodType=daily&_aop_signature=E82A25DD44929B8187487F7BBF5A3CD807CD21D4 ``` ### Response #### Success Response (200) - **activeUserInfo** (array) - An array of objects, where each object contains: - **date** (string) - The date for the active user count. - **value** (integer) - The number of active users for that date. #### Response Example (Success) ```json { "activeUserInfo": [ { "date": "2018-01-01", "value": 32402 }, { "date": "2018-01-02", "value": 34265 } ] } ``` #### Error Response - **error_message** (string) - Description of the error. - **exception** (string) - Exception details. - **error_code** (string) - Error code. - **request_id** (string) - Unique identifier for the request. #### Response Example (Error) ```json { "error_message": "Signature invalid", "exception": "Signature invalid", "error_code": "gw.SignatureInvalid", "request_id": "0be50b40jextiqli-693" } ``` ``` -------------------------------- ### Umeng Share Platform Configuration Example Source: https://developer.umeng.com/docs/147377/detail/210664 Example showing how to set configuration parameters for various sharing platforms within the Umeng Share SDK. ```java //设置分享平台的配置参数 com.umeng.socialize.PlatformConfig.setFileProvider(...); com.umeng.socialize.PlatformConfig.setWeixin(...); com.umeng.socialize.PlatformConfig.setSinaWeibo(...); com.umeng.socialize.PlatformConfig.setQQZone(...); com.umeng.socialize.PlatformConfig.setDing(...); com.umeng.socialize.PlatformConfig.setAlipay(...); com.umeng.socialize.PlatformConfig.setBytedance(...); com.umeng.socialize.PlatformConfig.setWXWork(...); ``` -------------------------------- ### Complete Application Initialization Example Source: https://developer.umeng.com/docs/119267/detail/118588 This example shows a full implementation within an Android Application class, including setting log enabled, pre-initializing Umeng, and conditionally performing formal initialization based on user privacy consent. ```java public class App extends Application { SharedPreferencesHelper sharedPreferencesHelper; @Override public void onCreate() { super.onCreate(); sharedPreferencesHelper=new SharedPreferencesHelper(this,"umeng"); //设置LOG开关,默认为false UMConfigure.setLogEnabled(true); //友盟预初始化 UMConfigure.preInit(getApplicationContext(),"59892f08310c9307b60023d0","Umeng"); /** * 打开app首次隐私协议授权,以及sdk初始化,判断逻辑请查看SplashTestActivity */ //判断是否同意隐私协议,uminit为1时为已经同意,直接初始化umsdk if(sharedPreferencesHelper.getSharedPreference("uminit","1").equals("1")){ //友盟正式初始化 UmInitConfig umInitConfig=new UmInitConfig(); umInitConfig.UMinit(getApplicationContext()); } } } ``` -------------------------------- ### SDK Debugging Log Example (Incompatible Device) Source: https://developer.umeng.com/docs/2835706/detail/2835635 Log output indicating that the device model is not compatible and the monitor has not been installed. ```log ---------------------------- PROCESS STARTED (4820) for package com.umeng.nns_demo ---------------------------- 2024-07-15 15:08:41.273 5320-5394 UM_ZMD com.umeng.nns_demo I ZmdManager:未适配机型,监控器未安装。 ``` -------------------------------- ### SDK Initialization Example Source: https://developer.umeng.com/docs/2835706/detail/2835635 Example demonstrating how to initialize the Umeng SDK and enable the compliance assistant's debugging logs. Ensure to comment out or remove log enabling lines before application release. ```java public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); final Context appContext = this.getApplicationContext(); UMConfigure.setLogEnabled(true); // 应用上线前需注释或删除此行 UMConfigure.preInit(appContext, "6673dxxxxxxxxxxxxxx36345", "UMENG"); final ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1); executor.schedule(new Runnable() { @Override public void run() { UMConfigure.init(appContext, "6673dxxxxxxxxxxxxxx36345", "UMENG", UMConfigure.DEVICE_TYPE_PHONE, null); // 打开合规助手SDK调试日志开关 ZmdManager.setLogEnabled(true); // 应用上线前需注释或删除此行 // 初始化合规助手SDK ZmdManager.init(appContext, "6673dxxxxxxxxxxxxxx36345", new InitCompleteListener() { @Override public void initComplete() { Log.i("[nns_demo]", "initComplete"); } }); } }, 3, TimeUnit.SECONDS); } } ``` -------------------------------- ### Initialize Flutter SDK Source: https://developer.umeng.com/docs/119267/detail/174923 Guides for initializing the Umeng+ Flutter SDK on Android and iOS platforms, including compliance statements and code examples. ```APIDOC ## Initialize Flutter SDK ### Android 1. **Compliance Pre-initialization** * You must inform users about the Umeng+ SDK service. Add the following clause to your "Privacy Policy": **"Our product integrates the Umeng+ SDK. The Umeng+ SDK needs to collect your device's MAC address, unique device identifier (IMEI/android ID/IDFA/OPENUDID/GUID/IP address/SIM card IMSI information) to provide statistical analysis services, and calibrate report data accuracy through geographical location, providing basic anti-cheating capabilities." * Call the base component library initialization function in the `MainActivity.onCreate()` function of your host App. ```java // The SDK pre-initialization function does not collect device information or upload data to the Umeng backend. // The preInit function has minimal overhead and does not affect the App's initial cold start user experience. public static void preInit(Context context, String appkey, String channel) ``` 2. **General Initialization** * Ensure that upon the App's first cold start, after the user has read your "Privacy Policy" and granted authorization, you call the formal initialization function `UmengCommonSdk.initCommon()` to initialize the statistics SDK. At this point, the SDK will truly collect device information and upload data. Conversely, if the user does not agree to the "Privacy Policy" authorization, you cannot call the `UmengCommonSdk.initCommon()` initialization function. * Once the App obtains user authorization for the "Privacy Policy", for subsequent App cold starts, developers should ensure that the pre-initialization function `UMConfigure.preInit()` is called in the `Application.onCreate()` function. The formal initialization function `UmengCommonSdk.initCommon()` can be called as needed (it can be called immediately after the pre-initialization function, or delayed in a background thread, but it must still be called and cannot be omitted). ```dart static Future initCommon(String androidAppkey, String iosAppkey, String channel); ``` ```dart // Initialize the component-based base library. All Umeng business SDKs must call this initialization interface. UmengCommonSdk.initCommon('59892ebcaed179694b000104', '59892ebcaed179694b000104', 'Umeng'); ``` ### iOS 1. **Compliance Statement** You must inform users that you have chosen the Umeng+ SDK service. Please add the following reference clause to your "Privacy Policy": **"Our product integrates the Umeng+ SDK. The Umeng+ SDK needs to collect your device's MAC address, unique device identifier (IMEI/android ID/IDFA/OPENUDID/GUID/IP address/SIM card IMSI information) to provide statistical analysis services, and calibrate report data accuracy through geographical location, providing basic anti-cheating capabilities." 2. **Compliance Initialization** To ensure your App complies with the Ministry of Industry and Information Technology's relevant compliance requirements after integrating the "Umeng+" statistics SDK, you should ensure that upon the App's first cold start, after the user has read your "Privacy Policy" and granted authorization, you call the formal initialization function to initialize the statistics SDK. At this point, the SDK will truly collect device information and upload data. Conversely, if the user does not agree to the "Privacy Policy" authorization, you cannot call the initialization function. ```objc /** Initialize all Umeng component products @param appKey The appkey registered by the developer on the Umeng official website. @param channel The channel identifier. Can be set to nil to indicate "App Store". */ + (void)initWithAppkey:(NSString *)appKey channel:(NSString *)channel; ``` Once the App obtains user authorization for the "Privacy Policy", for subsequent App cold starts, developers should ensure that the initialization function is called. ``` -------------------------------- ### Get Template List Response Source: https://developer.umeng.com/docs/67966/detail/130645 Example response structure for the template list API call, showing pagination details and a list of templates. ```json { "ret":"SUCCESS", "data":{ "next":true, //是否有上一页 "pre":false, //是否有下一页 "total":8, //总数 "len":3, //当前页面长度 "index":1, //当前页面 "list":[ { "template_name":"测试模板消息", "template_info":"{\"payload\": {\"display_type\": \"notification\", \"body\": {\"after_open\": \"go_app\", \"ticker\": \"it's ticker!\", \"text\": \"${text}\", \"title\": \"${title}\"}}, \"description\": \"it's description!\", \"appkey\": \"5d68cb5e570df370bf000d36\", \"type\": \"unicast\", \"production_mode\": \"false\", \"device_tokens\": \"${device_tokens}\", \"timestamp\": 1598877128272, \"template_name\": \"\\u6d4b\\u8bd5\\u6a21\\u7248\\u6d88\\u606f\"}", "template_keys":"[\"text\",\"title\",\"device_tokens\"]", "appkey":"5d68cb5e570df370bf000d36", "template_id":"22830558207803392", "id":1092 },{ "template_name":"测试模板消息2号", "template_info":"{\"alias_type\": \"${alias_type}\", \"template_name\": \"\\u79bb\\u660e\\u6d4b\\u8bd5123\\u2014\\u2014888\", \"payload\": {\"aps\": {\"badge\": \"${badge}\", \"alert\": {\"subtitle\": \"${subtitle}\", \"title\": \"${title}\", \"body\": \"${body}\"}, \"sound\": \"${sound}\", \"content-available\": \"${content-available}\", \"category\": \"${category}\"}}, \"alias\": \"${alias}\", \"description\": \"${description}\", \"appkey\": \"5d68cb5e570df370bf000d36\", \"type\": \"customizedcast\", \"production_mode\": \"${production_mode}\", \"timestamp\": 1598516268220}", "template_keys":"[\"alias_type\",\"badge\",\"subtitle\",\"title\",\"body\",\"sound\",\"content-available\",\"category\",\"alias\",\"description\",\"production_mode\"]", "appkey":"5d68cb5e570df370bf000d36", "template_id":"21317001620226048", "id":392 },{ "template_name":"测试模板消息3号", "template_info":"{\"alias_type\": \"${alias_type}\", \"template_name\": \"\\u79bb\\u660e\\u6d4b\\u8bd5123\\u2014\\u2014888\", \"payload\": {\"aps\": {\"badge\": \"${badge}\", \"alert\": {\"subtitle\": \"${subtitle}\", \"title\": \"${title}\", \"body\": \"${body}\"}, \"sound\": \"${sound}\", \"content-available\": \"${content-available}\", \"category\": \"${category}\"}}, \"alias\": \"${alias}\", \"description\": \"${description}\", \"appkey\": \"5d68cb5e570df370bf000d36\", \"type\": \"customizedcast\", \"production_mode\": \"${production_mode}\", \"timestamp\": 1598515428918}", "template_keys":"[\"alias_type\",\"badge\",\"subtitle\",\"title\",\"body\",\"sound\",\"category\",\"alias\",\"description\",\"production_mode\"]", "appkey":"5d68cb5e570df370bf000d36", "template_id":"21313481194078208", "id":369 } ] } } ``` -------------------------------- ### Umeng APM SDK Initialization Example Source: https://developer.umeng.com/docs/147377/detail/214853 Demonstrates how to call the preInit and init methods for the Umeng APM SDK. It also shows how to configure crash reporting settings. Ensure user consent to the privacy policy before calling these methods. ```java //U-APM initialization UMConfigure.preInit(this, "xxxx", "umeng"); Bundle bundle = new Bundle(); bundle.putBoolean(UMCrash.KEY_ENABLE_CRASH_JAVA, true); bundle.putBoolean(UMCrash.KEY_ENABLE_CRASH_NATIVE, true); ... UMCrash.initConfig(bundle); UMConfigure.init(EfsApplication.this, "xxxx", "umeng", UMConfigure.DEVICE_TYPE_PHONE, null); ``` -------------------------------- ### Example: Obtaining and Validating UMID Source: https://developer.umeng.com/docs/128606/detail/202254 Demonstrates how to get the application context, retrieve the UMID using `getUMID`, and check if it's empty or null before proceeding. ```java import com.umeng.socialize.tracker.TrackerManager; //... // 获取UMID例子 Context appContext = this.getApplicationContext(); String umid = TrackerManager.getUMID(appContext); if (TextUtils.isEmpty(umid)) { Toast.makeText(appContext,"UMID获取失败,请稍后重试!", Toast.LENGTH_LONG).show(); return; } //... ``` -------------------------------- ### Basic SDK Initialization Example Source: https://developer.umeng.com/docs/191313/detail/193653 Example of initializing the Umeng SDK with a specific app key and channel within the application's launch method. ```Objective-C #import -(BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { [UMConfigure initWithAppkey:@"Your appkey" channel:@"App Store"]; } ``` -------------------------------- ### Example: Custom Launch Stage Tracking Source: https://developer.umeng.com/docs/216238/detail/256358 This example demonstrates how to use beginLaunch and endLaunch to track the duration of a custom initialization phase ('initCommon') within the application's launch sequence. ```objectivec - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. [UMLaunch beginLaunch:@"initCommon"]; [UMConfigure initWithAppkey:@"5fd9c8e6498d9e0d4d916130" channel:@"App Store"]; [UMLaunch endLaunch:@"initCommon"]; NSLog(@"UMAPM version:%@",[UMCrashConfigure getVersion]); [UMLaunch setPredefineLaunchType:UMPredefineLaunchType_DidFinishLaunchingEnd]; return YES; } ``` -------------------------------- ### Custom Download Box Style Source: https://developer.umeng.com/docs/191212/detail/193297 Customize the appearance of the download prompt when a user has not installed the app. This example shows how to inject custom HTML for the download window. ```javascript // ULink integration code parameter modification proxyOpenDownload: myDownloadStyle, // Custom download style function myDownloadStyle(defaultAction, LinkInstance) { if(downloadStyle === true) { var element = document.getElementById("downloadStyle"); // Add an element after the body tag
element.innerHTML = `
X

Please click the download button below to jump to the store for download!

` window.ulinkCloseDownloadTip = function() { document.getElementById('download-window').remove(); } window.ulinkOpenDownload = function() { window.location.href = LinkInstance.solution.downloadUrl } } else { defaultAction(); console.log("Original download style") } } ``` -------------------------------- ### Example: Manual Page View Tracking (ViewWillAppear) Source: https://developer.umeng.com/docs/119267/detail/119517 Pair `beginLogPageView:` with `viewWillAppear:` to start tracking a page view. Replace 'Pagename' with your actual page name. ```Objective-C - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [MobClick beginLogPageView:@"Pagename"]; //("Pagename"为页面名称,可自定义) } ``` -------------------------------- ### Complete Example of Web Cloud Configuration Integration Source: https://developer.umeng.com/docs/67963/detail/196661 A full HTML page demonstrating the integration of the Web Cloud Configuration SDK, including setting default values, fetching configurations, and retrieving parameter values via a button click. ```html 1. 2. 3. 4. 5. 6. 云配测试页面 7. 8. 9. 10. 11. 12. 19. 20. 31. 32. ``` -------------------------------- ### Getting Install Parameters for New Apps Source: https://developer.umeng.com/docs/191212/detail/191230 Call getInstallParams to retrieve parameters for newly installed apps. This method should be called after the user agrees to the privacy policy and with a slight delay to ensure successful fuzzy matching. It supports both traditional and clipboard-based matching, with options to disable clipboard access. ```java //旧版接口,默认读剪切板 MobclickLink.getInstallParams(this, umlinkAdapter); ``` ```java //新版接口,将clipBoardEnabled设置为false,SDK不会读剪切板;设置为true会读剪切板 public static void getInstallParams(Context context, boolean clipBoardEnabled, UMLinkListener listener) ``` -------------------------------- ### Install Umeng SDK for QQ Mini Game (Beta) Source: https://developer.umeng.com/docs/147615/detail/184228 Use this command to install the beta version of the Umeng SDK for QQ mini-games. ```bash npm install umtrack-qq-game@beta --save ``` -------------------------------- ### Example: User Account Sign-In Source: https://developer.umeng.com/docs/119267/detail/119517 Demonstrates how to sign in a user with their ID, optionally specifying the provider. Ensure PUID is less than 64 bytes and provider is less than 32 bytes. ```Objective-C [MobClick profileSignInWithPUID:@"UserID"]; [MobClick profileSignInWithPUID:@"UserID" provider:@"WB"]; ```