3

Trying to implement import and export feature in my application.Exporting is just copying of file in to the sd card. which i have done but importing is bit problematic. As importing should delete the previous rather the current database i am using and load the previous one. I have gone through various post on this site regarding importing of sqlite database from sd card in application.Importing database,here there is an answer but i want to know when this method is to be called .? Or any other solution for this. would be really appreciated !

Community
  • 1
  • 1
sankettt
  • 2,387
  • 4
  • 23
  • 31

2 Answers2

3

I feel this link will help you to find a solution basically you have to check whether you have included the permission in your manifest file to read and write external storage Device then follow the tutorial.

Just Variable
  • 892
  • 10
  • 19
  • I think sankettt needs a response to the question - when to import/export but not how. – dimetil Nov 09 '12 at 07:30
  • 1
    I am open to new solutions.. I have a custom preference page where i have two images on which i would import and export database so when to import and export is not a question i was like when i would call the method which was mentioned as answer in the link. But i am finding the solution provided by deepak is going to help me trying that part only.! – sankettt Nov 09 '12 at 07:35
  • thanks sankettt hope it helps I will try to answer if any more clarification is required :) – Just Variable Nov 09 '12 at 07:40
  • @DeepakSamuelRajan done.. and voted for ur answer.. i do need help for other questions so can you help me if possible i have posted some questions so can u check those question ? – sankettt Nov 09 '12 at 12:20
  • link not working @DeepakSamuelRajan . Please refer another link. – Omkar Jun 26 '17 at 11:18
0

Refer this.. Using this you can club your db (.sqlite) in zip folder inside assests. On installation it will unzip that & create the databse from your .sqlite file.

hemu
  • 3,199
  • 3
  • 44
  • 66