The good folks at Google release a sample app for Android that they are calling A new reference app for multi-device applications. The sample app is called Universal Music Player and it works across all Android platforms. This includes Android smartphones, tablets, Android Auto, Android Wear, and Google Cast devices. This is a huge deal because this will help cut development time for many app developers since we can now use the same codebase across multiple Android platforms!
The sample uses a number of new Android 5.0 Lollipop features, like MediaStyle notifications, MediaSession, and MediaBrowserService, that make it easier to implement media browsing and playback on multiple devices with a single app version. As Google explains, “It is now possible to bring the benefits of your app to your users wherever they happen to be, no matter what device they have near them.”
The Universal Music Player is very bare-bones but it is functional. Again, the most important part here is not just that it supports multiple devices and form factors, but that it does so using a single codebase. Because it is a sample app, this audio media app isn’t being released on Google Play. However, it’s available on GitHub so developers can grab the source code and adapt their own app accordingly. You can read more about the reference app here.