Content Providers don't have to be publicly accessible. That being
said, I've used Content Providers, Cursors, and Cached Data Objects to
accomplish this. Really just depends how you want to do it, I think.

I personally like cached data objects because I make a lot of changes
before I want/need to update the database. I also store data to the
SD, so I try to limit my data access for that reason.

On Jun 14, 7:16 pm, Hamy <[email protected]> wrote:
> Hi all,
>
> I am still having some trouble understanding how I am supposed to
> remove rows from my database. Most of the examples I have found use
> ContentProviders, which I do not want to publish for my application.
>
> For the other examples, they typically have something like this :
>
> // Remove a task based on its index
> public boolean removeTask(long _rowIndex) {
>   return db.delete(DATABASE_TABLE, KEY_ID + “=” + _rowIndex, null) >
> 0;
>
> }
>
> which works well, but it means that I would need a Task object to have
> an id associated with it. Is this the standard for working with a
> database intended for a private application only? To make your objects
> store the row ids?
>
> Thanks,
> Hamy
--~--~---------~--~----~------------~-------~--~----~
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