I believe you folks got to know how easy it is to write Android code when AQuery library is used from my previous posts.
It’s time to explore the other most wonderful feature of AQuery and that is ‘Asynchronous Network Calls’. In this post we will be developing simple application to demonstrate how to download Mp3 file from Internet and play it as soon as it is downloaded. I already wrote a separate article [Android AsyncTask Example] on how to make Asynchronous calls to download file from Network but AsyncTask was used rather than AQuery library to perform Asynchronous download.
What is Ajax Auto Load?
If you take a look at dynamic websites, the content of the website will be refreshed automatically without user intervention. Example – CricInfo in which the score card will be refreshed in a time interval and display the latest score.
AJAX Auto Load in Android
The Android application which we are going to develop will refresh the content of activity and show the latest content retrieved from the server through AJAX call. Our application gonna get the server’s time through AJAX call for every 5 seconds and update the server time inside Android activity. This will happen without user intervention (like Tap, Scroll, Click etc.,).
Interesting? Let’s us start create the application.
Click through the below links to learn AJAX – a technique for creating dynamic, better, faster and more interactive web applications.
Lot more tutorials are coming soon, keep watching the space for more updates.