I have developed 2 mobile apps using PhoneGap. One is a free ad supported version with slightly limited features and the other is the full version without ads. My app saves data in both localStorage key pairs and the WebSQL open database.
Ideally I would like both apps to share the same storage as currently each app has it’s own database in their respective install paths. I need this so if someone has used my free app for a few weeks and saved a lot of data they can upgrade to the full version and their data will be preserved.
Another solution would be to have an Import / Export feature, which eventually I would like to implement anyway to allow users to backup their data or even transfer to a new phone. However, for the sheer convenience of having both apps use the same database I would much prefer to get that working first.
App Info:
Storage: localStorage Key Pairs and WebSQL (openDatabase();)
Language: HTML, CSS, JavaScript
Platform: Android Honeycomb+
Database: 2 Tables, ‘temp’ and ‘shifts’ consisting of id (INT), startTime (DATETIME), stopTime (DATETIME), shiftTime (FLOAT).
I’m not looking for full code examples of how to do this, I just need some advice on which methods are possible and where to start with implementing them. I appreciate your time, so thanks in advance.
Kind regards,
Mitchell Ransom
in android platform every app has it own isolated storage in
/data/data/packagenamethat only app itself could access there, in your case one solution is package both free and paid app as same so android install paid app on free app(it will keep user data including your data bases) second solution is save your database at sdcard(not recommended) and third one as you point out is import/export functionality.