How to get values from database and display in android application
I am creating a Qui开发者_StackOverflow中文版z application. Questions are added thru web form. I am using Mysql and ruby on rails for doing so..... I would like to display the questions and its options in android application with next and previous options. I am very new to android. Can somebody please tell me how do i do this.
U need to generate a XML file and to parse the value in the android application.
Use the sax parser to parse the values: http://developer.android.com/reference/javax/xml/parsers/SAXParser.html
Here is an example on how to parse: http://www.ctctlabs.com/index.php/blog/detail/parsing_xml_on_android/ http://prasanta-paul.blogspot.com/2010/06/android-parcelable-example.html
Here is the solution to create a wizard with previous and next buttons: Using ViewFipper in android
Hope the above links will help u!
As Mr. Grott suggests, you should expose a Web service (REST preferred) from your Web application. You can then use HttpClient in Android to make Web service calls to get the data you seek.
精彩评论