Image for post
Image for post
Unsplash@phaelnogueira

In modern Android development, constructing network structure is an important factor and we can implement network communication structure using HTTP client tools like OkHttp, Retrofit, or Volley. Also, it is an important factor to design how to handle callback responses from the network. Many people standardize callback responses by creating wrapper classes like Resource, Result, or Response and handling success data or error messages depending on the response state like the below.

However, what if we want to handle error cases depending on its HTTP status code (401, 402. 403..) or handle each error response globally for logging/debugging error…


Image for post
Image for post
Unsplash@dermanuskript

Hilt is a dependency injection tool that has been introduced by Google in the last year. Hilt makes our projects cleaner and reduces setup time for constructing our DI environment than Dagger-Android. It has been steadily getting feedback and developing for several months. Now Hilt is more stable than the earliest was. In this post, we will take a look at what is the main difference between the earliest version of Hilt and the newest one.

Previous post

HiltAndroidApp

There is no difference in using HiltAndroidApp annotation for building the base DI environment. The role…


Image for post
Image for post
Unsplash@sunrisephotography

Spinner is one of the most frequently used widgets in Android for selecting a specific item in a dropdown list. The Android SDK provides a default widget called Spinner, but as we know it requires many kinds of boilerplates and difficult to fully customize for our preferred design. And no animations. This requires our valuable time whenever we need to create a different type of spinners based on preferred designs. In this post, we will take a look at how to customize a better Spinner using a library, PowerSpinner.


Image for post
Image for post
Unsplash@hudsoncrafted

The components of Android (Activity, Fragment, Service, BroadcastReceiver) are very independent of each other. It means they don’t have any dependencies on each other and it allows us to decide their entry points at any points. And we can decide and change their workflow by the desired anytime.

But the independent characteristics make it difficult to communicate with each other. So the Android SDK supports concepts of the Intent for holding an abstract description of an action to be performed, and the Bundle for passing data based on inter-process communication mechanism. They are one of the most important and basic…


Image for post
Image for post
sushioutlaw@unsplash

Anew UI toolkit Jetpack Compose is announced by Google. Jetpack Compose is Android’s new modern toolkit for building native UI based declarative component approaches. In contrast to imperative programming, declarative programming is a programming paradigm that expresses the logic of computation or drawing UIs without describing its control flow. The declarative programming approaches in mobile are already used widely like SwiftUI and Flutter. And here is a new one; Jetpack Compose.

So what are the best benefits of Jetpack Compose?

  • Code reusability (dramatically less code)
  • Declarative UI (lacks side effects, referentially transparent)
  • Consistency of native codes without using XML files
  • Unidirectional Data Flow (state flows down and events flow…

Image for post
Image for post
jenellehayes@Splash

Application class is the first entry point of the android application process and it’s for maintaining a global application state. It is always running while our activities and services are running and also it is the first context to be created and the last to be destroyed. So it manages lifecycles of the whole applications using ApplicationContext, we can access the application’s resources, show toast messages, and create instances of Android SDK related classes that use it.

The other role of the Application class is initializing every SDKs and libraries which required ApplicationContext in the application’s whole lifecycle. As the…


Image for post
Image for post
mavrick@Unsplash

Dagger is one of the most popular and most used libraries for building dependency injection, especially in Android. But the initial cost of learning is high and beginners are difficult to debug and hard to understand what’s going on in the compile time. So here is another powerful DI weapon for beginners and old dagger users: Hilt. In this post, we will look around what’s big differences between dagger-android and Hilt and what’s the benefits bu using Hilt.

Next Post

The Hilt reached alpha but there is no official documentation and explains. so I’ve looked…


Image for post
Image for post
ninjason @ Unsplash

Progressbar is one of the most frequently used widgets in Android development. However as we know, the default ProgressBar provided by Android SDK has poor customizable options. There is no way to show the current progress value, no progress animations, no gradient/rounded basic attributes. Every time we should create a different drawable XML file, but it is still limited. This posting is about how to implement a polished and flexible ProgressView, fully customizable with animations and its UX design philosophy.

UX philosophy

Generally, progressBar draws only progress. …


Image for post
Image for post
Unsplash @ kalkie

Requesting data to remote server and handling responses is always one of the important issues in Android development. When we are building our project even a small-sized demo project, we have to spend time constructing the REST service structure. Using the modern Android development tool like Retrofit2, OkHttp, LiveData, or RxJava we can implement the network interfaces easily and request asynchronously. But designing standardized response models/interfaces and handling success data and errors are also important things.


Image for post
Image for post

In the last post, we found out about the motion systems in the new version of the material design. In this part, we’re going to find about the modern Android development tools and architectures.

Building a Beautiful Disney MVVM Android Application (1): Material Motion Systems.

DisneyMotions

I published an open-source project DisneyMotions, it is based on MVVM architecture and written in Kotlin. Check the full source code on this repository. 💗

Jaewoong Eum

A software engineer: Android, IoT. Interested in Psychology, Magic Tricks, and writing poems. https://github.com/skydoves

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store