C# – Storing data for use on Android and Windows Applications

androidcdatabasexml

I posted this last night on StackOverflow and was advised to move it over to StackExchange, thank you for taking a moment to look at my question.

I'm developing a project proposal for my final year project at University and as I aim to use programming languages I am currently not too familiar with I'm looking for some guidance – I can't include details of my project but hopefully you will understand what I'm after.

I'm going to be creating an Android application (in Java) and a Windows Application (in C#) that will ideally access, query and update a remotely hosted Database or set of XML files (this would most likely be over the Internet).

I've done some looking around the internet and SQLite seems like a safe-bet for cross-platform manipulation of the database; however I would like to keep the system as lightweight as possible and I'm wondering whether XML files may provide a better alternative? Anyone out there that has experience using SQLite and/or remotely hosted XML for the purposes of Android and/or C# development that could point me in the right direction?

If there is an alternative solution other than those I have mentioned I would be interested to hear about them too.

Thank you for taking the time to read my question.

Edit: The purpose of this application is for a small scale business, the data source would not need to be updated by more than one source but may be view from multiple sources (i.e. through multiple phones and a desktop PC). The database wouldn't be updating masses of data at a time (most likely single rows of a few tables at the most).

Best Answer

If you are planning to develop an application in Android SQLite is the only way to go. In my case I have to include a database which is already populated with information to fill the dropdownlists (can't remember their Android name but I hope you got the meaning). Thus I have to insert data prior to deploy and have to include it. Also using SQLite means you can query database with SQL syntax which is very handy.

Windows Phone, on the other hand, provides Azure platform in addition to SQLite, but the drawback is it is not free and needs an always online device.

A caveat regarding Android is the assets folder, the place where you put additional files to include with the application, has a filesize limit of 1,5 megabytes concerning files other than MP3 or PNGs. You have to rename your db file to PNG or MP3 if you exceed filesize limit and copy it to application (which you have to do if you include it with its db extension) with correct filetype.

Related Topic