When doing:
//open your existing DB
InputStream dbStream = mContext.getAssets().open(yourDBName);
I'm not able to start reading... Do I need a particular permission
type? Also, when writing back to that location a new database which
permission should be set?
Thanks,
-Moto!
On Sep 8, 12:37
I take that back...
It actually works without any permission as it should...
File f1 = ctx.getDatabasePath(appDatabase.db);
InputStream in = new FileInputStream(f1);
-Jona
On Sep 20, 2:19 pm, Moto medicalsou...@gmail.com wrote:
When doing:
//open your existing DB
InputStream dbStream =
I take that back...
It actually works without any permission as it should...
File f1 = ctx.getDatabasePath(appDatabase.db);
InputStream in = new FileInputStream(f1);
- Moto!
On Sep 20, 2:19 pm, Moto medicalsou...@gmail.com wrote:
When doing:
//open your existing DB
InputStream dbStream =
Perfect!
I really appreciate everyone's help!
-Moto!
On Sep 8, 1:05 am, mjc147 westmead...@yahoo.co.uk wrote:
On Sep 7, 3:30 am, Mark Murphy mmur...@commonsware.com wrote:
Now, the database path location may change in future Android releases,
and I am not aware of a place in the API to
On Sep 7, 3:30 am, Mark Murphy mmur...@commonsware.com wrote:
Now, the database path location may change in future Android releases,
and I am not aware of a place in the API to get the path to a database
in a more official fashion.
You can use the Context.getDatabasePath() method:
Moto wrote:
I need to somehow backup my applitcations database to a file so that
it can later be retored using that file. Any suggestions to doing
this?
One approach is to copy the database file.
Tactically, new File(getFilesDir(), ../databases) is the directory
where your database file
So, I can actually access the database as a file copy and than restore
it by moving it to the same location where it was copied from?
Thanks!
On Sep 6, 3:30 pm, Mark Murphy mmur...@commonsware.com wrote:
Moto wrote:
I need to somehow backup my applitcations database to a file so that
it
Moto wrote:
So, I can actually access the database as a file copy and than restore
it by moving it to the same location where it was copied from?
AFAIK, it should work fine, so long as it is your app doing the copying,
and you are not trying to use the database while copying (in either
Great this will be perfect!
Thanks Mark!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this
Are you right now thinking only to backup your data base on the device
or also somewhere on a remote location (PC, server)?
You could easily do a byte copy of your DB
//open your existing DB
InputStream dbStream = mContext.getAssets().open(yourDBName);
OutputStream
10 matches
Mail list logo