Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,


These days I was trying to make some app for Android. App that send three Strings to web server, and receive a medium size amount of data.
I know how can i do this, but i need an explanation for server side, so here is my question.

Should I organize data on web server as Database or XML? Should I use PHP to get data from Database and send it to an app, or should I put data in XML file and read it then create HTML file with XSLT and send to that HTML file to an app?
Tell me the best way to do it, i searched on google but i could not find good explanation. Or correct me if I am wrong, I am just a student.

In my app, I can show to user data in list, or in WebView all the same...

Thanks!
Posted

1 solution

Hi Nemanja,

I will explain the steps...

Its better to use JSON format for data transfer, because its very readable...

The database should be in a Server, which can be accessed by Web Service or WCF...


1. The database should be placed in a server which can be accessed by Webservice / WCF.
2. Create a small WCF or Webservice to access the data from other remote application.
3. The webservice can export the data in JSON format which is easier (you can get many json serialize and deserializ classes) for reading and populating Listview or Grid etc.
4. you can access the data from your Android app by calling this webservice and converting to List items with the help of Java JSON serializer and De-serializer classes.
5. After converting to List view its very easy to pass to custom adapter or default adapter for Listview..

please let me know is this explanation is ok or need any help...

Thanks,
Ullas Krishnan
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900