-
·
Hiding Text in Kotlin – How many ways?
At some point you may want to show that you know a text value, but not show the value itself. For example, when you have sensitive data stored like a password, you may want to show a representation of the length of that password but not the characters themselves. How would you do this in…
-
·
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:…
-
·
I/O 2019 Android Track Picks & Insights
Google I/O is a wrap. The conference celebrated product and platform innovations at Google. As part of the Google Developer Expert programme a group of us travelled to I/O and enjoyed learning together, here we want to share some of our top moments and sessions from the event. This is just a snippet of what…
-

·
Kotlin Anti-Patterns – Also this is Null
Kotlin is a young language, and with that comes many untrodden paths and unknown gotchas. Let’s explore one of these anti-patterns, for the sake of the article I’ve called it “Also this is null”.
-
·
[TUT] Speech to Text from a File with Google Cloud Speech API
This blog will explain how to use Google Cloud’s Speech API to convert an audio recording of someone speaking to text in Android. We’ll use Kotlin and the Google Speech client for best results. Google offers a speech recognition API, that is able to convert your spoken language into a textual representation. The API has…
-
·
[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] How to use another power supply with your IoT device
When creating IoT systems, you’ll often want to use devices that run off another voltage of power supply than the normal 3.3v or 5v that your Raspberry Pi or other development board can give out. In this instance you need to use a relay. This post will walk through the use relay circuit boards and…
-
·
[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…
-
·
[TUT] Android Things – Using the ADS1015 analog to digital converter driver library
This post is going to explain how to use the ADS1015 Analog to Digital converter with Android Things. The board can convert analog sensor signals to digital input for the android things board, as well as acting as a programmable gain amplifier up to 16x. It has 12-bit precision at 3300 samples/second over I2C. What…
-
·
[TUT] Android Things – APA102 7 LED Array, SPI on the Rainbow Hat
This blog post will explain how you can use the SPI protocol to shine an LED rainbow from your AndroidThings application. We’ll discuss the Raspberry Pi Rainbow hat and its actuators, in this case the seven rgb pixels which we’ll use to make a lovely kids style rainbow colored pattern. Hardware Prerequisite: We have the…
-
·
[TUT] Android Things – Alphanumeric Segment Display, I2C on the Rainbow Hat
This post will explain how you can use the I2C protocol to output from your AndroidThings application. We’ll discuss the Raspberry Pi Rainbow hat and its actuators, in this case the 4-digit Alphanumeric Character Display which we’ll use to count down from 1000. Hardware Prerequisite: We have the Rainbow Hat connected to the top of…
-
·
[TUT] Android Things – Temperature Sensor, I2C on the Rainbow Hat
This post will explain how to use the I2C protocol to get input into your Android Things application. We’ll discuss the Raspberry Pi Rainbow Hat temperature sensor which we’ll use to measure air temperature surrounding your pi. Hardware Prerequisite: We have the Rainbow Hat connected to the top of our raspberry pi. Software Prerequisite: An…
-
·
[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…