On Sun, May 24, 2009 at 8:08 AM, Mark Murphy <[email protected]>wrote:

>
> Marco Nelissen wrote:
> > On Sun, May 24, 2009 at 3:28 AM, Mark Murphy <[email protected]
> > <mailto:[email protected]>> wrote:
> > (...)
> >
> >     2. Reduced API. You can put LIMIT clauses in SQLite calls but not in
> >     ContentProvider calls, for example.
> >
> >
> > But if it's your own content provider, you could expose this
> > functionality through URIs, e.g. something like
> > content://yourdomain/your/data/path/0/100 could ask your ContentProvider
> > to return 100 results starting at 0.
>
> Does that really work, though?


It should.

For example, are there things in Android that might assume that 100, in
> your above example, is the _ID of some instance?


I don't think so. The meaning of the Uri is defined by the content provider.
The rest of the framework (i.e. the listview or listadapter) should only
care about the resulting Cursor.

I've never felt comfortable that content:// Uri paths are truly opaque
> to the system. If anyone has any examples of a ContentProvider using
> unusual paths like content://yourdomain/your/data/path/0/100, I'd love
> to see them.


While I can't think of such an example, but note that
http://developer.android.com/reference/android/content/ContentProvider.htmldoes
say:

*When a request is made via a ContentResolver the sy**stem inspects the
authority of the given URI and passes the request to the content provider
registered with the authority. The content provider can interpret the rest
of the URI however it wants.
*

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to