Kodeco Forums

Android Networking Tutorial: Getting Started

Networking has played a huge role in Android apps since API level 1. Most apps donā€™t work in isolation; rather, they connect to an online service to retrieve data or perform other networking functions. In this Android networking tutorial, you will create a simple app which connects to the GitHub API to retrieve and display [ā€¦]


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1052-android-networking-tutorial-getting-started

Actually the Volley dependancy in the article was deprecated a while back. Should use the official one: compile ā€˜com.android.volley:volley:1.0.0ā€™

Hi @jmrmbz,
Thanks a lot. The tutorial has been updated

The link near the bottom to the source for the ā€œfinalā€ project just links back to the same article, and I only see a link to the starter project. Can you provide a link to the final project, please? Thank you.

With a little sleuthing (i.e. guesswork), I think Iā€™ve discovered the URL. I think your link is just missing the href in the download link. Is this the correct final project URL? https://cdn2.raywenderlich.com/wp-content/uploads/2016/05/RepoSearch.zip

@mabco very sorry about this. The url to the new final project got messed up when I uploaded a new one with the corrected volley dependency. Please check the link in the tutorial. Itā€™s working correctly now.

@euniceobugyei Wow, thank you for the fast reply! And thanks for the correction. No apology required!

@euniceobugyei In this tutorial, the AsyncTask implementation approach is pretty straightforward and not a lot of code. I agree the open source library approaches are very convenient, because they handle the asynchronous threading internally, but, other than the things mentioned in the tutorial, are there any other downsides to using an AsyncTask for this type of networking use case that you can see? Second question: Do you know of any good Android libraries that have similar conveniences (asynchronous, threading, callbacks, etc) as these open source HTTP libraries, but which is at a lower level? I need to do some networking at the TCP socket level. I know I can use the Java Socket and/or nio frameworks, but wish there were an open source library that was as nice at the HTTP open source libraries. I have yet to find anything that isnā€™t overly complicated. In iOS, I use CocoaAsyncSocket library, which is very nice. Thanks in advance.

@mabco One other issue with AsynTask is support for concurrent background threads. About your second question, you can try out Netty or Kryonet.

@euniceobugyei Thanks!

Thank you ,
A great tutorial
Could you please make the same for post request?

Thank you so much!
It is easy to understand.

Hi @euniceobugyei, Great tutorial. I was able to follow the instructions with no issues and the app is working great. May I know how can I integrate Realm in the application in this tutorial? Thank in advance.

Can i be able to display my own Github Repositoriesā€¦??

This tutorial is more than six months old, so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]