KTX is a series of Kotlin extension functions for Android that first appeared in February 2018. They can simplify many repetitive tasks or those which require boilerplate code. However, they are not always easy to discover. I find it useful to periodically scan through the list here. I find this a good way of discovering…
Category: Kotlin
KTX: Graphics
KTX is a series of Kotlin extension functions for Android that first appeared in February 2018. They can simplify many repetitive tasks or those which require boilerplate code. However, they are not always easy to discover. I find it useful to periodically scan through the list here. I find this a good way of discovering…
KTX: Views
KTX is a series of Kotlin extension functions for Android that first appeared in February 2018. They can simplify many repetitive tasks or those which require boilerplate code. However, they are not always easy to discover. I find it useful to periodically scan through the list here. I find this a good way of discovering…
SSID Connector – Compatibility Wrapper
Recently a friend and former colleague Robert Sproats approached me regarding some issues he was having. He asked if I was aware of best practices for connecting to a specific WiFi SSID on modern and legacy devices. Android Q deprecated the WifiManager APIs for this and they no longer work for Q and later devices.…
SSID Connector – Callback Flow
Recently a friend and former colleague Robert Sproats approached me regarding some issues he was having. He asked if I was aware of best practices for connecting to a specific WiFi SSID on modern and legacy devices. Android Q deprecated the WifiManager APIs for this and they no longer work for Q and later devices.…
Custom Lint Check
Back in November 2019 I wrote about an issue that can cause problems when serialising Kotlin objects. It is one thing to know about this issue, but quite another to find all instances of it in your code and, as importantly, to remember it in code you and the rest of your team add to…
Kotlin: Serialization – Update
Last week I published an article covering the kotlinx.serialisation library and how it had the potential to overcome the issue of Kotlin object serialization using Java Serialization not correctly handling the object singleton implementation which under-pins Kotlin objects. However, at the time I wrote that article, Kotlin sealed class hierarchies were not supported by kotlinx.serialisation,…
Kotlin: Serialization
After chatting with Sebastiano Poggi about the issues with using Kotlin objects that I covered in a recent post, he made the interesting suggestion that possibly kotlinx.serialization might work better than the Java implementation because it is faster, more flexible (we can use different serialisation formats such as JSON or Protobuf), and is built with…
Kotlin: Serializable Objects
When is a Kotlin object not a Kotlin object? When it’s a Serializable Kotlin object. This blog post is the story of a strange issue that I encountered recently where a Kotlin object stopped behaving as it was supposed to, how I initially got it working with a bad fix, and how I eventually fixed…
Mandelbrot: Progressive Rendering
In this series we’re going to build an app to view the Mandelbrot set. While this is not necessarily something that is likely to be of direct use to the majority of app developers (except for those that have a desire to develop their own Mandelbrot set viewing apps), there are some techniques that we’ll…