With this update of Volume Butler I took a look at the application as a whole and wondered how I can make it simpler but still just as smart. I am painfully aware that Volume Butler has a learning curve and that can discourage many people from understanding how useful automated volumes can be.
Since Volume Butler was written so long ago I knew that the code was in pretty bad shape. I started the app when I was doing .NET and finished it before I ever had my first paying job as an Android developer. So lots of the code looked like .NET, was buggy, had lots of duplication, and inconsistent as a result.
The fist step was to take a loot at Androids new RecyclerView. This is a tool that helps make lists of things run smoother and with less code. All of Volume Butler now runs on the Recycler View and it has made life SOOOO much easier. I was able to break apart the differences between features and keep all the common things to reduce my code by up to 40%. This will make finding and fixing bugs vastly easier and much quicker.
Some of the styling was out of date and inconsistent. This was altered using Android Styles and toning down how much navy blue the app was using. Also the cards were modified to use Androids CardView library with a slight modification adding the three dots in the bottom right corner. These dots provide some functionality that previously existed by long-pressing. Let’s be honest, long-pressing is bad. It’s bad because no one knows you can long-press and it turns into a guessing game. The three dots are great because its a consistent way to hint to the user, “Hey you can press this and something will happen.”
Next was the way I was doing database access. Volume Butlers database is pretty large for a mobile application. Lots of tablets, which inter-relate. For example if you delete a Profile and that profile belongs to a Schedule, Quick Schedule, and Location all of those must also be deleted. It’s complicated and tricky to make sure everything is working correctly. I broke out all my database methods into separate controllers which allowed for more compartmentalization. When this was done I could compare the way Schedules was doing database access in comparison to how profiles was doing database access. This simplified how the code was written and provided a more common way to do database access.
Next my app structure sucked. Looking at how I structured things I wonder what I was thinking. That all got refactored into a more logical order so finding and fixing this is faster.
Perhaps one of the most helpful things that came out of the 1.6.1 release is bug fixes. Going through each line of code and reviewing, refactoring, reordering, removing, and any other re<fill in the blank> helped me find lots of bugs. Several of which were pretty critical. I went out and bought a Samsung phone (For the record I despise their phones) so I could find all the bugs that are specific to Samsung. I found about 7 critical bugs that I could only reproduce on their phones. Kind of a joke.
The Android Support Library was also updated as was Google Play Services. This broke Maps, Locations, Activity Recognition, Wear, and a few other things. I recognize I was out of date a bit but that was a lot of work to just get current. Along with updating these Services I also added the Places API so you can search by address for the place you want to add a location too. This is fairly simple but I was lazy and didn’t see the effort worth the cost.
Future updates will include ways to bother people just enough to get them to buy the app. For such an advanced app that is so useful not a lot of people buy into it. Partly my fault for not marketing and for thinking people are smart. Since there is a learning curve it’s a hard sell. Weird that something that you’ll use every day for years and costs a few dollars is less important that a fast food hamburger that will be digested in a day or two.
I’m rambling, so happy update to Volume Butler 1.6.1.