Post has attachment
The second post in the ViewModel series is out!

Learn more here:

In part one, we looked at a simple example with the new ViewModel Architecture Component. This time, we're taking a look at how ViewModels relate to local persistence, onSaveInstanceState() and Loaders. There's also an explanation of saving and reloading complex UI state efficiently with a ViewModel.

There's more to come, so let us know your ViewModel and android architecture related questions!

Post has attachment
What's up with the new Architecture Component ViewModel? Find out in the first of a series of blog posts about ViewModels. The post this week is an introduction to ViewModels and the ViewModel lifecycle with a simple practical example:

There'll be deeper ViewModel dives to come, so let us know your ViewModel and Architecture Component related questions!

Post has attachment
Lessons learned while converting to Kotlin with Android Studio

Just converted your app to Kotlin? Here are some tips to improve your code!

Read the blog post here:

Post has shared content
Here's a great example of how to use AnimatedVectorDrawable's to delight your users by +Nick Butcher
I recently saw a question on /r/androiddev asking how to implement a fancy animation… and decided to demonstrate how to do it using AnimatedVectorDrawable.

Here's a breakdown of how I did it:

Or you can jump straight to the code here:

#AndroidDev #AndroidDesign #Animation
Animated Photo

Post has attachment
Background Optimizations in Android 7.0 Nougat

Android 7.0 Nougat contains a number of optimizations around background processing, intending to limit the amount of memory thrashing caused when many apps listen for the same implicit broadcast via manifest registered receivers, leading to poor overall system performance when the device is switching networks or when a picture or video was just captured.

When targeting API 24, you’ll no longer receive CONNECTIVITY_CHANGE broadcasts to manifest registered receivers (although runtime receivers will continue to work as your process is already in memory) - consider using JobScheduler to listen for network change events.

For all apps, regardless of whether they target API 24 or not, you’ll no longer be able to send or receive NEW_PICTURE or NEW_VIDEO broadcasts, usually sent immediately after taking a new picture or new video, respectively. Instead, use JobScheduler’s new ability to trigger based on content URI changes to kick off your job.

Check out the documentation for all of the details:
And learn all about JobScheduler in our previous video:


Post has attachment
Quick Settings Tiles

While quick settings tiles such as WiFi, Bluetooth, and Airplane mode have been around for some time, Android 7.0 adds the ability for any app to provide their own quick settings tile, giving users quick access to the most important and frequent actions from your app.

Watch the video to learn about the lifecycle of your TileService, how to update your tile, and how to handle clicks, then read the blog post for all the details and a full rundown of the quick settings tile API:

#AndroidNougat #BuildBetterApps

Post has attachment
Scheduling jobs like a pro with JobScheduler

One of the most important things with respect to background work is being as efficient and low impact as possible. JobScheduler works across the system to batch jobs together--meaning reduced battery drain, reduced memory pressure on API 24+ devices, and built-in awareness of Doze and App Standby.

Read the blog post for all the details and code examples:


Post has attachment
Virtual Files, Alternative Mime Types, and the Storage Access Framework

New in #AndroidNougat, apps using the Storage Access Framework can now provide virtual files - files without a direct bytestream representation. While you can’t use openInputStream() with these virtual files, you can use Android 7.0’s alternative mime types to potentially transcode the files into alternative file formats or simply use them with an ACTION_VIEW Intent to open them in their native editor.

Check out the documentation on virtual files at and read more about the Storage Access Framework at


Post has attachment
Building a DocumentsProvider

Android 4.4 KitKat introduced the Storage Access Framework, a common framework which allows apps use a system provided UI to request files from apps and from local storage. Your app can be an equal partner on that list by implementing a DocumentsProvider, making files your app owns available to other apps, all without needing the Storage permission or requiring you build your own file selection UI.

Watch the video to go through the required APIs needed for building a DocumentsProvider, then read the novel blog post for more details and all of the other functionality that you can add to a DocumentsProvider:

See this video and many others in the full Android Development Patterns playlist:


Post has attachment
Media Playback Apps and the Support Library

When it comes to building a media playback app, the last thing you want to worry about is Android API level. With the restructure of the v4 Support Library and the introduction of the Media-Compat Support Library, knowing exactly what media APIs are available in what Support Library can save you time and effort as you #BuildBetterApps
Wait while more posts are being loaded