Skip to main content

Giorgos Neokleous

Kotlin's Coroutines Testing Tips

Introduction Do you love Kotlin’s Coroutines? So do I! Kotlin’s Coroutines offer many benefits such as: Readability: the following code can be read line by line and understand the order of execution without going into callbacks (at least on what the developers write). suspend fun runTwoExpensiveOperations() { // Running First Operation val resultOfFirstExpensiveOperation = withContext(Dispatchers.IO) { runFirstExpensiveOperation() } // Running Second Operation val resultOfSecondExpensiveOperation = withContext(Dispatchers.IO) { runSecondExpensiveOperation(resultOfFirstExpensiveOperation) } return resultOfSecondExpensiveOperation } Reactive capabilities: Flows, Channels, StateFlow come with a lot of operators which provide an API for hot and cold streams.

Let’s talk (Tts)Spans in Android Accessibility

A great talk from the Google IO 2019 called “Demystifying Android Accessibility Development” mentions that when designing apps, we often miss to account for the users with accessibility needs. Users with accessibility needs won’t interact with the app directly, but instead they will use tools such as the Android Accessibility Suite (includes Talkback and Switch Access). The user will interact with the Accessibility service and then the service will interact with the app.

Full-Screen Intent Notifications – Android

What are Full-Screen Intents? Full-Screen Intents are Intents that can launch in full-screen and can be used for showing a full-screen notification. Well, I guess that needs a bit more explanation so keep on reading. From the official docs: Your app might need to display an urgent, time-sensitive message, such as an incoming phone call or a ringing alarm. In these situations, you can associate a full-screen intent with your notification.

Documenting your XML attributes – Custom View

Today, I will walk you through on how to create a very basic Custom View, and we will do something that many libraries and developers often forget to do: Documenting XML Attributes, which offer customizations on custom views. Why Documentation sometimes is redundant if the method, class or property is self-describing. However, imagine any Android API without it. Android development will instantly turn into living hell. To figure out what’s going on we will have to step into source code and trial-and-error different options.

Name your .apk & .aab files

This post will explore how to rename your artifacts, to convey meaning. Why? Use cases: When your application has multiple “flavours”, you need the outputs identifiable. When you produce multiple versions at the same time, you need to tell which artifact is which. To check your current artifact’s name simply run assembleDebug Gradle task. If you haven’t modified it yet, your output will be app-debug.apk. What would be better to have is something that is identifiable and meaningful like the template below: