Is there any way to pass database object between activities. I have already tried the following ways for doing this.
I guess you are looking for a Singleton. Maybe this will help you:
If you are using a SQLiteOpenHelper I HIGHLY recommend you to read this:
I think you should be fine with Approach #1 which uses a singleton with the abstract factory pattern. Read the article its very informative. More on the topic and Pros n cons are here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With