Google Assistant is a ridiculously powerful piece of software, but it’s more useful when developers take the time to integrate its capabilities into their applications. Today, Google is detailing how developers on Android can integrate their media apps with Google Assistant.

In a blog post on the Android Developers Blog, Google highlights the MediaSession APIs as the best way for developers to bring Assistant to their apps. The idea here is that, by using this API, media apps such as music players will be able to be controlled by Assistant both on the phone, and on other devices such as Android Wear, Android TV, and more.

This API can be used to control things such as active music playback (play, pause, skip, etc), as well as asking for specific tracks, genres, or albums to be played through the app. This can also be used to control video depending on the platform the app is being used on.

The Google Assistant uses MediaSession in the same way as other external controllers such as Android Wear do. Each of these controllers cause state changes inside your app, and there needs to be a way to respond to these changes. This is where MediaSession comes into play. By using MediaSession, the Google Assistant can control your app’s media playback, as well as stay synced with its current state.

Google’s full blog post offers up a bit more information on how developers can take advantage of this API, as well as some sample projects, tutorials, and tests to get things up and running.

Check out 9to5Google on YouTube for more news:

FTC: We use income earning auto affiliate links. More.

Check out 9to5Google on YouTube for more news:

You’re reading 9to5Google — experts who break news about Google and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Google on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

About the Author

Ben Schoon

Ben is a writer and video producer for 9to5Google.

Find him on Twitter @NexusBen. Send tips to schoon@9to5g.com or encrypted to benschoon@protonmail.com.