The CommonsBlog

Latest articles

Multipart Uploads with OkHttp… and a Uri

As changes like scoped storage increase the need to be able to work with content Uri values, I have been increasingly pointing developers to this OkHttp issue comment. If you have a need to do a multipart form upload, and your content is identified by a Uri instead of a File, the InputStreamRequestBody that Jared Burrows created (with help from...

“Elements of Android Jetpack” Version 1.0 Released

Subscribers now have access to Version 1.0 of Elements of Android Jetpack, in PDF, EPUB, and MOBI/Kindle formats. Just log into your Warescription page to download it, or set up an account and subscribe! This update contains no substantial changes, just a bunch of bug fixes and other refinements to the prose. In particular, this update still...

“Elements of Kotlin Coroutines” Version 0.2 Released

Subscribers now have access to Version 0.2 of Elements of Kotlin Coroutines, in PDF, EPUB, and MOBI/Kindle formats. Just log into your Warescription page to download it, or set up an account and subscribe! It adds four new chapters: Channels StateFlow Adapting callback-based APIs Using coroutines in Android UIs There are...

Count Your SAF Uri Persisted Permissions!

Now that everyone (cough) is using the Storage Access Framework (SAF), we are starting to push the boundaries of what it can and cannot do. As developers have yelped about over the years, the SAF has its limits. And, as one of my subscribers pointed out recently, one of those limits is how many persistable permission grants you can take. As...

Random Musings on Android 11 Beta 1

Each time Google releases a new developer preview or beta, I read what I can to see if there are things that warrant more attention from developers, based on the API differences report and other release documentation. Yesterday, Google released Android 11 Beta 1. What I Liked a Lot It shipped. Build.VERSION_CODES.R now has the real value...

@Preview Annotation Properties

Part of the allure of Jetpack Compose is the ease of the @Preview annotation. Just put it on a zero-parameter @Composable function and you can see what that function renders in a preview panel. So, for example, we can have: @Composable fun SimpleButton(message: String, padding: Dp, clickAction: () -> Unit) { Button( modifier...

Reflection and Composables

For production code in ordinary apps, using reflection is often considered to be poor form. Looking up classes and functions at runtime can lead to some difficult-to-debug problems and can result in long-term maintenance headaches. And, in fairly ordinary app code, reflection usually is unnecessary. Where reflection starts to become more important...

Upcoming Presentation on Jetpack Compose

On June 17th, I will be talking about Jetpack Compose at an online Meetup jointly hosted by the GDG Boston and GDG Toronto Android communities! This is open to anyone, not just members of those GDGs, so if you are interested, register to attend! My talk is entitled “What to Expect When You’re Expecting… Jetpack Compose”. This is not going...

“Elements of Android Jetpack” Version 0.9 Released

Subscribers now have access to Version 0.9 of Elements of Android Jetpack, in PDF, EPUB, and MOBI/Kindle formats. Just log into your Warescription page to download it, or set up an account and subscribe! This update adds one more chapter, covering dialogs. This also ties into a new section in the chapter on architecture, looking at the differences...

R Raw Paths, DP4 Style

A couple of months ago, I wrote about raw paths and “all files access” on Android R, using R DP2. And… what I had there on raw paths is not completely accurate for R DP4. I am not certain how much of that represents changes in Android R and how much of that represents screwups in my original testing. What I am seeing in R DP4 is: With...

Discover, share and read the best on the web

Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters! Get unfiltered news feeds or filter them to your liking.

Get Inoreader
Inoreader - Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters!