Open in app

Sign In

Write

Sign In

Christophe Beyls
Christophe Beyls

2.5K Followers

Home

About

Pinned

Kotlin JSON Benchmark on Android (2022): Moshi vs Kotlin Serialization

When it comes to automatic serialization and deserialization of Kotlin classes using the JSON format, the two main libraries compatible with Kotlin metadata are currently Moshi and Kotlin Serialization. This compatibility is especially important for non-null types and default values during deserialization, where lack of proper Kotlin support could result…

Android App Development

10 min read

Kotlin JSON Benchmark on Android (2022): Moshi vs Kotlin Serialization
Kotlin JSON Benchmark on Android (2022): Moshi vs Kotlin Serialization
Android App Development

10 min read


Pinned

ViewLifecycleLazy and other ways to avoid View memory leaks in Android Fragments

Yet another take on AutoClearedValue — Handling the lifecycle of Android Fragments is difficult. I already covered this topic in an article I wrote in 2017, before Google added a View-specific Lifecycle to Fragments in an attempt to solve some issues. Until now, the number one cause of memory leaks when using Fragments remains the same…

Android App Development

5 min read

ViewLifecycleLazy and other ways to avoid View memory leaks in Android Fragments
ViewLifecycleLazy and other ways to avoid View memory leaks in Android Fragments
Android App Development

5 min read


Pinned

Smarter Shared Kotlin Flows

Make the lifecycle available to the upstream Flow to skip unnecessary work — This is the second part of a series of articles about using Kotlin Flow on Android. In the first part, we described the main limitation of Kotlin Flow when used inside ViewModel classes: When a SharedFlow or StateFlow using the SharingStarted.WhileSubscribed() strategy is collected again after the user navigates back…

Kotlin

12 min read

Smarter Shared Kotlin Flows
Smarter Shared Kotlin Flows
Kotlin

12 min read


Aug 28, 2021

Kotlin’s Flow in ViewModels: it’s complicated

LiveData is still your friend — Loading UI data in Android applications can be challenging. The lifecycles of the various screens need to be taken into account, as well as configuration changes leading to the destruction and recreation of Activities. The individual screens of an app constantly toggle between interactive and hidden as the user navigates…

Kotlin

14 min read

Kotlin’s Flow in ViewModels: it’s complicated
Kotlin’s Flow in ViewModels: it’s complicated
Kotlin

14 min read


Mar 26, 2020

Fixing RecyclerView nested scrolling in opposite direction

and making ViewPager2 usable — RecyclerView is one of the main building blocks of Android user interfaces today. It’s more capable and flexible than its ListView predecessor but this also leads to more complexity and new problems. One core feature of RecyclerView is the externalization of its layout engine to components called LayoutManagers, which are…

Android App Development

8 min read

Fixing RecyclerView nested scrolling in opposite direction
Fixing RecyclerView nested scrolling in opposite direction
Android App Development

8 min read


Nov 19, 2019

A study of the Parcelize feature from Kotlin Android Extensions

Life is too short to waste time on writing Parcelable code — Two years ago, I wrote about how you can leverage features of the Kotlin programming language to manually write your Android Parcelable implementations in the most concise and readable way. Does it mean that I always prefer writing this code manually rather than letting a library or tool generate it…

Kotlin

18 min read

A study of the Parcelize feature from Kotlin Android Extensions
A study of the Parcelize feature from Kotlin Android Extensions
Kotlin

18 min read


Jul 30, 2018

Advanced JSON parsing techniques using Moshi and Kotlin

A match made in parser heaven — Moshi is a modern JSON library for Android and Java from Square. It can be considered as the successor to GSON, with a simpler and leaner API and an architecture enabling better performance through the use of the Okio library. …

Kotlin

11 min read

Advanced JSON parsing techniques using Moshi and Kotlin
Advanced JSON parsing techniques using Moshi and Kotlin
Kotlin

11 min read


Jul 14, 2018

Flash your Lenovo Ideapad laptop BIOS from Linux using UEFI capsule updates

I’m the happy owner of a Lenovo Ideapad laptop (model 710S-13IKB). It’s comparable to the Dell XPS 13 and runs beautifully under Linux, but one detail has always been bugging me: Lenovo only provides BIOS updates for its Ideapad laptops in the form of Windows 10 executable files. System firmware…

Linux

7 min read

Flash your Lenovo Ideapad laptop BIOS from Linux using UEFI capsule updates
Flash your Lenovo Ideapad laptop BIOS from Linux using UEFI capsule updates
Linux

7 min read


Oct 24, 2017

Architecture Components pitfalls — Part 1

LiveData and the Fragment lifecycle — The new Android Architecure Components are soon to be announced as stable after a few months of public testing. A lot has already been written about the basics (starting with the very good documentation) so I won’t cover them here. Instead I would like to focus on important pitfalls that…

Architecture Components

8 min read

Architecture Components pitfalls — Part 1
Architecture Components pitfalls — Part 1
Architecture Components

8 min read


Aug 26, 2017

Kotlin singletons with argument

object has its limits — In Kotlin, the singleton pattern is used as a replacement for static members and fields that don’t exist in that programming language. A singleton is created by simply declaring an object. object SomeSingleton Contrary to a class, an object can’t have any constructor, but init blocks are allowed if some…

Kotlin

5 min read

Kotlin singletons with argument
Kotlin singletons with argument
Kotlin

5 min read

Christophe Beyls

Christophe Beyls

2.5K Followers

Android developer from Belgium, blogging about advanced programming topics.

Following
  • Manuel Vivo

    Manuel Vivo

  • Android Developers

    Android Developers

  • Pascal Polleunus

    Pascal Polleunus

  • Nick De Cooman

    Nick De Cooman

  • Guillaume Hachez

    Guillaume Hachez

See all (41)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech