Draft: Update Quickstart for Android Java to v5 - DO NOT MERGE#268
Draft
Aaron LaBeau (biozal) wants to merge 1 commit intomainfrom
Draft
Draft: Update Quickstart for Android Java to v5 - DO NOT MERGE#268Aaron LaBeau (biozal) wants to merge 1 commit intomainfrom
Aaron LaBeau (biozal) wants to merge 1 commit intomainfrom
Conversation
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.
Summary
Migrates the Android Java quickstart app from Ditto SDK v4 (
live.ditto:ditto:4.13.1) to v5 (com.ditto:ditto-kotlin-android:5.0.0-rc.3).Key changes
live.ditto:ditto:4.13.1tocom.ditto:ditto-kotlin-android:5.0.0-rc.3ingradle/libs.versions.tomllive.ditto.*tocom.ditto.kotlin.*DittoHelper.kt): The v5 Kotlin SDK usessuspendfunctions (e.g.store.execute()), which aren't directly callable from Java.DittoHelperwraps these withrunBlockingto provide synchronous Java-friendly static methods for initialization, auth, CRUD operations, subscriptions, observers, and sync control.DittoIdentity.OnlinePlayground+DefaultAndroidDittoDependencieswithDittoConfig+DittoFactory.create(). RemovedupdateTransportConfig()(websocket URL now handled by server config),disableSyncWithV3(), andALTER SYSTEM SET DQL_STRICT_MODE = false(no longer needed in v5).auth.expirationHandler+auth.login()pattern usingDittoAuthenticationProvider.development().DittoQueryResultItem.getValue()(Map) replaced withDittoQueryResultItem.jsonString()+JSONObjectparsing inTask.fromQueryItem().DittoSyncPermissions(removed in v5) with manual Android permission checks for Bluetooth, location, and nearby Wi-Fi.catch (DittoError e)tocatch (Exception e)sinceDittoExceptionextendsRuntimeException(unchecked) in v5.envValue()helper to strip shell-style quotes from.envvalues, preventing double-quoted BuildConfig strings.kotlin-composeplugin,compose = truebuild feature, and all Compose dependencies. This app uses XML layouts, and the Compose dependencies were injectingComponentActivityandPreviewActivityinto the merged manifest withexported="true"but no intent filters, which prevented Android Studio from running/debugging the app.Files changed
gradle/libs.versions.tomllive.ditto:ditto→com.ditto:ditto-kotlin-androidapp/build.gradle.ktsenvValue()for BuildConfig quote strippingapp/src/main/java/.../DittoHelper.ktapp/src/main/java/.../MainActivity.javaapp/src/main/java/.../Task.javaTest plan
./gradlew assembleDebug🤖 Generated with Claude Code