Repository navigation
feat: android sdk (kotlin) for the events collector - #17
Open
yuvrajjsingh0 wants to merge 1 commit into
Open
yuvrajjsingh0 wants to merge 1 commit into
yuvrajjsingh0 wants to merge 1 commit into
Conversation
Adds clients/android, the Kotlin counterpart of clients/typescript, published as io.juspay:sudoquery-android. Apps call SudoQuery.init/track/setUser/flush; events are persisted to disk, batched and posted to /v1/events/batch. - Event.kt holds every wire type; `typealias CanonicalEvent = EventV1` is the one line that picks the event class the SDK sends. - Batching, on-disk queue and upload are ported from hyper-sdk-android's experimental log pipeline, with its bugs fixed: any 2xx counts as sent, 400/413/422 are dropped instead of blocking the queue, other failures back off exponentially, and the size cap no longer wipes the whole queue. - CI runs tests, lint and the minified sample on changes to clients/android; tags android-v* publish to Maven Central. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
clients/android, the Kotlin counterpart ofclients/typescript, published asio.juspay:sudoquery-android. It is a standalone Gradle build, outside the Cargo workspace.What's in it
init,track(Map orJSONObject),setUser/removeUser/getUser, super properties andflush, plusreset()for logout. Every method is static for Java, thread-safe, and never throws into the host app.sudoquery/src/main/kotlin/io/juspay/sudoquery/Event.ktholds every wire type.EventV1matchesCollectorEventfield for field and in the same key order, nulls included.typealias CanonicalEvent = EventV1is the one line that picks the event class. Batching, storage and upload only handle serialized events, so switching envelopes is that line plus the new class.Retry-After).noBackupFilesDir, notcacheDir.anon_id, the user id and the session persist across restarts. A session ends after 30 min without events. Delivery is at least once, and a resend is byte-identical with the same event ids.clients/android/sample, a minified release build used for end-to-end checks.android-client.ymlruns tests, lint, the minified sample build andpublishToMavenLocalon changes toclients/android.release-android.ymlpublishes to Maven Central onandroid-v*tags.release.ymlonly matchesv*, so npm releases are unaffected.Verification
LiveCollectorTestsends through the full pipeline.anon_id, user and session handling acrosssetUserandreset.Before the first release
io.juspaynamespace (DNS TXT on juspay.io), then add the secretsMAVEN_CENTRAL_USERNAME,MAVEN_CENTRAL_PASSWORD,SIGNING_KEYandSIGNING_KEY_PASSWORD.clients/typescript/package.json, but the repo has no LICENSE file. Please confirm.AGP is pinned to 9.1.1 so Android Studio Panda 3 can open the project.
🤖 Generated with Claude Code