I am using phoneGap framework to create mobile application . and i am putting my existing .db file in www directory of phoneGap . And when application loads or on some action i want to copy .db file from www directory to internal memory of application i.e /data/data/applicationPackageName/app_databases so that database could be loaded from this location. and all this i want to do using javascript/jquery/PhoneGap api .
plz help me with some code or article link. thanks a lot .
You should use FileRead and FileWrite from the the PhoneGap API to do this.
You can read more about the file actions on phonegap’s documentation pages:
http://docs.phonegap.com/en/1.5.0/phonegap_file_file.md.html#File