Pages

Saturday, April 14, 2018

The last two weeks were mostly spent refactoring / rewriting the remaining Music Service code that i had previously disabled. That includes the MediaSession, Android Auto Support, Audio Focus handler, On Queue Completion, Voice Commands, and Auto Pause/Play. The only thing remaining I believe is the auto volume adjust and the ability to handle multiple remote control presses. At this point it looks like a realistic release date of the first alpha should be in May. I am probably a week out from starting internal testing, which basically means i start deploying the app to all my test devices and actually use it as my main driver on my phone. Up until now i have still been using 2.2.x. I am not expecting that many bugs, but what I am expecting is a lot of things i just forgot to implement that are crucial to making GMMP usable.

3.0 working in Android Auto

Audio Focus

The new audio focus handling is mostly the same as 2.x. Google did add some new capabilities for oreo which I did add. When GMMP requests audio focus, sometimes something else has to keep focus for a bit while longer. In this case the request returns that the focus request was denied temporarily, but will let gmmp know when it can take focus. When this happens gmmp will wait for the go ahead and then start playback after the OS says it can take focus. I am not sure how useful this is, but I figured i'd mention it.

On Queue Completion

I made some minor changes when re-implementing this feature. Play Random Track was replaced with a simple Shuffle. It will load all your music into the queue and turn on shuffle. Another nice improvement is the music selected by on queue completion will now be preloaded when you are playing the last track in the queue. This will allow gapless and/or crossfade to work.

I had mentioned this in a previous post, but in 3.0 many of the options will be right in the UI instead of being hidden away in the general preferences. This should make it much easier to change options quickly. On most of the views, they will be in a "Customize" section of the 3 dot menu on the toolbar.

Before 3.0 is fully released I will most likely add a few more on queue completion options, but for now I think its good.

Improved Voice Commands

While testing voice searching in android auto, I had noticed it was sending unstructured voice command . An unstructured voice command is basically a voice search that you do not know what it is looking for (ie an album search, track search, artist search, etc). Now gmmp will run through a bunch of queries to try to find what the user is requesting to play. Previously in this situation it will only search the track name.

Auto Pause / Play

The auto pause / play functionality was simplified a bit. Since GMMP was first written for android 1.6, it was previously looking for a huge list of different events to determine whether to pause or auto resume. Now to keep it simple, GMMP basically just listens for a "NOISY" intent when playing over a wired connection, bluetooth, or speaker. This intent is broadcast in many situations like when you unplug your headset or receive a phone call, so it basically has everything covered. Another minor change is gmmp will only look for a2dp connections (this is what is used for playing music) instead of all BT connections in general.

I also added some new pause / play triggers which include:

HDMI plug/unplug

Phone Power plug/unplug

For each type of connection / audio routing there will be the option to do a smart play or an always play. Smart auto play will basically only automatically resume playback when GMMP was auto paused. This has always been my preferred behavior. I've always found it super annoying when a music player that i was not using at all decides to automatically start playing just because i plugged in my headphones.