Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top