'use client' import React, { useState } from 'react' import { SDKDocsSidebar } from '@/components/SDKDocsSidebar' import { Copy, Check, Smartphone } from 'lucide-react' function CopyButton({ text }: { text: string }) { const [copied, setCopied] = useState(false) const handleCopy = async () => { await navigator.clipboard.writeText(text) setCopied(true) setTimeout(() => setCopied(false), 2000) } return ( ) } function CodeBlock({ code, filename }: { code: string; filename?: string }) { return (
{filename && (
{filename}
)}
          {code}
        
) } export default function AndroidSDKPage() { return (

Android SDK (Kotlin)

Native Kotlin SDK fuer Android API 26+ mit Jetpack Compose Unterstuetzung.

{/* Requirements */}

Systemvoraussetzungen

Kotlin Version 1.9+
Min SDK API 26 (Android 8.0)
Compile SDK 34+
{/* Installation */}

Installation

{/* Basic Setup */}

Grundlegende Einrichtung

{/* Jetpack Compose */}

Jetpack Compose Integration

{/* Traditional Android */}

View-basierte Integration

updateUI(state) } } // Banner anzeigen wenn noetig if (ConsentManager.needsConsent()) { ConsentManager.showBanner(this) } } private fun updateUI(state: ConsentState?) { if (state?.hasConsent(ConsentCategory.ANALYTICS) == true) { loadAnalytics() } } fun onAcceptAllClick(view: View) { lifecycleScope.launch { ConsentManager.acceptAll() } } }`} />
{/* API Reference */}

API Referenz

Methode Beschreibung
configure() SDK konfigurieren
initialize() SDK initialisieren (suspend)
hasConsent() Consent fuer Kategorie pruefen
consentFlow Flow fuer reaktive Updates
acceptAll() Alle akzeptieren (suspend)
rejectAll() Alle ablehnen (suspend)
setConsent() Kategorien setzen (suspend)
showBanner() Banner als DialogFragment
) }