开发者

Download file and move it (Android)

I'm implementing a database开发者_运维问答 update in my program. I got my sqlite3 database running and I'm able to check for updates, but my question is: How do I download a file from the web (the new database) and move it to the correct folder?


This page has some good code for doing exactly that.

Also to get the path of where the database "should" go, you can use some code like this :

getApplicationContext().getDatabasePath(DB_NAME).getPath();


I was looking for this for a long time but ended up writing a synchronize script instead. I was working in xcode for iOS but I think it's the same principle.

I think the best solution is copy the embedded database to a non readonly location and synchronize what needs to be done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜