{"id":19399590,"url":"https://github.com/conversant/android-epsilon-gdpr-cmp","last_synced_at":"2025-07-26T13:40:40.166Z","repository":{"id":86639582,"uuid":"320653327","full_name":"conversant/android-epsilon-gdpr-cmp","owner":"conversant","description":"Android - Epsilon GDPR Consent Management","archived":false,"fork":false,"pushed_at":"2021-01-26T20:51:39.000Z","size":246,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-11T19:20:02.440Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conversant.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}},"created_at":"2020-12-11T18:29:32.000Z","updated_at":"2021-03-01T18:49:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"606600ed-9bc5-41dc-933a-cdce79813841","html_url":"https://github.com/conversant/android-epsilon-gdpr-cmp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/conversant/android-epsilon-gdpr-cmp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conversant%2Fandroid-epsilon-gdpr-cmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conversant%2Fandroid-epsilon-gdpr-cmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conversant%2Fandroid-epsilon-gdpr-cmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conversant%2Fandroid-epsilon-gdpr-cmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conversant","download_url":"https://codeload.github.com/conversant/android-epsilon-gdpr-cmp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conversant%2Fandroid-epsilon-gdpr-cmp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267175760,"owners_count":24047923,"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-07-26T02:00:08.937Z","response_time":62,"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-10T11:10:14.869Z","updated_at":"2025-07-26T13:40:40.158Z","avatar_url":"https://github.com/conversant.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Conversant CMP Readme\n\n##### Introduction\n\n###### The Conversant CMP Widget allows publishers to do two essential functions:\n\n1.    Determine whether consent needs to be gathered based upon the users location.\n2.    Gather consent once it has been determined it is required. Consent is gathered using a widget which allows a user to accept data gathering on a company and purpose basis.  Users can also accept or deny all consent.\n\n\n##### Installation\n###### Add the compiled AAR file (the library must be already built)\n1. Click **File \u003e New \u003e Import Module**.\n2. Click **Import .JAR/.AAR Package** then click **Next**.\n3. Enter the location of the compiled AAR file of cmp's widget then\n   click **Finish**.\n4. Open the app module's build.gradle file and add a new line to the\ndependencies block as shown in the following snippet:\n\n```\ndependencies {\n    implementation project(\":cmp\")\n}\n```\n\n5. Click **Sync Project with Gradle Files**.\n\n##### Using the library module.\n\n\nGenerally speaking you should gather consent as soon as you first launch\nyour app. However, you can do it at any point you prefer. It is\nessential that you initialize the app as soon as possible. Remember, any\nthird party frameworks, such as advertising or analytics will NOT BE\nABLE TO OPERATE until you have gathered consent, so it is essential that\nyou determine your consent requirements and gather consent before you\ninitialize your other frameworks. However, most high quality frameworks\nshould be checking for consent and should also be watching the consent\nvalues for changes, so it may be alright to initialize those frameworks\nand then gather consent. Read documentation for each framework and act\naccordingly.\n\n##### How to use?\n###### 1.Import the library module where you would like to initialize the app.\n\n###### Kotlin.\n```\nimport com.conversantmedia.gdprcmp.ConversantCmp\n```\n###### 2.Create JSON configuration either manually or load from an URL and\ninitialize the ConversantCMP widget within the Activity. If you are\nunsure of initialization parameters for these objects, check the\ndocumentation for each function (option click on the function).\n\nTo load the **static** config data\n\n* Initializing the ConversantCmp class first if your using inside the  fragment class check for context before initilazation and pass the static JSON config data as parameter to the cmp's method **setConfig**.\n\n###### Kotlin.\n```kotlin\n private fun initConversantCmp() {\n        cmp = context?.let { ConversantCmp(it) }\n        cmp?.setConfig(getStaticConfig())\n    }\n\nprivate fun getStaticConfig(): String {\n        return \"{\\\"countryCode\\\":\\\"US\\\"\\n\" +\n                \",\\\"gdprAppliesGlobally\\\":true,\\n\" +\n                \"\\\"policyUrl\\\":\\\"http://www.adtech123.com/privacy/\\\"\\n\" +\n                \",\\\"version\\\":\\\"1\\\"\\n\" +\n                \",\\\"id\\\":1\\n\" +\n                \"}\"\n    }\n```\n\n###### Java.\n```\nprivate void initConversantCmp(){\n        try {\n            cmp = new ConversantCmp(this);\n            cmp.setConfig(getStaticConfig());\n        } catch (CnvrCmpException e) {\n           e.printStackTrace();\n        }\n    }\n    \nprivate String getStaticConfig() {\n        return \"{\\\"countryCode\\\":\\\"US\\\"\\n\" +\n                \",\\\"gdprAppliesGlobally\\\":true,\\n\" +\n                \"\\\"policyUrl\\\":\\\"http://www.adtech123.com/privacy/\\\"\\n\" +\n                \",\\\"version\\\":\\\"1\\\"\\n\" +\n                \",\\\"id\\\":1\\n\" +\n                \"}\";\n    }\n```\n\n* Please note, the gdprAppliesGlobally will be required to be set to\n  true for testing the CMP widget in case the publisher is not located\n  within a region where GDPR regulations apply.\n* This configuration parameter is used to signify that the CMP should\n  show for every user regardless of GEO location/IP Address. This would\n  also be the case if the publisher is located within the jurisdiction\n  of the EU and would like to apply the GDPR regulations to all of its\n  users.\n\n###### 3. To present the CMP widget popup use the following\n\n###### Kotlin.\n```kotlin\n button.setOnClickListener {\n            activity?.let { it1 -\u003e cmp?.presentCMPWidget(it1, requestCode = 100) }\n        }\n```\n\n###### Java.\n```\nbutton.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                    conversantCmp.presentCMPWidget(YourActivity.this,   100);\n            }\n        });\n```\n###### 4. To allow the user to modify consent use the following\n\n###### Kotlin.\n```kotlin\n button.setOnClickListener {\n            activity?.let { it1 -\u003e\n                cmp?.modifyConsent(it1, requestCode = 100)\n            }\n        }\n```\n\n###### java.\n```\nbutton.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                    conversantCmp.modifyConsent(YourActivity.this,   100);\n            }\n        });\n```\n\n###### 5. To check if GDPR consent is required use the following. Result will be an optional NULL in case of timeout depending upon the language used.\n\n###### kotlin.\n```kotlin\ncmp?.checkGDPRIsRequired(activity, object : OnCompletion {\n            override fun onComplete(isRequire: Boolean?) {\n                if (isRequire != null) {\n                //GDPR status if it is required true else return false\n                }\n            }\n        })\n```\n\n###### java.\n```\ncmp.checkGDPRIsRequired(this, new ConversantCmp.OnCompletion() {\n            @Override\n            public void onComplete(@Nullable Boolean isRequire) {\n                if (isRequire != null){\n                   //GDPR status if it is required true else return false\n                }\n            }\n        });\n```\n\n* Please note that the GDPR check is already called internally for both\n  present and modify consent APIs so not required to be called\n  additionally for those two functions.\n\n\n\n###### 6. To delete the stored consents, just delete the required keys from the\nshared preference as per requirement. Here we are deleting two keys as\nan example.\n\n###### kotlin.\n```kotlin\n\nrevoke.setOnClickListener {\n            prefs?.edit()?.remove(\"IABTCF_TCString\")?.apply()\n            prefs?.edit()?.remove(\"CNVR_PersistentData\")?.apply()\n        }\n```\n\n###### java.\n```\n revoke.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                     sharedPreferences.edit().remove(\"IABTCF_TCString\").apply();\n                     sharedPreferences.edit().remove(\"CNVR_PersistentData\").apply();\n            }\n        });\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconversant%2Fandroid-epsilon-gdpr-cmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconversant%2Fandroid-epsilon-gdpr-cmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconversant%2Fandroid-epsilon-gdpr-cmp/lists"}