Fresh news from Droid zone
Hello, you're reading Infinum Android Sweets, bringing you the latest Android related news straight to your inbox every week.
How to test custom Lint checks
In my previous article, I've talked about writing Lint checks and benefits they can bring to your project. I've also outlined how to write custom Lint checks, but I didn't cover how to test them. Of course, you can always observe if Lint reports an error or warning if you make a mistake, but the problem arises if you have a bug in your implementation.

Read More
Articles
Since its introduction, ViewModel has become one of the most “core” Android Jetpack libraries. Based on our 2019 Developer Benchmarking data, over 40% of Android Developers have added ViewModels to their apps. If you’re not familiar with ViewModels, the reason why this is the case might not be clear: ViewModels promote better architecture by separating the data from your UI, making it easy to handle UI lifecycles while also improving testability. For a full explanation check out ViewModels: A Simple Example and the official documentation.
You can do dependency injection (DI) manually or with a library. Constructing your application’s dependency graph by hand is a cute exercise but not practical beyond toy examples. You’ll eventually find yourself extracting the repetitive manual DI code into your own bespoke library, one that’s likely to be undesigned and incomplete.
How to write async network requests with Kotlin Coroutines and Retrofit .. To better understand how this works and how to migrate your current code (I know you will, just come back here when you notice how coincise and simple is the new syntax at the end of the post) let’s make an example app that… makes a simple network request!
A Parcel is an optimised serialisation format for Android which is designed to enable us to transfer data between processes. This is something that most Android developers need to do occasionally, but not that often. Making a class Pareclizable actually requires a little bit of effort, but there’s a Kotlin extension that simplifies things enormously. In this post we’ll look at @Parcelize and how it can make our lives easier.
Libraries
A collection of Android libraries to build browsers or browser-like applications.
Reactive caching library for Android and Java. Contribute to VictorAlbertos/RxCache development by creating an account on GitHub.
Videos/Podcasts
Kaushik decides to hit record on a skype call he has with friend of the show Jesse Wilson. They start off by discussing building features across different platforms today. Jesse talks about a clever mechanism of using javascript to change logic on the fly across the Square cash app, that’s worked out pretty well. They then go on to discussing how one can try and converge across platforms in terms of business logic, architecture, naming etc. They then wind it down by discussing the state of Flutter, Kotlin multiplatform and reaching the promised land.
Class of the week
Parameters for requesting the display of the hint picker, via getHintPickerIntent(). Instances can be created using HintRequest.Builder
Beyond Android
In this series of posts we will look closely at one of the main ingredients in a container - Namespaces. In the process, we will create a simpler clone of the docker run command - our very own program that will take as input a command (along with it’s arguments if any) and spin up a container process to run it, isolated from the rest of the system similar to how you would docker run it from an image.