Tasker

Start Music with MiBand 4

I made other “posting” plans for today, but after yesterday’s review of the MiBand 4, I figured out how to fix one of the biggest shortcomings of the sports tracker. Despite the ability to control music playback, you cannot start music with MiBand 4. I know how to fix that!

Fixing music playback on MiBand 4

start music with miband4 1 1024x517 - for some reason we don't have an alt tag here

To start music with MiBand 4 you will need 3rd party tools (maybe a future update will fix this flaw, but for now, we need a workaround). You will need to install these two apps:

MiBand Tools

This is a 3rd party app that takes data sent by your MiBand and stores it in its own database, in case you don’t want to use the MiFit. This app can do so much more, so take a look at other features. All I’m interested in, for now, is the ability to intercept touch gestures. This is going to be my “trigger”.

The app has the ability to launch the Google Play Music, but not to start it, so I need to refer to my good old Tasker.

Tasker

Since I’m going to share this with people who may not hear of Tasker as well, Tasker is a tool to automate your Android device. I have an entire section about Tasker alone. All you need to know is – we will use this app to make it play your tunes.

Making it work

MiBand tools can be used as a Tasker plugin. One of the Event options is “Gesture Performed” and this is going to be my trigger.

start music with miband4 3 1024x589 - for some reason we don't have an alt tag here

How to start the music with MiBand4? Simply swipe your finger right and then left when the display is on. MiBand tools will intercept this and passes it on to Tasker.

We can use this in 2 ways, but you can only pick one which suits your needs better

Continue the music stream

start music with miband4 2 844x1024 - for some reason we don't have an alt tag here

The task is super simple! The latest updates brought “Media Control” action. All you need is to use the “play” action [simulated only] and select the Google Play Music app in the options.

This will open the music app in the background and resumes playback of the last played song if stored in memory or starts a completely random song.

Play selected playlist

start music with miband4 1 2 1024x790 - for some reason we don't have an alt tag here

Before you start, note this won’t work with autogenerated playlists on Google Play Music – so if you want to start “Thumbs up” – you would need to make a copy of that list and name it in a different way.

I can use Android Intent action to send the query to Google Play Music to look for a specific playlist. For the ease of use, I will specify the playlist in a variable so you could change this at will.

Action: android.media.action.MEDIA_PLAY_FROM_SEARCH
Cat: Default
<no Mime Type>
<no Data>
Extra: android.intent.extra.focus:vnd.android.cursor.item/playlist
Extra: query:%playlist
<No package>
<No class>
Target: Activity 

The intent will open the music app and start playing the selected playlist. To wrap things nicely, add 2 second wait time and “Go Home” action to return to the default screen.

Other Media Players

I don’t use Spotify or other players, but from what I have seen so far both methods (with small modifications) should be ok for Spotify and probably other players too! Let me know what works for you, and share your experiences in this Reddit thread.

Conclusion

It’s possible to start music with MiBand 4, I just struggle to understand why this action isn’t available with MiFit. Thankfully, now you can do it yourself in less than 5 minutes. You can also put custom music controls in your NavBar so you don’t have to open the app or pull down the notification to stop the playback. If you like the idea of that – here is the tutorial for you.

You can download the ready-made Tasker file via TaskerNet from this link.

Pocketables does not accept targeted advertising, phony guest posts, paid reviews, etc. Help us keep this way with support on Patreon!
Become a patron at Patreon!

Mat Zolnierczyk

I am passionate about technology, cycling, and art. This would explain why my bike has more computing power than your average office. I own notenoughtech.com and I write for xda-developers.com and pocketables.com NotEnoughTECH | Facebook | Twitter |YouTube |Instagram | Google+ |Donate |Patreon

Avatar of Mat Zolnierczyk