I have a ContentProvider Class and a DatabaseHelper Class (extends SQLiteOpenHelper).
The ContentProvider instantiates the Helper which needs access to a Context because the constructor requires it:
public DBHelper(Context context, AssetFileDescriptor db_asset) {
super(context, DB_NAME, null, 1);
Do you know at least a single way to get the Context from the ContentProvider?
Thanks 🙂
In your ContentProvider.onCreate method you can pass the result of getContext() to the DBHelper