Issue #550

December 25th, 2022
Android Weekly Updates
Official Android Weekly sticker packs and individual stickers, handmade by one of our co-founders.
We followed thousands of Android developers to the Android dev Mastodon server. So if you are on Mastodon, say hello 👋
Articles & Tutorials
Tanay Tandon examines how we can unit-test a fragment with three states.
John O'Reilly shows how using KMM-ViewModel library makes it possible to share your ViewModel between iOS and Android.
Continuing this series on testing, Corey Scott completes the thread with an examination of What we should be testing and What we should not be testing.
Ban Markovic shows how we can make our own custom OTP input field in Jetpack Compose.
Nav Singh shows how to test state restoration in your Composables.
Akash Khunt shows how you can quickly work out code in Android Studio/IntelliJ using Scratch Files.
Cedric Ferry writes about creating organic stylus experiences with low-latency graphics and motion prediction APIs.
Thomas Künneth continues his series on foldable devices, taking a look at how to test our app on them.
Shreyas Patil shares an opinionated post about what ViewModels should and shouldn't do, based on recent experiences and seeing common mistakes or anti-patterns.
At some point, you will have to test functions with callback/lambda arguments. James Shvarts shows how to do this using MockK
IntelliJ and Android Studio try to constantly reload Gradle projects by default. Zac Sweers shows how disabling that behavior can improve your workflow
Alex Styl teaches you how to model complex screens in Jetpack Compose.
When Paparazzi test shards became flaky on CI, it was time for Luis Cortes to dig in and figure out why.
Place a sponsored post
We reach out to more than 80k Android developers around the world, every week, through our email newsletter and social media channels. If you have a product or service that helps Android developers, you should reach out to us and place a sponsored post in our upcoming issues!
Libraries & Code
Experimental Kotlin/Native compiler plugin that generates Parcelable implementations for Darwin (Apple) targets. Allows writing Parcelable classes for all Darwin targets, similary to the Android's kotlin-parcelize plugin.
A multiplatform Mastodon client written in Kotlin for the amazing androiddev.social community and everyone else who enjoys #Fediverse
Price Tag Scanner app built using Kotlin, Jetpack Compose, MLKit and OpenCV4 SDK.
News
Google put together a highlights recap, and a commemorative poster celebrating 2022!
Google Play's recap of this past year.
Jetbrains has published the Ktor roadmap for 2023, highlighting the main areas of focus for the year ahead.
Videos & Podcasts
In this episode, James Ward joins Chet, Tor, and Romain to talk about Kotlin. They talk about Kotlin Multiplatform (both KMP and KMM) and what’s coming for Kotlin in 2023, especially the new K2 frontend.
The Attribution Reporting API is designed to provide improved user privacy by removing reliance on cross-party user identifiers, and to support key use cases for attribution and conversion measurement. This video will walk you through a sample implementation of the Attribution Reporting API on Android.
Adam McNeilly is building a widget using Jetpack Glance! In this section, he goes through the work to create and render a widget on the screen using some test data.
In this video, Philipp Lackner teaches how you can use LocalDate, LocalTime, LocalDateTime, and ZonedDateTime in your Kotlin projects.
An in-depth walkthrough of a sample app using the FLEDGE API, a component of the Privacy Sandbox on Android.
Charfaoui Younes shows how we can inject Room dependencies through the hilt. That way, we can reduce too much boilerplate code to set up the ViewModel, Repository, and Database instance.