Releasing an app to an app store like the Google Play Store is a common task that Android developers have to go through.
Because you need to verify that you are the owner of the respective app, you need to digitally sign your APK (Android application package) or AAB (Android App Bundle) before being able to upload it.
To be able to sign your application, you need to generate a .jks (Java KeyStore) file that contains your certificate.
If you are working alone on your app, you can easily use the Android Studio’s built-in Generate Signed Bundle/APK function.
It is mostly used for updating the UI with a new state of the respective ViewModel. By using this component we can switch from a pull to a push behavior when we need to inform our UI about state changes.
Sometimes you don’t only want to get informed about one single item but multiple ones.
Especially when it comes to multiple asynchronous LiveData streams that are required at the same time to…
In most cases, Android apps consist of multiple screens that are interconnected with each other. One screen can be accessed via interaction with another.
In earlier stages of Android development, one would rely on manually pushing and popping fragments via
With the introduction of the Navigation component library, which got released within the context of Android Jetpack, manual handling of these transitions is now a thing of the past.
The first Navigation component library stable release is available since 2019. It drastically facilitates consistent behavior for navigation within your Android app. …
viewModels delegate lets us initialize our
ViewModel in our Android app’s activities or fragments with no effort.
However, the drawback of this function is that we are limited to the initialization of our respective
ViewModel without the ability to use any initial parameters via a constructor.
Because in many cases we have parameters that get passed by a previous screen via Navigation Component’s safe args or on the standard way via the arguments or intent bundle, we often need these parameters in our
If we show a list on our screen that depends on the respective parameters…
The Event Bus design pattern is a well-known practice that has been widely used in many Android apps in the past to achieve an event-driven architecture.
With the slow replacement of Java by Kotlin over the recent years, this approach was almost forgotten. Kotlin itself and also other popular frameworks nowadays offer various options for implementing a publisher/subscriber architecture, such as Kotlin Flow, RxJava, or LiveData.
This article will be the second post in my new series about refactoring tips for Android Studio and IntelliJ IDEA.
In my last article, I talked about the “Find and Replace” feature which lets you easily change specific keywords across your whole project or scoped to explicit sections of your codebase.
This succeeding post will be covering another feature that astonishingly facilitates the refactoring of your code.
We will be talking about the “Change Signature”. As the name already implies, this feature allows you to easily refactor function signatures.
The “Change Signature” refactoring function can be found in the refactoring…
Kotlin Inline Classes are a subset of the Kotlin Value classes. An inline class can be used as a wrapper around some other type, described on a very high level.
Within this article, we take a detailed look at the new syntax for inline classes, introduced with Kotlin 1.5, and how to use the feature in practice.
If you come from Java, a very good example for understanding the basic principle is to look at the wrapper classes for primitive types. Let’s take a look at the class
Boolean, that wraps the primitive type
This article will be the start of a new series of mine. Within this series, I will cover some quick and simple tricks that will help you to refactor and maintain your Android app.
I would like to start by talking about Android Studio’s Find and Replace feature. Since Android Studio is built on top of IntelliJ IDEA, this tip applies to IntelliJ as well, of course.
However, for the sake of simplicity, I will refer to Android Studio for the rest of the article.
As you probably know, Android Studio provides a very good search tool “Find in Path”…
ConstraintLayout is one of the most dynamic and powerful available Android
ViewGroup components. Besides its variety of possibilities, it allows us to implement a flat view hierarchy, leading to improved performances when it comes to layout inflation compared to deeply nested layouts.
When it comes to the alignment of different components, the
ConstraintLayoutprovides various helper components.
In this article, I want to talk about some of these helper components. In particular, we will review the
The layout editor window allows us to adapt the
View constraints directly inside the window without writing a single…
Retrieving an image by user input is a common task in Android development. Yet it is far from straightforward to implement it. In earlier stages of Android Development, letting the user take a picture and preview it took quite some effort. The same goes for selecting an image via the gallery app.
But as time goes by, Google provides more and more APIs that make these tasks, and thus our everyday life as developers, easier. Nowadays we have access to the ActivityResult API, which allows us to use ActivityResultContract API.
In earlier stages, if we wanted to get a result…
Passionated Mobile & Backend Developer