🤩 Android How To – Build an app using Jetpack and Kotlin – Episode 6: HTTP / Rest with Retrofit Part 2

💯 working
Episode 6 of a series of tutorials for a “crash course” that shows you how to build an Android application using Android Studio, Kotlin, Material design and Jetpack. This episode is part 2 of 2 parts focused on the basics of Retrofit and Moshi. It includes:

– Building a Retrofit object that uses Moshi for marshalling / unmarshalling data.
– Creating an API Service with an HTTP method that will call a web service API (GET method used as an example).
– Creating a “Network” data class for data transfer (i.e. a Data Transfer Object / DTO). Includes usage of Moshi’s Json annotation.
– The basics of the Jetpack WorkManager, including dependencies to include, how to set up recurring work and once-off work and setting execution constraints.
– Adding coroutine dependencies.
– Adding the Internet permission to your manifest so you app can access the Internet.

NB EDIT: At about 11 minutes 30 seconds into the video I show how to set up recurring work for the WorkManager. I use a 30 second repeat frequency as an example. It should be noted that WorkManager actually has a 15 minute minimum repeat frequency, so in this example, even though I set it to 30 seconds, it would only repeat every 15 minutes. No exception would be thrown, it just sets it to 15 minutes if you specified any frequency less than that.

About Hungry Bear How-To's

Check Also

🤩 How to earn money playing mobile games. App Like Make money on mobile.

💯 working How do I make money on mobile phone? How do I make quick …

Leave a Reply

Your email address will not be published. Required fields are marked *