{"id":19411512,"url":"https://github.com/volcengine/datarangers-sdk-android","last_synced_at":"2025-08-10T22:39:11.205Z","repository":{"id":75738101,"uuid":"522854593","full_name":"volcengine/datarangers-sdk-android","owner":"volcengine","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-06T11:09:44.000Z","size":574,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-24T10:44:10.338Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/volcengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-09T07:54:25.000Z","updated_at":"2025-03-06T11:09:48.000Z","dependencies_parsed_at":"2025-04-24T10:35:21.161Z","dependency_job_id":"5c4d9da0-dfa2-4e1a-a0dc-5b9468cd9b3b","html_url":"https://github.com/volcengine/datarangers-sdk-android","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/volcengine/datarangers-sdk-android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volcengine%2Fdatarangers-sdk-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volcengine%2Fdatarangers-sdk-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volcengine%2Fdatarangers-sdk-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volcengine%2Fdatarangers-sdk-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/volcengine","download_url":"https://codeload.github.com/volcengine/datarangers-sdk-android/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volcengine%2Fdatarangers-sdk-android/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269799407,"owners_count":24477635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T12:21:50.336Z","updated_at":"2025-08-10T22:39:11.116Z","avatar_url":"https://github.com/volcengine.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"English | [简体中文](./README.zh-CN.md)\n\n# DataRangers Android SDK\n## Usage\n\u003e For more information：[Integration Document](https://www.volcengine.com/docs/6285/65980)\n\n### 1. Initialize the SDK\nInitialize SDK in the Application.OnCreate (initialize as early as possible).\n```java\n// Demo Application\npublic class TheApplication extends Application {\n    @Override\n    public void onCreate() {\n        super.onCreate();\n     \n        /* Initialization started */\n        final InitConfig config = new InitConfig(\"your_appid\", \"your_channel\"); // AppID and channel. Contact your customer success manager if you are not sure about the AppID.\n     \n        config.setUriConfig(UriConfig.createByDomain(\"your_report_url\", null)); //data report url\n        config.setAbEnable(true); // enables AB test    \n        config.setAutoTrackEnabled(true); //Enables visual events\n        config.setLogEnable(false); // true: have logs，false:no logs. `false` by default\n        config.setH5CollectEnable (false);//Turn off embedded H5 events tracking\n\n        // Enables encryptions and support to SDK 5.5.1 and above\n        AppLog.setEncryptAndCompress(true);\n      \n        AppLog.init(this, config);\n        /* Initialization ended */\n     \n    }\n}\n```\n### 2. Enable encryption for data report\nUse default encryption or custom encryption.\n```groovy\n// default encryption library\nimplementation 'com.bytedance.frameworks:encryptor:0.0.9-rc.2-private'\n```\n```java\n// custom encryption\nconfig.setEncryptor(\n  new IEncryptor() {\n    @Override\n    public byte[] encrypt(byte[] bytes, int i) {\n      \n    }\n  });\n```\n### 3. Report behavior tracking events through code\nUser behavior logs take the form of events (event) + parameters (params) and one event can contain multiple parameters. In general, ensure that your tracking is in line with your businesses' overarching Tracking Plan which your product operations specialists/data analysts should have designed.\n\nExample: Reporting the play-video behavior of a user.\n```java\n// When the user clicks the Play button of a video\n// Report event only\nAppLog.onEventV3(\"play_video\");\n\n\n// Or:\n\n// When the user clicks the Play button of a video\n// Report event + params\nJSONObject paramsObj = new JSONObject();\ntry {\n    paramsObj.put(\"video_title\", \"Lady Gaga on Oscar\"); //Event parameter：video title \n    paramsObj.put(\"duration\", 20); //Event parameter：play duration \n} catch (JSONException e) { \n    e.printStackTrace();\n}\nAppLog.onEventV3(\"play_video\", paramsObj);\n```\n\n## License\n\nCopyright 2022 Beijing Volcano Engine Technology Ltd. All Rights Reserved.\n\nThe DataRangers SDK was developed by Beijing Volcanoengine Technology Ltd. (hereinafter “Volcanoengine”). Any copyright or patent right is owned by and proprietary material of the Volcanoengine.\n\nDataRangers SDK is available under the Volcanoengine and licensed under the commercial license.  Customers can contact service@volcengine.com for commercial licensing options.  Here is also a link to subscription services agreement: https://www.volcengine.com/docs/6285/69647\n\nWithout Volcanoengine's prior written permission, any use of DataRangers SDK, in particular any use for commercial purposes, is prohibited. This includes, without limitation, incorporation in a commercial product, use in a commercial service, or production of other artefacts for commercial purposes.\n\nWithout Volcanoengine's prior written permission, the DataRangers SDK may not be reproduced, modified and/or made available in any form to any third party.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolcengine%2Fdatarangers-sdk-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvolcengine%2Fdatarangers-sdk-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolcengine%2Fdatarangers-sdk-android/lists"}