If I download server db file in to my application. Can make my db operations on that file.?
If yes, Can I store it in my application memory.? I would appreciate if you give me a sample example.
Please help..
Thanks.!
If I download server db file in to my application. Can make my db operations on that file.?
If yes, Can I store it in my application memory.? I would appreciate if you give me a sample example.
Please help..
Thanks.!
I assume you download a SQLite database file and store it at an accessible place.
You can open databases at specific paths with Android's SQLite API: http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html : SQLiteDatabase db = SQLiteDatabase.openDatabase(path, null, 0);
Then you can work with it like with every other database connection, of course.
From a design point of view it is not a very good idea to do this, a structured access to the data via some kind of web service would be better; this would allow the app to react to different methods of storage and make the design independent from specific databases, versions of the database and schemas.
Download data from server and store them using sqlite in your application and do operations which ever you want, instead of downloading the db file in you application and try these tutorials for sqlite http://www.vogella.com/articles/AndroidSQLite/article.html http://www.androidhive.info/2013/09/android-sqlite-database-with-multiple-tables Hope that it will work for you