Music App Update
Well, I've continued working on my React Native music app and everything is going smooth. I already like using it much better than Amazon's iOS Music App for the simple reason it uses less memory.
Here's the thing about music apps on phones. They will be used a lot in the background. This means they need to be light on memory and CPU usage. These apps will also have to pause and restart later when a call comes in, the phone is disconnected from the car, bluetooth is shut off, etc. This means the app must keep running when put to sleep, and remember it's state well.
These requirements shouldn't be very hard, of course, because it's just playing music. It streams a binary file from a webserver to the MP3 subsystem. It listens for events. It has just a couple of screens. It shouldn't be hard. And yet, for Amazon Music, it is.
Amazon Music is always slow to load, even when nothing has changed on the server. Switching between screens is slow. Playing songs is slow. When I put the app into the background it will still play. But if that playing ever stops it becomes a prime target for the OS to kill it, because it uses a ton of memory.
Whenever I disconnect my iPhone from my car the playback will stop, as it should. When I plug it in again, even if it's only been 60 seconds, Amazon Music won't start playing again. I always find that the app was killed and I have to start it again. And then it never remembers what song it was in the middle of. Since I switched to my new app this has not happened once. While I don't have proof, I attribute this to the fact that I don't use much memory, so the app isn't killed by the OS and it responds to all of the connection/disconnection events as it should.
At the end of they day I'm not surprised by this. The app clearly isn't a priority for Amazon, and they continue to try to upsell me to their subscription service. I suspect that is the only part of the app that receives any attention.
What does surprise me, however, is that playing back music from my tiny hosted webserver is consistently faster than streaming from the massively engineered backend Amazon built, presumably running on AWS instances that are physically closer to me. Sometimes simple really is better. I'm getting more speed and less CPU and memory usage that something a giant company built. Plus, my app doesn't have to please millions of people, just me and my family. Focus is freeing.
Oh, and album art works now.