Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top