Book Image

Learning Android Application Development

By : Raimon Ràfols Montane, Laurence Dawson
Book Image

Learning Android Application Development

By: Raimon Ràfols Montane, Laurence Dawson

Overview of this book

The mobile app market is huge. But where do you start? And how you can deliver something that takes Google Play by storm? This guide is the perfect route into Android app development – while it’s easy for new apps to sink without a trace, we’ll give you the best chance of success with practical and actionable guidance that will unlock your creativity and help you put the principles of Android development into practice. From the fundamentals and getting your project started to publishing your app to a huge market of potential customers, follow this guide to become a confident, creative and reliable mobile developer. Get to grips with new components in Android 7 such as RecyclerView, and find out how to take advantage of automated testing, and, of course, much, much more. What are you waiting for? There’s never been a better time – or a better way – to get into Android app development.
Table of Contents (16 chapters)
Learning Android Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Network code


Now that we have seen how to do some background processing and decode the data by ourselves, we will see how to implement the networking code. We will start by showing the standard classes and libraries Android provides us, and later we will cover widely used third-party networking libraries.

Android standard libraries

As we have just mentioned earlier, there are a lot of third party libraries that will make our lives easier, but it is important to know the basics. Android provides a set of standard classes and libraries which are not really used anymore by application developers unless there is something very specific of low-level access is required. Anyway, we will briefly show a possible implementation of an HTTP downloader and then will switch to higher level-party libraries.

In the previous example, we did not show the implementation of the loadDataFromURL method, as we will cover it here in this section:

What we are doing in this implementation is to create an HttpURLConnection...