Illustration by Virginia Poltrack

Now in Android #5

Scoped storage sample code, Kotlin codelabs, and Android Dev Summit livestream

Chet Haase
Android Developers
Published in
3 min readOct 2, 2019

--

Welcome to Now in Android, your ongoing guide to what’s new and notable in the world of Android development.

Scoped Storage Sample

Using the right permissions and the MediaStore APIs allows your Android 10 app to browse content created by other apps.

One of the important changes in Android 10 is Scoped External Storage. This is one of the changes made in recent releases to help protect user data, by restricting the amount of access that apps have to files that they didn’t create.

Briefly: an app can always access its own files without permissions. But if it wants access to photo/video/audio files created by other apps, it has to use the READ_EXTERNAL_STORAGE permission. For other file types, it must use the Storage Access Framework to get the user involved in selecting files.

The documentation covers the APIs and approaches available for dealing with external storage files. But the explanation is… not necessarily obvious, especially for people new to storage development. We’re working on clearing that up, but in the meantime, Nicole Borrelli created a MediaStore sample in the Storage Samples project on Github to help.

The sample takes you through the process of using the correct permissions to request access to files, and then the appropriate MediaStore APIs to actually load them.

Kotlin Codelabs

You’ve heard about this Kotlin thing, but you’ve been wondering how to get started. Have I got some codelabs for you….

We already offered courses on Udacity for learning Kotlin and Android development in Kotlin. But maybe you prefer more self-paced learning. Or perhaps you just don’t watch videos. Well, it’s your lucky Kotlin day: we’ve taken the core content from those courses and produced a couple of codelab courses.

Kotlin Bootcamp for Programmers is a course (series of codelabs) that takes you through much of the basics of the language. It assumes you are familiar with object-oriented programming already, and introduces you to Kotlin concepts like the functions, classes, and lambdas.

Android Kotlin Fundamentals is another course (series of codelabs) that uses Kotlin to teach many of the important concepts in Android development. This includes some of the basics of Android, like layouts and lifecycles, but also includes modern practices that all Android developers should learn and use, like RecyclerView and Architecture Components. This course doesn’t explicitly teach Kotlin, so you might want to start with the Kotlin Bootcamp course if you haven’t used the language yet.

Android Dev Summit: The Livestream

One of the great things about Google’s developer conferences in the past few years is that you don’t have to be physically present to enjoy the content. If you couldn’t make it to the event, you can still catch all of the sessions online.

For example, the upcoming Android Dev Summit on October 23–24 will livestream all of the sessions on YouTube and Twitter. So not only can you watch the conference from the comfort of your own couch office, you can do it at the same time as everyone else throughout the world, all learning and enjoying the content simultaneously.

You can read more about the event and the livestream on the Android Dev Summit site and sign up for email updates on the event.

Now then…

That’s it for this time. Go play with external scoped storage for Android 10! Learn Kotlin and Android fundamentals! Plan to watch the Android Dev Summit livestream! And come back here soon for the next update from the Android developer universe.

--

--

Chet Haase
Android Developers

Android and comedy. Not necessarily in that order.