fbpx

Android widgets – Update using Kotlin Flow, Room and Hilt

Android widgets - Advanced – With Kotlin Flow, Room and Hilt

Reading Time: 8 minutes In this Android widgets tutorial we are going to learn how we can update the Widget with Kotlin Flow, Room and Hilt. As an example we are going to extend a ToDo application (which already uses Room) by Kotlin Flow and Hilt to update the data of the Widget with the first item of our … Read more Android widgets – Update using Kotlin Flow, Room and Hilt

Retrofit basics – GET

Reading Time: 6 minutes

In this chapter we gonna continue the Retrofit basics tutorial with the simple GET request to let the user login in our sample application into an example WordPress website. Thenafter, also using the GET request, we gonna fetch the list of the users.

Basically the login won’t be a usual login process, because we will use only the username to let the user login. Because the username field is always unique in WordPress, we can clearly identify the user.

Read moreRetrofit basics – GET

Follow and like us:

Retrofit basics – POST

Reading Time: 8 minutes

We are going to continue the Retrofit basics tutorial with the HTTP POST request together with the WordPress REST API, which allows us to send data to the server and register the user.


First in this chapter, we will create an interface for the Json API and there we will define the relative URL endpoint for the POST request and the needed arguments.

Then, we are going to create a singleton client for Retrofit. This client will hold the needed information for the authetication. Thenafter come the base url, the HTTP client and an instance about the JSON API.

So, let’s start coding. 😎

Read moreRetrofit basics – POST

Follow and like us:

Retrofit basics – Preparation

Reading Time: 11 minutes

We are going to start the Retrofit basics tutorial with the preparation of the sample application. In every case, when you start a new project, you have to make shorter or longer preparations before you can start implementing the business logic.

In this chapter first, we will start a new project in Android Studio, then we will add the needed dependencies. Thenafter, we will create the four fragments, the toolbar and the navigation graph, and some more smaller things 😊. The last thing will be a base class for our app.

Read moreRetrofit basics – Preparation

Follow and like us:

Retrofit basics – Introduction

Reading Time: 3 minutes

In the introduction part of the Retrofit basics tutorial we are going to summarize the following chapters and give you an overview what you will learn, if you do this tutorial.

In this tutorial we are going to show you how you can send (register user), post (fetch all users) and get your profile from the database of a WordPress website, what we have prepared already for you.

For all of this, we are going to use the Retrofit library, which is a type-safe HTTP client for Android. To get the data from the website, we will use a WordPress REST API, called Swagger.

Read moreRetrofit basics – Introduction

Follow and like us:

Room basics – ViewModel

Reading Time: 5 minutes

In this chapter of the Room basics tutorial we are going to talk about how we can use the Room queries through a ViewModel. It means, we are going to call the queries from the ViewModel to follow the MVVM design pattern.

We can use the ViewModel as a communicator between the user interface and the repository. It holds the data in a lifecylce-conscious way, which survives configuration changes.

 

Read moreRoom basics – ViewModel

Follow and like us:

stay informed!

Subscribe to receive exclusive content and notifications