Wednesday, July 20, 2011

Re: [android-developers] Use CursorLoader for SQLiteDatabase?

Thank you for the reply I will let you know how I get on.

On 21/07/2011, at 5:10 AM, Mark Murphy wrote:

> On Wed, Jul 20, 2011 at 12:59 PM, Julius Spencer <julius@msa.co.nz> wrote:
>> The CursorLoader documentation describes itself as:
>> "A loader that queries the ContentResolver and returns a Cursor."
>>
>> Does anyone know if it's possible to use a CursorLoader for an application's SQLiteDatabase?
>
> It should be possible to use the Loader framework. CursorLoader is for
> content providers. We'd need a SQLiteLoader for a local database.
> Writing that is on my to-do list, before I cover loaders anywhere in
> my books. Not quite sure when I'm going to get around to that,
> though...
>
>> Do I have to make the database a Content Provider so I can provide a Uri?
>
> If you wish to use CursorLoader, yes.
>
>> If I do, can a Content Provider be private to the application (ie. not accessible to other applications on the device)?
>
> Yes. Make sure you have android:exported="false" in the <provider>
> element -- by default, providers are exported.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training...At Your Office: http://commonsware.com/training
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate