Over a year in the making, I’m thrilled to say that Muzei 2.3 is now live and available to all on the Google Play Store!
A brief history
Muzei is an open source project started by Roman Nurik back in 2014 as a serendipitous idea to improve the wallpaper experience, both to ensure the readability of icons and text on your home screens using blurring and dimming, inspiring people with great artwork delivered daily, and personalizing your wallpaper with the help of a plugin API to select wallpaper images from any number of sources.
I had started helping Roman out back in October 2014, soon after I had joined Google, working on bug fixes on the main app and building out the app for Android Wear, allowing us to produce something Only on Android with wallpapers provided by a third party source, shown on your phone, sent to your Android Wear watch, then be read by other watch faces such as FORM that integrate with Muzei’s wallpaper information API. This same API also allows other apps such as Action Launcher 3 to pull the current wallpaper for theming the launcher to match.
The last release of Muzei was in November 2015, just a month after Marshmallow added runtime permissions, Doze, and App Standby. Since then, we’ve had a number of tasty treats and a big goal of Muzei 2.3 was to modernize the code base and take advantage of a lot of these new features.
In this day and age, I firmly believe that if you’re making an Android app, you should be using runtime permissions (that’s assuming you need dangerous permissions at all — in many cases, you don’t actually need them!).
Muzei was already a very good citizen in this account: the only dangerous permission it requested was the storage permission. After examination, that permission was only needed for the My Photos source and only if you wanted random pictures from your phone. This made it very easy to move the runtime permission request to only that art source (using the brand new setupActivity metadata field which allows you to trigger behavior when your art source is selected). Even then, the permission is totally optional and you can instead pick exactly what pictures if you don’t want to use the random picture functionality.
Direct Boot Support
On Pixel devices, apps have the ability to run even before the device is unlocked after a reboot: this is called Direct Boot. While most apps don’t need to worry about Direct Boot, you shouldn’t have to suffer through some default wallpaper until you unlock your device. Muzei 2.3 adds full support for Direct Boot so you’ll get your custom wallpaper with your custom settings immediately after a reboot.
A ‘Next Artwork’ quick settings tile
Probably one of my favorite features of Android 7.0 was the introduction of the quick settings tile API where your app can publish actions as quick settings tiles, available anywhere with a swipe down from the notification shade.
Muzei 2.3 takes advantage of this by offering a quick settings tile for quickly going to your next artwork, exactly as if you opened Muzei and clicked the button yourself.
An ‘Artwork Info’ App Shortcut
Enjoying the artwork itself is certainly the primary action when it comes to Muzei, but one feature that has always existed was a way of learning more about your current background by tapping on the title and description within the Muzei app.
With the help of Android 7.1’s App Shortcuts, you’ll now have quick access to the artwork info from your home screen.
‘My Photos’ art source
Muzei ships with two art sources by default: the Featured Art source showing featured artwork and the My Photos source showing, you guessed it, your photos. While the Featured Art source hasn’t changed much, the My Photos source has been significantly overhauled, both visually and under the hood.
Changes to adding individual photos
In past versions of Muzei, each photo you added to the My Photos source was an ‘import’ — Muzei would make a copy of the photo and store that copy for later usage. This had the unfortunate side effect of doubling the storage space needed (once in the original location and once within Muzei). While that wasn’t much of a problem for 5 or 10 of your favorite photos, it made a significant difference when it was instead 100 or 1,000 photos.
In Muzei 2.3, Muzei now uses the Storage Access Framework and specifically ACTION_OPEN_DOCUMENT to get persistent access to photos, whether they are local photos or on cloud storage such as Google Drive. This means you can freely add thousands of photos without the additional storage space!
Note: not every app *coughgooglephotoscough* supports ACTION_OPEN_DOCUMENT. You’ll still be able to import photos from those apps by selecting the aptly named Import option from the overflow menu. Please, please send feedback to those apps to create a DocumentsProvider and support ACTION_OPEN_DOCUMENT. Feel free to send them a link to my previous blog post on building a DocumentsProvider.
Adding folders of photos
One of the most requested features since Muzei’s inception has been the ability to add an entire folder of photos rather than individual photos and Muzei 2.3 delivers! You’ll now be able to add a whole folder of photos to the My Photos source and any updates (adding new photos, removing old photos, etc.) will automatically update the set of photos used by Muzei.
This feature relies on another piece of the Storage Access Framework, namely ACTION_OPEN_DOCUMENT_TREE, which was added in Android 5.0 Lollipop (API 21). Sorry KitKat users.
Note: support for ACTION_OPEN_DOCUMENT_TREE is…a bit sparse. You’ll definitely be able to select folders on your local device (you might need to go into the overflow menu and select ‘Show internal storage’ first though). Again, please send feedback to the apps you want to support this API. If they’ve already built a DocumentsProvider and show up for individual photos, this involves adding just a single flag and one method to implement.
When you use Muzei for quite some time, there’s naturally some favorite past artwork you’ve seen go by. To make these pieces of art slightly more accessible, Muzei 2.3 includes a full DocumentsProvider for browsing past artwork either by date or by source. Besides making any past artwork available to the My Photos source, this also makes it a lot easier to share your current or past wallpaper through any app that uses the standard intents for selecting a photo.
Android Wear 2.0 and Complications
With the launch of Android Wear 2.0 comes a host of new features for developers. One of particular importance to Muzei is complications: any Wear 2.0 app can provide data to other watch faces. This can come in the form of small snippets of text, an icon, a whole line of text, or even the background image for the entire watch face.
Muzei 2.3 takes advantage of these new APIs by providing the Muzei background image and artwork information to other Wear 2.0 watch faces.
So whether you like the default Muzei watch face or want to try out any of the new Wear 2.0 watch faces, you can still bring your Muzei background with you.
The elephant in the room: reliability
Given that Muzei is a live wallpaper running basically 24x7 on your phone, reliability is ridiculously important. A significant amount of time was spent on Muzei 2.3 in improving this key metric and you’ll find things should be much more reliable overall.
Since the beginning, Muzei has used RenderScript to do the blurring effect using the aptly named ScriptIntrinsicBlur. With Muzei 2.3 raising the minimum API level to 19 (from 16), we were able to switch from the Support Library implementation to the framework version. This has one very distinct advantage: manufacturers can and should have tested the API on their device to ensure that it is working. Initial results are very promising, showing that some devices that consistently crashed before now work perfectly.
Note: of course, it is possible that some manufacturers still haven’t tested their devices, despite this being a standard Android API. If your device is still crashing on first launch, it is very likely this is the cause and you should contact the device maintainer (if you’re running a custom ROM) or manufacturer.
Muzei also now uses Firebase Crash Reporting, so even if you don’t send feedback on every crash (which you totally should, include your name, and then post in the Muzei Google+ community with repro steps), I’ll be aggressively working down any crashes that come up.
There has been some changes in memory usage of Muzei (a particularly long standing memory leak was also fixed), but there’s more work to do on this front.
The other part of reliability is in loading new wallpapers. There have been significant improvements on the Muzei side to increase reliability, particularly in cases where there is bad internet connectivity.
However, there’s still a lot of work to do on improving the reliability on the art source side. At this point, consider disabling battery optimizations on art sources if you are still having issues with new artwork not loading consistently.
A major focus for the next version of Muzei (yes, there’s more to come!) is in rebuilding the MuzeiArtSource API to be fully compatible with Doze, App Standby, and future background optimizations. For API developers, please join the Google+ community where additional information will be posted in the near future.
More to come!
I’m super excited about Muzei 2.3, but I’m even more excited about the future of Muzei. Besides a relentless push for higher quality, there’s some more long standing feature requests in the pipeline.
Of course, if you haven’t downloaded Muzei at all, there’s no better time: https://play.google.com/store/apps/details?id=net.nurik.roman.muzei