Binyamin
Binyamin

Reputation: 500

is every SQLiteDatabase unique to class

i have a class that needs to save persistent data and i don't want to need to worry about other classes accessing my database by accident using the same name. so my question is, if i create my own subclass of SQLiteOpenHelper is the database created by this subclass only accessible to that class?

Upvotes: 0

Views: 39

Answers (1)

laalto
laalto

Reputation: 152927

Databases are bound to your app, by the package name specified in the manifest. Android framework guarantees that there can be only one app with a particular package name installed at any one time.

Inside your app you will have to coordinate yourself that there are no name clashes in database file names.

Upvotes: 2

Related Questions