Trebak
Trebak

Reputation: 91

android import export database

there. I am trying to implement a feature into my app to copy the current database unto the sdcard. Are there any tutorials or code snippets to achieve this. I've already looked at this site, http://mgmblog.com/2009/02/06/export-an-android-sqlite-db-to-an-xml-file-on-the-sd-card/ ... but I wont be able to import the data with this method.

Upvotes: 9

Views: 15789

Answers (2)

Paresh Mayani
Paresh Mayani

Reputation: 128428

For backing up your Android SQLite database to the SD card.

And refer this stackoverflow question (Making a database backup to SDCard on Android): Making a database backup to SDCard on Android

Upvotes: 9

sohilv
sohilv

Reputation: 1712

Use the android backup service, released under android 2.2. very helpful in case of data lose or SD card corrupted your application data will be safe on google cloud.

Android Backup Service is integrated with Android's data backup framework to perform data backup and restore for most devices running Android 2.2 or greater, using Google servers and a backup transport on the device.

http://code.google.com/android/backup/index.html

http://developer.android.com/guide/topics/data/backup.html

Upvotes: 3

Related Questions