Sunday, November 19, 2017

3.0 Work in Progress 11: Bookmarks, Chrome OS, and Permissions

I recently picked up one of the new Google Pixelbooks and I will say it a pretty awesome development device.  It runs Chrome OS, Android, and Linux all at the same time and has pretty good specs (i5 cpu, 8 gb ram, 128 gb ssd) for running Android Studio.  I am able to code and deploy GMMP right on the same device which makes development really convenient when not at home.   Android apps also run in their own window which can be resized which makes UI testing on different size screens super easy.

Ignore the artifacts around the window containing GMMP.  It is a side effect of taking a screenshot i guess (it appears fine on the device)
In order to support the free form resizing of the app window, I updated the target SDK level to 27 (android 8.1).  GMMP 2.x was still on 21 (android 5.0).  The target SDK update should see some performance improvement in newer devices (although i do not know by how much).  I also added support for the android permission system they added back in 5.1.  GMMP should only ask for storage permission and possibly phone state permission (if you want to use the auto resume after a phone call finishes feature).


Anyway, the main focus of WIP 11 is bookmarks.  In the process of refactoring / rewriting the MusicService, I rewrote the Bookmarker and added a UI to show existing bookmarks.  All of the previous work I spent on creating common, reusable UI components is really paying off.  Adding a functional bookmark list UI only took roughly 15 to 30 minutes.  Similarly the Artist and Genre details UIs I showed in WIP 10 took about the same amount of time.  Since its so quick to add these UIs, I can see myself adding a bunch of optional views for some other fields like year or composer (and making 2 separate UIs for artist / album artist if the user wants to have both easily accessible)


The bookmark list will show all the currently bookmarked tracks and let you play them directly from the list (or delete them).  Like every other view i've shown in 3.0 so far, the metadata will be customizable.  For this post I just had the list items show song name and bookmarked time.  For the video below I set it up to just auto bookmark everything, but the previous bookmark settings will still be there in 3.0 (auto bookmark based of song length, m4b extension, or by folder). The video will show the song auto bookmarking when changing tracks, and then resuming at the same position when returning to the song.  It also shows the manual bookmarking and unbookmarking of the currently playing song.


My focus next will be creating a folder UI.  The folder UI is a bit more complex than the other UIs (besides maybe now playing) so I imagine its going to take awhile

Sunday, November 5, 2017

3.0 Work in Progress 10: Multiple Artists and Genres Per Track

In the last few weeks I've been mostly doing backend work so there arent too many UI changes to show off.  The music service refactor / rewrite has caused me to rewrite a few of the other backend systems (and there will probably be a bunch more that need it to).  Since I was already making so many changes to the data access layer, I decided now would be the best time to basically clean up the whole data model and make the necessary changes to support some of the highest requested features like supporting multiple artists and multiple genres.  These changes led me to rewrite the scanner entirely (I had to do it anyway due to the data access layer changes).  Now the scanner will recognize artists and genres that are delimited by a specific character (";" by default) and set them up in the database accordingly.  Since fields with the ";" in it are a bit ugly.. i do plan on adding some functionality to replace that with "and" or "&" or really whatever phrase you want when displaying the song in now playing / notifications / etc.  That hasnt been implemented yet so these screenshots will show the delimiter. 

In order to show this in app, I quickly coded up a artist and genre details UI.  The plan is to show some sort of artist / genre image at the top similar to the album details view.  Right now its just a solid color background.

Properties of the test file with multiple artists and genres
Song in app






As you might have guessed, there wont be an alpha version ready to test anytime this year.  My first child is expected to be born in a few weeks so it is unclear how much dev time I will be getting in the near future, but I will try my best to continue the WIP posts and get something testable in the early 2018 time frame (hopefully)