Description
Course info
Rating
(21)
Level
Beginner
Updated
Jul 31, 2017
Duration
2h 19m
Description

There are many times when your Android app will need to fetch data from the internet, to provide users with fresh information. In this course, Building Your First Connected App with Android Studio, you'll learn how to make your Android app connect to a web service and retrieve JSON data from the web. First, you'll connect to the Google Books API to make searches and retrieve book titles, covers and detailed information about your favorite books. Next, you'll learn how to add networking and internet permissions, build URIs, use AsyncTask and NetworkUtils to connect to the web asynchronously. Then, you'll discover how to parse JSON content and correctly use a RecyclerView. Finally, you'll see the Google data binding library in action, and how to use Parcelable classes in order to obtain greater speed of execution. By the end of this course, you'll have a better understanding on how to build your first connected app with Android Studio.

About the author
About the author

Simone Alessandria wrote his first program when he was 12. A few years later, he is now a trainer (MCP), author, speaker, passionate software architect, and proud coder. He is founder and owner at Softwarehouse.it. His areas of expertise include business data-driven apps and mobile development.

More from the author
Flutter: Getting Started
Beginner
2h 46m
Aug 22, 2018
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi, everyone. My name is Simone Alessandria, and welcome to my course, Building Your First Connected App with Android Studio. I'm a trainer, author, and proud coder at softwarehouse. it. There are many times when your Android app will need to fetch data from the internet, to provide users with fresh information. In this course, you'll see how to use a web API from your Android app and present data to your users. You will build a fully functional app from scratch, and you'll connect to the Google Books API and retrieve data from there. Everything you need is Android Studio. Some of the major topics that we'll cover include connecting to the internet, parsing JSON content, downloading images with a Picasso library, saving data with shared preferences, and an introduction to the data binding library. By the end of this course, you'll have a clear knowledge of the steps involved in creating a production-ready app that connects to a web service. Before beginning the course, you should be familiar with Android Studio and some Java. I hope you'll join me on this journey to learn Android programming with a course, Building Your First Connected App with Android Studio at Pluralsight.

Connecting to a Web Service
Hello, this is Simone Alessandria. Welcome to this module of our course, building your first connected app with Android Studio. In this module, you will see all the steps required to connect to a web service with Android Studio. In particular, we'll connect to the Google Books API and retrieve some JSON data. We'll begin by creating the app. You'll see how permissions work in Android. We'll see how to use URIs and URLs. Then we'll actually connect to the API. And in doing so, we'll use a stream and see an incredibly useful class, the AsyncTask. We'll finish this module building stronger foundations and see a few best practices that might help you build great apps in the future. At the end of this module, you will have built an app that queries the Google books API, retrieves JSON data and shows the results in a text view. This will be the foundation for the remaining of this course. Enough talking, let's start coding.

Parsing JSON Content
Hello, this is Simone Alessandria. Welcome to this module of the course, Building Your First Connected App With Android Studio. In the previous module we have seen how to connect to our web service, retrieve data asynchronously, and show the data in a text view. Happy as we may be for this great result, we must also admit that the user experience isn't the greatest so far. Our poor user would soon get lost in all the data we have put in the text view, so in this module we'll try to make our app a bit more user friendly, selecting the information we really want to show to the user and then putting it in a scrolling list. What we want to do is something like this, a scrolling list of books with title, authors, publisher and publish date, and a simple search function. This is the result we'll get at the end of this module. In order to achieve that we'll talk a little bit about the JSON format, and see how to parse it in Android, then we'll have a look at the RecyclerView in order to create an efficient list of items for our app. In our demo we also create our model class, select the data to show to the user, and add a simple search functionality. So let's begin with some JSON.

Showing Images and Using Parcelable Classes
Hello, this is Simone Alessandria and again, welcome to this module of the course building your first connected app with Android Studio. The title of this module is Showing Images and Using Parcelable Classes and we'll certainly do what the title suggests but this is just the beginning. If you have followed me up to this point, you know that our app has a single activity with a list of books taken from the Google Books API. What we'll do in this module is creating a second activity so that when the user clicks on one of the books in the list, they will see the book details that will contain the information we could see in the list plus the book cover, the subtitle, and the description of the book. We'll build the second activity using the constraint layout in a matter of minutes. And most of it will be using only the Android Studio graphical tools. In order to pass the information from the recycler view to the second activity, we'll have a look at intents and see how to pass objects from one activity to the other. And in doing so we'll talk a little bit about the difference between the Serializable and Parcelable interfaces and write the code to actually implement the Parcelable interface. Next we'll have a quick introduction to the Android Databinding Library which is a very elegant solution to avoid the abuse of the find view by AD method. And finally, in order to load the book cover image, we'll use a great library called Picasso. Ready? Let's go.

Saving Data with SharedPreferences and Recap
Hello, this is Simone Alessandria and again, welcome to this module of the course Building Your First Connected App with Android Studio. Our app is almost ready but before giving it to our users we'll add a new feature, an advanced search function so that we'll be able to search books by title, author, publisher and ISBN, and as you can see from the title of the module we'll also save the queries our users do with an object called SharedPreferences. This is what we'll be doing in this module. First, we'll create a new activity for the advanced search. Then we'll see how to work with SharedPreferences, an easy-to-use object that lets you persist data even after your app is killed. And finally, we'll see how to create menus dynamically using Java and while adding the new features to our app, we'll also apply some fixes here and there. Okay, let's begin by creating our new activity.