Category: Uncategorized

  • Tame Your Gradle Dependencies just BECAUSE!

    Did you know you can specify a reason for using a certain dependency or certain version of a dependency? Yep it’s in the API here and referenced in the DOCS here. void because?(@Nullable String reason) Sets the reason why this dependency should be used. Since: 4.6 Below is a basic example of how its used:…

  • [TUT] Kotlin Extension Functions by Example

    Kotlin Extension functions allow you to add behaviour (think methods/functions) to any other type on the platform or in your codebase. The idea being to allow for greater flexibility and less boiler plate code. Let’s have a quick run through of how to create them and what are some advantages and disadvantages. The official docs:…

  • [TUT] Creating a ByteString in Android

    The protobuf library has a construct called ByteString. This is a immutable sequence of bytes, usually used to serialise a file or other piece of data. Recently when using the Google Cloud Speech to Text library I had to convert a local voice recording to this protobuf ByteString to be able to send it to…

  • [TUT] Android Things – Zx Gesture Sensor using UART

    This blog post is going to show you how you can use the UART protocol to output from your AndroidThings application. We will attach a ZX Sensor and detect some movement hand gestures, minority report style. We’ll use swipe gestures to change our Rainbow Hat LEDs through a range of colours. Hardware Prerequisite: We have…