Answer the question
In order to leave comments, you need to log in
Android SQLiteOpenHelper and multiple Activities
An Android application has a class that inherits from SQLiteOpenHelper and is responsible for accessing data. The constructor of this class takes a reference to a Context. Do I need to create an instance of this class in each activity working with the database (passing the given Activity as Context) or use, for example, singleton (and what then should be passed to the constructor as Context)?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question