Possible Duplicate:
Create SQLite DB in Android library
I am making a Java library and I need an SQLite database to be opened or created at runtime for my library to store data etc...
All the SQLite API for Android I've seen requires a context, from an activity to create a DB,since I'm doing a library, without activity etc... how can I get an SQLite DB ?
The problem is my library has only one public class, and inside my library in my inner workings I need to create a SQLite DB for private use. So I can't just ask the user to send in a context. Or can I ?
Just see for how does Google do it in their library ? At no point when I'm using the analytics library for Android do I pass anything other then an app id for analytics. And In their documentation you can read: "Pageviews, events and Ecommerce hits are stored in an SQLite database and dispatched to the Google Analytics servers periodically