Getting… your KMM project working with AGP 7.0+ (Android Gradle Plugin) cover image

I’m really enthusiastic about the future of (native) mobile development. In the past years, we’ve been watching a parading switch on how we should develop our screens. We no longer need to do them on XML or XIB’s, and can finally embrace the potential of declarative UI’s. On the Android side, we’ve got Jetpack Compose, and on iOS SwiftUI.

Although still in beta, if you want to take advantage of the latest versions of Jetpack Compose, you’ll need to install the canary version of Android Studio (Canary build), currently, we are with Android Studio Arctic Fox | 2020.3.1 Canary 12.


Getting… your BottomSheetScaffold working on Jetpack Compose Beta 03 cover image

It’s Monday, no releases this week, and… there’s a new version of Jetpack Compose — beta 03—available. What a perfect time to just increment 02 to 03 and see what’s new.

The API is (almost) final so after updating from alpha to beta there weren’t any big changes to do. However, and remember that’s still in development, there’s always something that I need to update. Sometimes the behavior changes, other times I wasn't doing things right, like this one.

BottomSheetScaffold

The BottomSheetScaffold allows you to show a bottom sheet in your app quite easily. You just need to define

val bottomSheetScaffoldState…


So… which podcasts are you currently listening to? 🤔

This seems to be the one hundred million dollar question that we keep asking over and over again. And yes, I’ve just did it once again before writing this article to check if there was something that was worth adding to this list.

Tech

Android Developers Backstage


Android features: persist your app data after uninstall cover

I’ve recently noticed that an application was asking me if I wanted to keep my app data after uninstalling it.

  • What kind of sorcery is this? 🧙‍♂️

I was unaware of this feature, which was introduced in Android 10, and can be useful for some applications.


As projects start to grow and new layers of specifications and configuration are added we might start to use flavors and its dimensions in order to support a higher level of customization.

Nonetheless, every time we add a new flavor, the number of possibilities to compile the app automatically duplicates.

Flavors

noun: flavor
1. the distinctive taste of a food or drink.
2. an indication of the essential character of something.

We can see flavors the same way: they are set of rules and behaviors that make your app behave differently depending on if you’re compiling it using the code written…


Photo by Mollie Sivaram on Unsplash. Adapted for my talk The Hitchhikers Guide Through Kotlin Multiplatform

Last April I had the opportunity to speak at Android Makers 2020. Although the experience of speaking to a monitor instead of a live audience is drastically different, everyone was amazing and the feedback that I was continuously receiving on a live chat thread made this experience unique!

There was also a sli.do where I’ve had a live poll with which people could interact. And the most important part, a Q&A section where I got all the answered ordered by popularity (votes).

Here they are:

Was it a heart-breaking for you to change http from retrofit to ktor-client?

Well… it…


Photo by Mollie Sivaram on Unsplash. Adapted for my talk The Hitchhikers Guide Through Kotlin Multiplatform

Most of the time, when we’re testing a new technology the most difficult part is having everything up and running. With this in mind and after talking with some people that were having some problems to compile a sample project with Kotlin Multiplatform on Android and iOS I’ve decided to write this article:

A lot has improved since last year, and with it the number of additional steps to run the sample that comes with IntelliJ IDEA. Nonetheless, the process is not quite direct, so here it goes the updated version of:

Set up your Kotlin Multiplatform project

I’ve updated all my tools, so I’m currently…


How many of you deal with the (small) struggle of compiling your Android project and when you look at the installed app, you realize that you had the wrong build variant selected? Or, on the opposite side, you weren’t even able to compile it because you’ve got a release build selected on one module and debug on the others?

I do… well, did.

It happens a couple of times, it’s nothing dramatic, but it happens here and then. Typically you can replicate this on a project that has multiple build types/ flavors defined and on the following scenarios: - cloning…


This is a really simple and direct tutorial, but it really took me more than I want to admit to understand why this wasn’t working as expected, and since there isn’t much information about it I thought it’s worth sharing — annotation processor: printing a message (and doing it in a new line).

Printing a message

Printing a message in the build console is quite simple, you just need to call ProcessingEnvironment.Message.printMessage(Kind, CharSequence).

In order to access this method, you need to extend the class AbstractProcessor and override the process function, something like:

And if you look at the build view, you…


Once upon a time… there was an issue that was hidden in plain sight! It lived freely for years without no one noticing it. Until one day, during a connectivity problem, he appeared leaving us speechless.

Well, this is not going to be a fairytale but instead a cautionary tale. My goal with this article (and probably a couple more that are gaining some dust on drafts) is to create awareness on some scenarios that might arise during Android development — in this first one, why you should never call System.exit(n) or in Kotlin exitProcess(n)

Use case

Although the use case where…

Carlos Mota

👨‍💻, 🔭🌖, 🗺, 📸, 🏃‍💨, 🇵🇹, 🖖 - is this how I should use emojis? Also: https://www.cafonsomota.xyz/

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