Code Monkey home page Code Monkey logo

Comments (9)

WalkerWalker avatar WalkerWalker commented on September 14, 2024

or is it true that the delete insert and update operation on certain URI guarantees to notify that exact URI and cursor returned by the query of the same URI will be notified (and thus invoke onLoadFinished).

I only need to declare @NotifyInsert, @NotifyBulkInsert, @NotifyUpdate and @NotifyDelete when other URIs are also affected?

from schematic.

SimonVT avatar SimonVT commented on September 14, 2024

Yep, the Uri you use is notified by default. If you want some other behavior you use one of those annotations.

from schematic.

WalkerWalker avatar WalkerWalker commented on September 14, 2024

Thanks!! Then can I say this part of the sample code is redundant?

from schematic.

SimonVT avatar SimonVT commented on September 14, 2024

It's redundant, yes. Was probably added to test that it works :)

from schematic.

WalkerWalker avatar WalkerWalker commented on September 14, 2024

Thanks!! One more question, is it true that adding the update/delete/insert annotations will notify those returned URIs in addition to the modified URI, right?

It's not replacing. It's declaring some extra uri getting notified plus the Uri by default.

from schematic.

SimonVT avatar SimonVT commented on September 14, 2024

It replaces, but nothing's stopping you from returning the same Uri. I encourage you to check out the generated code :)

from schematic.

WalkerWalker avatar WalkerWalker commented on September 14, 2024

I just did. I guess it's this chunk of code did the replace job, right?

I hope some helpful doc can be added because this @NotifyXxxxx annotations don't really explain themselves.

from schematic.

SimonVT avatar SimonVT commented on September 14, 2024

Yes, that's the code that generates the ContentProvider. You can see the class it generates in build/generated/source/apt.

from schematic.

WalkerWalker avatar WalkerWalker commented on September 14, 2024

Wow. I didn't know that!!!!! This is so helpful.

btw, it's app/build/source/apt in my android studio

from schematic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.