2

i had used eclipse to develop an android apps that can allow user to register.

after they register successfully and go into the main page, they are able to see their own profile which consists of the details they keyed in during register. (The details will saved into phpmyadmin)

any method can retrieve those details from the database and display it on the profile page? (i am using php and java)

thanks for answering..

1
  • 1
    Parse data from DB send it as JSON or XML read it in Android app and display results to user,or just use webview to show remote page with user data Commented Dec 4, 2012 at 8:58

4 Answers 4

2

You can always use "Zend AmF" or "AMF PHP" for comunicating with the app, binary.

or amf mixed with codeigniter

Then use: - http://code.google.com/p/klio-mobile-dataservice/ to connect with your server

Sign up to request clarification or add additional context in comments.

Comments

1
  1. You need to have a server, like a Tomcat, or anyother server, to which you will post the data

  2. The Servlet or the PHP script, will read the values, store them in database.

  3. The Android application will get the data from another Servlet or a PHP page, using a HTTP Get request, and show it on the screen.

You can alternatively, store the keys locally in the device, using SharedPreferences, and get them in the next screen.

2 Comments

i am using the WampServer and also have the php file of storing data in database..
This has a very good code snippet of Get in Android androidsnippets.com/…
1

You have to write a php script wich parses data from your database into for example JSON-Format. If you had parsed the json you can use the JSON parser in android to show he content in your activitys.

Here is a very nice tutorial for json parsing in android:

http://www.androidhive.info/2012/01/android-json-parsing-tutorial/

Comments

1

Basically you have to create Web Service in PHP or Java and from there you need to get your data. You have to create Restful API which returns data in the form of XML or JSON and you need to parse those data at android end. By this way you can get your data from PHP.

Here is the best resource which i found when i was searching for this kind of scenario. The author has explained very well in this and you will get very good idea about the scenario. Also provide sample code for reference.

Refer this link.

Hope this helps!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.