Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions llms.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!-- repo: clix-so/clix-android-sdk -->
<!-- ref: main -->
<!-- commit: 18f55d0c061fc895a3c533280675731b715260d9 -->
<!-- generated_at: 2025-12-17T05:03:30Z -->
<!-- commit: 0e5a6d094735ecd021a619f02b310fea9baae3a0 -->
<!-- generated_at: 2026-02-13T06:46:16Z -->
# Platform: Android

## /
- [Build.gradle](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/build.gradle.kts): Top-level Gradle build script configuring shared Android/Kotlin/ktfmt/GMS plugins (without applying them) and enforcing a specific `commons-compress` version via the `classpath` configuration’s resolution strategy for all modules in the SDK.
- [Settings.gradle](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/settings.gradle.kts): Defines Gradle plugin and dependency repositories, enforces centralized repository resolution, sets the root project name `clix-android-sdk`, and includes the `:clix` SDK module and `:samples:basic-app` sample app modules in the build.
- [Gradle](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/gradle.properties): Defines project-wide Gradle configuration for the SDK, including JVM args, AndroidX usage, Kotlin code style, and non-transitive R class behavior that affects build performance, resource namespacing, and compatibility across all modules.
- [Readme](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/README.md): README.md documents installation and Firebase setup, SDK initialization (Clix.
- [Changelog](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/CHANGELOG.md): Changelog documenting semver releases and dates, enumerating SDK changes such as ClixConfig initialization, coroutine/thread-safe singletons, Clix.Notification/ClixMessagingService FCM integration and foreground/background handler behavior, user/property APIs, event tracking, serialization fixes, logging, and bug fixes.
- [Changelog](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/CHANGELOG.md): Changelog documenting semantic-versioned SDK releases, recording additions/bugfixes such as ClixConfig initialization (Kotlin 1.9.
- [License](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/LICENSE): Defines the SDK’s licensing terms as a modified MIT license, permitting use, modification, and distribution only when integrated with Clix services and requiring inclusion of copyright and permission notices in all substantial copies.

## clix
Expand All @@ -18,8 +18,8 @@
## clix/src/main/kotlin/so/clix/core
- [Clixnotification](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/core/ClixNotification.kt): ClixNotification is a singleton that configures push behavior (configure/autoRequestPermission/autoHandleLandingURL), exposes handler APIs (onMessage, onBackgroundMessage, onNotificationOpened, onFcmTokenError), manages FCM token/permission ops, and routes payloads to Clix services and optional landing URLs.
- [Clixenvironment](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/core/ClixEnvironment.kt): Serializable internal ClixEnvironment constructs and serializes ClixDevice from Context/config/deviceId/token (collecting appVersion, advertising ID via reflection, push permission, timezone/locale), exposes synchronized getDevice/setDevice and companion helpers getAppVersion/getAdId/getIsPushPermissionGranted.
- [Clixconfig](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/core/ClixConfig.kt): Defines the serializable `ClixConfig` data class that centralizes SDK initialization settings (project ID, API key, API endpoint, `ClixLogLevel`, and extra HTTP headers) used to configure Clix network calls and logging behavior.
- [Clix](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/core/Clix.kt): Clix.kt defines the Clix singleton SDK entrypoint that initializes services (storage, token, device, event, notification), persists config, fetches/upserts FCM tokens asynchronously, exposes public APIs (initialize, user ID/properties, trackEvent, setLogLevel, getDeviceId) and Notification, and logs errors via ClixLogger.
- [Clixconfig](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/core/ClixConfig.kt): Serializable data class ClixConfig encapsulates SDK runtime configuration—projectId, apiKey, endpoint (default https://api.clix.
- [Clix](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/core/Clix.kt): Singleton SDK entry point managing lifecycle, storage, device/session/token/event/notification services; initialize(context, config) saves config, fetches/upserts FCM token via FirebaseMessaging, exposes Clix.Notification plus suspend APIs (setUserId/setUserProperty/trackEvent), setLogLevel, getDeviceId, and auto-initialize from saved config for terminated-process push handling.

## clix/src/main/kotlin/so/clix/models
- [Notificationcontext](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/models/NotificationContext.kt): Internal data class NotificationContext encapsulating notificationData: Map<String, Any?> and autoOpenLandingURL flag (default true), used by notification-handling flows to decide whether to auto-open landing URLs; module-internal.
Expand All @@ -31,9 +31,10 @@
## clix/src/main/kotlin/so/clix/notification
- [Permissionactivity](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/notification/PermissionActivity.kt): Internal transparent PermissionActivity that requests POST_NOTIFICATIONS on Android TIRAMISU+, persists pending/result/timestamp in Clix.storageService to recover after restarts, exposes internal suspend requestPermission(context) which starts the activity, awaits result via a synchronized callback, and enforces a 5s timeout.
- [Clixmessagingservice](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/notification/ClixMessagingService.kt): Firebase MessagingService that auto-initializes Clix, parses FCM RemoteMessage into ClixPushNotificationPayload in onMessageReceived and dispatches to Clix.Notification via coroutine, and handles onNewToken by saving/upserting tokens (Clix.
- [Notificationtappedactivity](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/notification/NotificationTappedActivity.kt): Manifest-registered Activity that handles notification tap intents by extracting extras (messageId, landingUrl, journey IDs, autoHandleLandingURL, JSON data), deserializing data, and invoking ClixNotification.handleNotificationTapped (with NotificationContext and ClixPushNotificationPayload), then finishes.
- [Notificationtappedactivity](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/notification/NotificationTappedActivity.kt): NotificationTappedActivity is the manifest entry point for notification taps: it parses Intent extras (messageId, landingUrl, userJourney ids, autoHandleLandingURL, JSON data), sets Clix.sessionService.

## clix/src/main/kotlin/so/clix/services
- [Sessionservice](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/services/SessionService.kt): SessionService registers as a ProcessLifecycleOwner observer to track app foreground/background, persisting last-activity timestamps to StorageService, starting a new session (EventService.trackEvent in Clix.
- [Notificationservice](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/services/NotificationService.kt): NotificationService (Context, StorageService, EventService) manages channels/permissions, deduplicates and shows push notifications (creates NotificationCompat notifications with optional remote image and PendingIntent to NotificationTappedActivity), tracks receive/tap events, and exposes handleNotificationReceived/tapped, requestNotificationPermission, preferences/reset.
- [Storageservice](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/services/StorageService.kt): Provides a type-safe JSON-backed wrapper around Android `SharedPreferences` for internal SDK persistence, exposing generic `set<T>`, `get<T>`, and `remove` APIs using Kotlinx Serialization with `ignoreUnknownKeys` and logging deserialization failures via `ClixLogger`.
- [Deviceservice](https://raw.githubusercontent.com/clix-so/clix-android-sdk/main/clix/src/main/kotlin/so/clix/services/DeviceService.kt): Manages device identity, local storage, and remote device/user-property synchronization via DeviceAPIService using StorageService and Clix.environment—providing getCurrentDeviceId(), set/remove project userId, update/remove user properties, upsert token and push-permission; logs and handles network/serialization errors.
Expand Down