Android MySQL : MultiColumns – Select,Fill ListView [Source]

Android MySQL : MultiColumns – Select,Fill ListView [Source]







Intro

Android PHP MySQL MultiColumn Select tutorial source code reference

What We Do:

 

  1. Connect to MySQL database from android application.
  2. We use HttpURLConnection as our Networking class.
  3. We make a HTTP GET Request.
  4. We use PHP as our server side language.
  5. PHP selects the data from MySQL and prints it into JSON format.
  6. Android fetches this JSON and parses it using JSONObject and JSONArray classes from org.json package.
  7. We then bind this data to a custom ListView.
  8. Our ListView adapter is BaseAdapter subclass.
  9. Because this is a networking call,we do it in the background thread using AsyncTask.
  10. Meanwhile we are showing the progress dialog.

 

 

Main Classes :

  • MainActivity deriving from support library's AppCompatActivity class.
  • Connector class using java.net.HttpURLConnection to connect to network.
  • Downloader classes inheriting from AsyncTask.We download in the background thread.
  • DataParser class inheriting from Asynctask.We parse using JSONObject and JSONArray in the background thread.
  • CustomAdapter deriving from BaseAdapter.Where we bind our data to our custom ListView.

 

NB/=

We have this tutorial in the video format in our channel : ProgrammingWizards.

Over there we first show the demo,then explain everything step by step.This is now the source code reference for that particular tutorial.Anyway We shall however convert it to text article in in the near future.If you visit our channel please subscribe so that you never miss our tutorials.We have over 600 video tutorials.

 

 

What we do In the Video Tutorial :

 

  1. Show Demo of what we are going to build.
  2. Create MySQL database in Wamp Server.
  3. Write PHP scripts to connect talk to android over HTTP protocol.
  4. Write our code in android studio.
  5. Run the project and see the result.
  6. Have some coffee if to celebrate.

 

 

SOURCE FORMAT :

Platform : Android

Language : Java and XML

Tools : Android Studio

 

 

SOURCE CODE REFERENCE :

GITHUB : BROWSE

COMPRESSED ZIP :  DOWNLOAD

 

CONTACT DETAILS

Website : http://camposha.info;

YouTube Channel :  ProgrammingWizards.

FaceBook Page :  FB Page

 

Oclemy,Cheers.



    Leave a Reply

    Your email address will not be published. Required fields are marked *

    two × four =

    COMMENTS