Android Volley Library Tutorial |
Android Volley is an library for network operations in android development. It is a very light weight framework and most importantly, very fast for network operations. It has facility to get the raw string, image or JSON data over the network efficently. One of the benifit that I like the most if you can easily use volley in your activity as it automatically sends the request in separate thread. And also maintains a queue for the requests.
Note that volley is not for large data downloads as it holds all the data in memory. For large downloading use the DownloadManager.
Here is the demo video for this app.
Dependency for android volley
Minimum requirement for android volley Android 2.2 (API Level 8) or higher. Now come towards tutorial for android volley.Steps for using Volley
- Add the uses-permission in Android Manifest.xml file.
<uses-permission android:name="android.permission.INTERNET"/>
- Add the dependency in build.gradle (Module: app)
compile 'com.android.volley:volley:1.0.0' - Write code for sending request in MainActivity.java
- Write the server side code. I am using xampp and sending request to localhost. Follow tutorial here to configure xampp for accessing from other devices.
MainAcitivty.java
activity_main.xml
androidvolley.php
In case of error
If you get some error, the first thing you should check is permissions in android androidManifest.xml and build.gradle. If you still get the error feel free to comment below or contact me at farooqahmadkhan003@gmail.com.
The application is exclusively available on its official website and should be downloaded from the site of Mobdro application mobdro
ReplyDeleteThanks for your informative blog!!! Keep on updating your with such awesome information.
ReplyDeleteAndroid Online Training
The information you provide is deam good. This information helps lot of user to update their knowledge in android side.Thanks for sharing.Anybody want to learn
ReplyDeleteAndroid Training in Chennai
you have post an very useful post. Its very interesting and useful to me. and i have learnt lots of new information from your blog share. keep it up. thank you.Android Training in Chennai | Web Designing Training in Chennai
ReplyDeleteThis is a really rare and amazing.........
ReplyDeleteManaged Cloud Services Toronto
I am using your code but when I click on submit button the app is got crashed, and by verifying logcat it gives null pointer exception.
ReplyDeleteCan you please share the log here or on my email?
Deletenice
DeleteNice and good article.. it is very useful for me to learn and understand easily.. thanks for sharing your valuable information and time.. please keep updating. Selenium Training in Chennai | Software Testing Training in Chennai
ReplyDeleteThis is really great information on Android Online Training
ReplyDeleteModbro tv android is the best app available in the market for browsing movies, videos & shows
ReplyDeleteModbro tv android
and what about ProgressBar..... ? why you don't use it..
ReplyDeleteYes you can use that, this is actually just a demo to use volley.
ReplyDeleteWorked it perfectly.thanks for the blog.
ReplyDeleteThe tutorial is amazing. Could you please help me with how to query mysql using this post variable received and how to send that result back to android
ReplyDeletehey there!
Deleteyou can use the variables in query like
$query = "select * from table where name=" . $name . " and email =" . $email;
Though it would be better if you use bind parameters, you can do that if you are using MYSQLi in the following way:
$stmt = $conn->prepare("INSERT INTO MyGuests (firstname, lastname, email) VALUES (?, ?, ?)");
$stmt->bind_param("sss", $firstname, $lastname, $email);
The "sss" argument lists the types of data that the parameters are. The argument may be one of four types:
i - integer
d - double
s - string
b - BLOB
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete
ReplyDeleteYour new valuable key points imply much a person like me and extremely more to my office workers. With thanks.
UNIX Shell scripting training in chennai
ORACLE apps finance training in chennai
Informatica Online Training
wow great information
ReplyDeleteMainframe Training In Chennai | Informatica Training In Chennai | Hadoop Training In Chennai | Sap MM Training In Chennai | ETL Testing Training In Chennai
Unexpected response code 301 for http://api.hallohours.in/api/signup/
ReplyDeleteERROR Come
This comment has been removed by the author.
ReplyDeleteWhat would be the Php code when I send Json object Request?
ReplyDeletenot working api is expierd
ReplyDeleteThis is an awesome post.Really very informative and creative contents.This concept is a good way to enhance the knowledge.
ReplyDeleteJava training in Chennai
it is giving only one error android.volley.timeouterror
ReplyDeleteVery neat blog article.Really looking forward to read more. Want more.
ReplyDeleteQlikview Online Training
Application Packagining Online Training
Python Online Training
This blog has all it takes to be called the best blog.
ReplyDeleteMason Soiza
I am getting response 400 when i use this code Can u Help me. I sent my Code to your email. PLease Help me
ReplyDeleteGood videos don't beat people over the head with sales messages but do include strong calls to action. 無料
ReplyDelete