tags:

views:

33

answers:

1

Hi,

Is there a way to programatically get the path to the databases/files an application uses instead of hardcoding "data/data/mypackage.com/database.db" ?

+3  A: 

For files: Context.getFileStreamPath() (alternatively, Context.getFilesDir() for the whole directory).

For databases: Context.getDatabasePath()

Daniel Lew