Skip to content

[Feedback] Kitlin code doesn't work with some errors #4904

@make-clean-all

Description

@make-clean-all

Page: start/getting-started/integrate/q/integration/android

Feedback:

The Kitlin code on "Update a Todo" section in this page doesn't work with some errors. Please change the code into the following:

Amplify.DataStore.query(Todo::class.java, Todo.NAME.eq("Finish quarterly taxes"),
    { matches ->
        if (matches.hasNext()) {
            val original = matches.next()
            val edited = original.copyOfBuilder()
                .name("File quarterly taxes")
                .build()
            Amplify.DataStore.save(edited,
                { Log.i("Tutorial", "Updated item: ${edited.name}") },
                { Log.e("Tutorial", "Update failed.", it) }
            )
        }
    },
    { Log.e("Tutorial", "Query failed", it) }
)

Metadata

Metadata

Assignees

Labels

DataStoreDocumentation dealing with the DataStore, can be for any/all platform(s)amplify/androidbugSomething is not working on the documentation site.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions