Your application/activity will be given a Context by the system. Use that.

On Sun, May 17, 2009 at 10:36 AM, Makeable <[email protected]> wrote:
>
> I have just started on a new application that will use SQLite for
> persistance and Im a bit confused over the usage of a context when
> utilizing the SQLiteOpenHelper.
>
> I have a base class called Storable, which my models extend if they
> need to be persisted.
> i had intended to use a synchronized singleton database adapter, but I
> can't for the life of me understand how to utilize the
> SQLiteOpenHelper as it requires a context, which my models don't
> appear to possess.
>
> Im aware that I can get around this by not using the SQLOpenHelper -
> but if this restriction is in place, I would assume its to prevent
> people creating apps "the wrong way" for android.
>
> What is the best practice way for saving models in the database?
>
> I'm now on my 26th hour of no sleep, so any advice would be very much
> appreciated :)
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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