How to use SQLiteOpenHelper without or less restrictive use of Context?
- by Pentium10
If you extend SQLiteOpenHelper, for the Constructor you have to use a Context. I am wondering if there is a way to leave this out, and be able to work with database tables without a Context.
Or at least be least restrictive, I mean a way of project/class structure that will make history the several context passings I have to do now.
As it is my application has several level of classes, chained in each other, and there are a few that connects to the database, but have no whatsoever influence on the interface, so they don't actually need the Context.
Are you creating your classes in the way that you pass each time a Context to them?
If not, how you do, how you reuse a Context in a short class?