{"id":17753182,"url":"https://github.com/configcat/android-sdk","last_synced_at":"2025-04-01T18:30:53.955Z","repository":{"id":38680113,"uuid":"194637619","full_name":"configcat/android-sdk","owner":"configcat","description":"ConfigCat SDK for Android. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.","archived":false,"fork":false,"pushed_at":"2024-04-09T18:29:33.000Z","size":844,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-09T23:17:54.264Z","etag":null,"topics":["android","android-sdk","configcat-sdk","feature-flags","feature-management","feature-toggle","featureflags","java","kotlin","kotlin-android","remote-config","sdk"],"latest_commit_sha":null,"homepage":"https://configcat.com/docs/sdk-reference/android","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/configcat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-07-01T09:01:40.000Z","updated_at":"2024-04-23T13:56:56.038Z","dependencies_parsed_at":"2023-10-11T16:09:30.836Z","dependency_job_id":"f67681a6-b323-46a3-ad1f-90d3da66db68","html_url":"https://github.com/configcat/android-sdk","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fandroid-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fandroid-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fandroid-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fandroid-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/configcat","download_url":"https://codeload.github.com/configcat/android-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246635949,"owners_count":20809331,"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","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":["android","android-sdk","configcat-sdk","feature-flags","feature-management","feature-toggle","featureflags","java","kotlin","kotlin-android","remote-config","sdk"],"created_at":"2024-10-26T13:23:08.522Z","updated_at":"2025-04-01T18:30:53.945Z","avatar_url":"https://github.com/configcat.png","language":"Java","readme":"# ConfigCat SDK for Android\n[![Android CI](https://github.com/configcat/android-sdk/actions/workflows/android-ci.yml/badge.svg?branch=master)](https://github.com/configcat/android-sdk/actions/workflows/android-ci.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/com.configcat/configcat-android-client)](https://central.sonatype.com/artifact/com.configcat/configcat-android-client)\n[![Javadocs](http://javadoc.io/badge/com.configcat/configcat-android-client.svg)](http://javadoc.io/doc/com.configcat/configcat-android-client)\n[![Coverage Status](https://img.shields.io/sonar/coverage/configcat_android-sdk?logo=SonarCloud\u0026server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/project/overview?id=configcat_android-sdk)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=configcat_android-sdk\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=configcat_android-sdk)\n![License](https://img.shields.io/github/license/configcat/android-sdk.svg)\n\nConfigCat SDK for Android provides easy integration for your application to [ConfigCat](https://configcat.com).\n\n## Getting started\n\n### 1. Install the package\n*Gradle:*\n```groovy\nimplementation 'com.configcat:configcat-android-client:8.+'\n```\n\n### 2. Go to the \u003ca href=\"https://app.configcat.com/sdkkey\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e to get your *SDK Key*:\n![SDK-KEY](https://raw.githubusercontent.com/ConfigCat/android-sdk/master/media/readme02-3.png  \"SDK-KEY\")\n\n### 3. Import *com.configcat.** to your application\n```java\nimport com.configcat.*;\n```\n\n### 4. Create the *ConfigCat* client instance\n```java\nConfigCatClient client = ConfigCatClient.get(\"#YOUR-SDK-KEY#\");\n```\n\n### 5. Get your setting value:\n```java\nboolean isMyAwesomeFeatureEnabled = client.getValue(Boolean.class, \"isMyAwesomeFeatureEnabled\", false);\nif(isMyAwesomeFeatureEnabled) {\n    doTheNewThing();\n} else {\n    doTheOldThing();\n}\n```\nOr use the async APIs:\n\n```java\nclient.getValueAsync(Boolean.class, \"isMyAwesomeFeatureEnabled\", false)\n    .thenAccept(isMyAwesomeFeatureEnabled -\u003e {\n        if(isMyAwesomeFeatureEnabled) {\n            doTheNewThing();\n        } else {\n            doTheOldThing();\n        }\n    });\n```\n\n## Compatibility\nThe minimum supported Android SDK version is 21 (Lollipop).\n\n## R8 (ProGuard)\nWhen you use R8 or ProGuard, the aar artifact automatically applies the [included rules](configcat-proguard-rules.pro) for the SDK.\n\n## Getting user specific setting values with Targeting\nUsing this feature, you will be able to get different setting values for different users in your application by passing a `User Object` to the `getValue()` function.\n\nRead more about [Targeting here](https://configcat.com/docs/advanced/targeting/).\n\n\n## User object\nPercentage and targeted rollouts are calculated by the user object you can optionally pass to the configuration requests.\nThe user object must be created with a **mandatory** identifier parameter which should uniquely identify each user:\n```java\nUser user = User.newBuilder()\n        .build(\"#USER-IDENTIFIER#\"); // mandatory\n\nboolean isMyAwesomeFeatureEnabled = client.getValue(Boolean.class, \"isMyAwesomeFeatureEnabled\", user, false);\nif(isMyAwesomeFeatureEnabled) {\n    doTheNewThing();\n} else{\n    doTheOldThing();\n}\n```\n\n## Sample/Demo app\n* [Sample Android app](https://github.com/ConfigCat/android-sdk/tree/master/samples/android)\n\n## Polling Modes\nThe ConfigCat SDK supports 3 different polling mechanisms to acquire the setting values from ConfigCat. After latest setting values are downloaded, they are stored in the internal cache then all requests are served from there. Read more about Polling Modes and how to use them at [ConfigCat Java Docs](https://configcat.com/docs/sdk-reference/java/) or [ConfigCat Android Docs](https://configcat.com/docs/sdk-reference/android/).\n\n## Sensitive information handling\n\nThe frontend/mobile SDKs are running in your users' browsers/devices. The SDK is downloading a [config.json](https://configcat.com/docs/requests/) file from ConfigCat's CDN servers. The URL path for this config.json file contains your SDK key, so the SDK key and the content of your config.json file (feature flag keys, feature flag values, targeting rules, % rules) can be visible to your users. \nThis SDK key is read-only, it only allows downloading your config.json file, but nobody can make any changes with it in your ConfigCat account.  \nSuppose you don't want your SDK key or the content of your config.json file visible to your users. In that case, we recommend you use the SDK only in your backend applications and call a backend endpoint in your frontend/mobile application to evaluate the feature flags for a specific application customer.  \nAlso, we recommend using [sensitive targeting comparators](https://configcat.com/docs/advanced/targeting/#sensitive-text-comparators) in the targeting rules of those feature flags that are used in the frontend/mobile SDKs.\n\n## Need help?\nhttps://configcat.com/support\n\n## Contributing\nContributions are welcome. For more info please read the [Contribution Guideline](CONTRIBUTING.md).\n\n## About ConfigCat\nConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using \u003ca href=\"http://app.configcat.com\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.\n\nConfigCat is a \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003ehosted feature flag service\u003c/a\u003e. Manage feature toggles across frontend, backend, mobile, desktop apps. \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003eAlternative to LaunchDarkly\u003c/a\u003e. Management app + feature flag SDKs.\n\n- [Official ConfigCat SDK's for other platforms](https://github.com/configcat)\n- [Documentation](https://configcat.com/docs)\n- [Blog](https://configcat.com/blog)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fandroid-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfigcat%2Fandroid-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fandroid-sdk/lists"}