NexaGuard
  1. Mobile-SDKs
NexaGuard
  • Getting-Started
    • NexaGuard Developer Documentation
    • Quickstart (5 to 10 Minutes)
    • Documentation Overview
    • Concepts and Glossary
  • Compliance-and-Standards
    • Compliance Overview
    • IAB TCF v2.3 Support
    • Google Consent Mode v2 Validation
    • TCF API Validation
    • Audit Checklist (Pre-Launch)
  • Web-and-CMS-Integrations
    • NexaGuard CMP SDK – Web & GTM Setup
    • Integrate NexaGuard CMP with Webflow and Wix
    • Integrate NexaGuard CMP with WordPress
    • Integrate NexaGuard CMP with Drupal
    • Integrate NexaGuard CMP with Shopify
  • Mobile-SDKs
    • NexaGuard CMP SDK - iOS Setup
    • iOS SDK API Reference
    • NexaGuard CMP SDK - Android Setup
    • Android SDK API Reference
    • App Attribution Partner (AAP) Integrations
  • Developer-Reference
    • Web JS API Reference
    • Consent Event Schema
    • Deployment and Environments
    • NexaGuard Debug Tool
    • Troubleshooting Playbook
    • Performance and Best Practices
    • Accessibility and UX Guidelines
    • Localization Workflow
    • Migration Guide
  • Security-and-Privacy
    • Security Overview
    • Privacy Architecture
    • Data and Logging Transparency
    • Subprocessors
    • CSP and Network Allowlist
  • Enterprise-and-Legal
    • DPA and Legal Pack
    • RFP Feature Matrix
    • Status and Reliability
    • Support and Escalation
    • NexaGuard CMP SDK – Commercial Licence
  • Operations
    • Changelog and Version Policy
  1. Mobile-SDKs

NexaGuard CMP SDK - Android Setup

Last updated: February 21, 2026
Artifactimplementation("com.nexaguard:nxg-sdk:1.0.29")
MinimumAPI 24 · Kotlin 1.9 · AGP 8
Footprintapprox. 200 kB AAR

1 Add Maven Central#

settings.gradle (top-level):

2 Add the Dependency#

app/build.gradle.kts:
Pin exact versions in production for reproducible builds.
Snapshot builds:
Use <nextVersion>-SNAPSHOT and add:

3 Initialize and Display the Banner#

Initialization should occur once during application startup.
Android API expects an Activity for initialization and banner methods.

Jetpack Compose Example#

Classic View-Based (Activity)#


4 Public API Summary#

MethodDescription
initialize(activity, settingsId, onComplete?)Loads configuration, vendor list (GVL), and initializes consent state.
forceShowBanner(activity)Reopens consent UI/preferences for review/update.
Consent actions and TC-string writing are handled internally by SDK UI flows.

5 Consent Mode: Basic vs. Advanced#

NexaGuard CMP fully supports Google Consent Mode.

Basic Mode (Default)#

Google SDKs remain blocked until user consent.
No advertising or analytics signals are transmitted prior to user interaction.
Recommended for strict regulatory environments.

Advanced Mode#

Google SDKs initialize immediately.
Limited, cookieless signals may be transmitted until user choice.
Consent updates automatically adjust SDK behavior.
Important: Consent Mode is a technical framework.
Customers remain responsible for regulatory configuration decisions.

6 IAB TCF v2.3 Support#

NexaGuard CMP Android implementation supports IAB TCF v2.3, including:
TC string generation and lifecycle management
Purpose and vendor consent tracking
Multi-segment TC string output:
core segment
VendorsDisclosed segment (type 1)
VendorsAllowed segment (type 2)
Compatibility with downstream SDK consent routing
If TCF is enabled, the TC string is stored and accessible via SDK methods.

7 Quickstart Verification Checklist#

Before production release:
1.
Initialize once during application startup.
2.
Confirm banner displays on first launch.
3.
Confirm reopen action works from privacy/settings screen.
4.
Confirm consent changes propagate to analytics or attribution SDKs.
5.
Validate TC string behavior (if TCF enabled).
6.
Capture QA evidence for accept, reject, and granular flows.

8 Performance Considerations#

Initialization is lightweight and asynchronous.
SDK footprint is minimal (~200 kB).
Consent updates are non-blocking.
Avoid repeated initialization in multiple activities.

9 Rollback Procedure#

If rollback is required:
1.
Disable CMP feature flag or revert to prior build.
2.
Remove com.nexaguard:nxg-sdk dependency.
3.
Rebuild and confirm no CMP initialization calls remain.
4.
Validate analytics SDK behavior post-removal.

10 Support#

For integration assistance:
[email protected]
[email protected]
Full documentation: https://developer.nexaguard.com

© 2026 NexaGuard Inc. All rights reserved.
Previous
iOS SDK API Reference
Next
Android SDK API Reference