Category: Reference

  • build.gradle.kts conversion for Android Studio Empty Activity

    build.gradle.kts conversion for Android Studio Empty Activity

    Quick blog posting showing you the build.gradle.kts version of the default build.gradle file from the “empty activity” Android Studio template. This post will go stale fast, get it whilst its hot. 🙂 The original templates come from the New Project, other templates are explained here: https://developer.android.com/studio/projects/templates Google has an explainer of converting build configuration scripts…

  • Android Job Interview – Take-Home Test Cheat Sheet

    Android Job Interview – Take-Home Test Cheat Sheet

    Learn the steps needed in a typical Android take home test. Giving you the tools and knowledge you need to ace this part of any Android interview process.

  • Proven Prepping for Easy Android Interviews in 2023

    Proven Prepping for Easy Android Interviews in 2023

    This post aims to demystify some of the steps in a typical Android interview process. We’ll discuss steps, strategies, targets and solutions. Getting you better prepared to get your next Android role. This blog is from personal experience, caveat up front that your experience could be completely different, but I’ve been through A LOT of…

  • Speed up your build: Non-transitive R files

    Speed up your build: Non-transitive R files

    Non-transitive R files became available to all modules in AGP 4.2. Non-transitive R files allow your builds to be incrementally faster and your AAB/APK’s smaller. This post will explain how to implement and build your app with non-transitive R files. Non-transitive what? In mathematics, non-transitivity is a property of binary relations that are not transitive relations.…

  • AppGallery Connect Remote Configuration: Spice up your app without the fuss

    AppGallery Connect Remote Configuration: Spice up your app without the fuss

    This blog will show you how to use Remote Config to toggle app features based on a remote setup. Using Huawei’s AppGallery Connect we can leverage user attributes and remote conditions to quickly and easily modify parameters from the cloud.

  • To dip or not to dp, that is the compose question

    To dip or not to dp, that is the compose question

    I know what you are thinking, why wasn’t this feature shipped with the compose 1.0, a travesty! Well don’t worry because now it’s here, by un-popular demand. No longer do you have to pine for the good old days, no longer do you have to think “I don’t like change”. Now, you can once again…

  • Fix: Jetpack Compose observeAsState Type Error has no method

    This quick blog post helps you solve the error “Type state has no method getValue” when first starting to observe state on your ViewModel.

  • When is a Type not a Type? Kotlin in the IDE

    When is a Type not a Type? Kotlin in the IDE

    This article explains the ‘show type hints’ feature of IntelliJ. To get to see those sweet variable types you desire but not change any of the code conventions in your place of work.

  • [TUT] Google Cloud IoT Core – MQTT on Android

    I just started playing with Google Cloud IoT Core with AndroidThings, and the communication is done via MQTT. However I couldn’t find a decent, simple example of how to do it. Not for long! This blog explains how to setup communication between an Android app and Cloud IoT Core. You will need your credentials so…

  • Threading best practices : 3 ways on Android Things

    Working with Android Things means connecting to peripheral sensors & actuators to communicate sending or receiving commands and data. As with all Android development, you should be evaluating the impact of this and consider offloading the effort onto another thread wherever possible. So what is best practice for threading on Android Things? Like with all…

  • How to use an extra GPIO pin on Raspberry Pi Rainbow Hat

    This is an Android Things quick fix explanation of using an extra GPIO pin on the Rainbow Hat for the Raspberry Pi. I couldn’t find this solution written in any documentation. So here I am to share it with you. When you use the Rainbow Hat it takes all the pins of the Raspberry Pi.…

  • Enchant your users, without boring them with repetition – Animations

    I hope you know the Android Design Principles, if not shh quick read them here. There is also a great talk on the principles from Google IO, so if you prefer video click this. Here I want to talk about animations in your application. Animations are great, they can create a delightful, enchanting experience. Animations…

  • Arrow Logger – Log louder than everyone else

    Recently I’ve been playing round with a few libraries that people share based upon an api or service that they offer. These libraries offer access to data in a controlled way and more often than not require authorisation to use. When I’ve picked up the library I just want to start coding straight away and…

  • [TUT] How to run Robolectric JUnit tests in Android Studio

    After my blog post on describing an Android Gradle App with Robolectric JUnit tests. I follow up here with how to run these tests within your AndroidStudio. The outcome being faster feedback from your tests and great IDE integration. Ok here we’ll explain how to create a run configuration that will run all the tests…