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…
The Android WorkManager API is made for scheduling deferrable, asynchronous tasks. We reference tasks that got scheduled with this API as “work”. Your scheduled work is intended to run reliably by using this API, even if the device restarted.
But sometimes you need to cancel your scheduled work. Within this article, we will have a quick look at the four methods for implementing this task with the WorkManager API.
When you schedule your work, you have various possibilities to identify your scheduled work.
The first option is to use the id that will be automatically generated when you create a…
ConstraintLayout is a very powerful component that allows you to build complex layouts while retaining a flat hierarchy. In most cases, we have only a static layout that easily fits on one screen.
Nevertheless, we often come to the point where we have layouts that can dynamically expand their sizes. That is often the case when we use a
RecyclerView which can contain an unknown number of items.
In such situations you have either the option to give the
RecyclerView a fixed size and the user can scroll the items within that box or you wrap it in a…
Just as its name implies, a bottom sheet is anchored to the bottom of your screen and can be displayed either as modal dialog or directly be integrated into a layout.
In this article, we will take a look at this helpful component. We will see in what type of situations you can use it and how to implement each of its variations.
At the end of this article, you should have a deep understanding of how the Android Bottom Sheet component works and how to make use of it.
The component takes part in the Material Design Guidelines. For…
You may know these infinite lists from e.g. your Pinterest, TikTok, or even your Instagram “explore” feed. It makes you want to scroll and scroll but unfortunately, you will never reach the end.
Features like these can really hook up your user, in terms like Nir Eyal describes in his famous book “Hooked — How to Build Habit-Forming Products”.
Today I will show you how you can easily achieve an infinite scrolling list for a RecyclerView with a combination of Android Room and Paging 3.
To follow along with this article, as the only requirement you should know how to…
So, I heard you are a developer and are still navigating through your code mostly with your mouse? Pathetic!
Within this article, I show you essential shortcuts to finally enable your full potential in terms of transforming your ideas into code.
If you make use of all shortcuts I will show you, and really force yourself to stop using the mouse whenever you can, you will increase your productivity immensely.
Today we will pave your way to become a true Coding Keyboard Warrior.
First, we will…
Who hasn’t experienced this issue? You are working hard on your new Android app and finally get to the point where you have a state of your product, that you want to show off to your stakeholders.
You have also the opportunity to send a direct download link to your uploaded application file.
But that is often a huge pain, especially if you have no…
Take a look at Josh. Josh works 40 hours per week and gets 2000$ on his bank account at the end of every month. After he pays his rent, there are 1400$ left.
Over the course of the month, he pays for food and free time activities with his friends. At the end of the month, he looks at his bank account again and sees there are only 50$ left: “No, this month is nothing left to save” he thinks.
This is the completely wrong approach.
Josh has no plan at all how he can effectively build up savings. In…
Live Templates can really make the life of us developers easier. These templates are a built-in tool within Android Studio that allows you to write pre-defined code snippets that let you add parameters while typing and are compatible with the IDEs auto-complete function (IntelliSense).
In one of my recent articles, I wrote an in-depth article about this tool and how it can facilitate your everyday life as an Android Developer. If you have no experience with Live Templates at all, I highly recommend reading that article first.
In this article, I propose two quick Live Templates that you can easily…
Getting into the world of cloud development can sometimes be a little bit overwhelming. In a recent article, I already showed you how you can set up a simple Pub-Sub implementation that is often used to communicate between services.
With this tutorial, I want to bring some light onto the required steps to bring your Spring Boot application with connection to a MongoDB Atlas instance into the cloud with the help of Google Cloud or to be more specific Google Cloud Run.
To follow this article in a practical manner there are some premises for your project.
I am assuming…
Passionated Mobile & Backend Developer, besides tech I write about fitness, health, and self-development