Just Playlists 4.4.0—More Fixes for Android 4.0/ICS

May 13th, 2012

I finally purchased a cell phone running Android 4.0/ICS and so have been able to run JP on it and not just the software emulator.  I found and fixed several problems:

  • Headset buttons were not working.
  • After loading one streaming source, the next one wouldn’t load.
  • Album art was too small for higher-resolution devices.

I’m hoping that I’ve fixed most the bugs so I can move on to some new features.  Time will tell!

Just Playlists 4.3.1—Fixed Missing Notification Text and Menu Button under Android 4.0/ICS

April 8th, 2012

I figured out how to fully emulate the Galaxy Nexus, which runs Android 4.0/ICS.  It turns out, the black text in JP’s notification bar disappeared in the new black notification bar background.  Also, the menu button is no longer supported under 4.0 in apps that are created for the new operating system.  I was able to adjust for both of these issues and JP now works as expected, with light text on the dark notification bar background and the legacy “triple dot” menu button presented.

Just Playlists 4.3.0—Updates for Android 4.0/ICS, URL Case Insensitivity

March 19th, 2012

Just Playlists was not functioning properly under the Android 4.0 (Ice Cream Sandwich) SDK emulator.  The main problem was that a StrictMode class had been added and is enabled by default.  This prevents doing network operations on the main program thread–which I do within JP.  This was throwing a NetworkOnMainThreadException.  I disabled StrictMode to get the program working.  I need to go back and do things properly within my threads, but I’m saving that for after JP is fully functional under ICS.

I also had a report that URLs starting with “HTTP” rather than “http” weren’t being recognized.  I fixed this.

Another person has reported the he cannot edit or create playlists on his Galaxy Nexus running ICS, even after this program update.  The emulator doesn’t show this, so until I get a phone running ICS, it will be hard to debug.  Another problem I had with the emulator is that there seems to be a missing shared library called “libwvm.so”, so that neither my program or the stock music player actually play music.  So I’m going on faith to some extent that JP is really working for the most part under ICS.

Just Playlists 4.2.2—Fixed Problem with Unexpected Program Exits

December 10th, 2011

I’ve found that JP has been unexpectedly stopping media playback and exiting for quite a while.  This would consistently occur after around a half-hour of run time.  It seemed to have started after an Android OS update in the past.  Examining the phone system log showed that the operating system was stopping the program, as if it didn’t know it was active and should be left to run.  The log message was flagged as  a “WIN DEATH” even.  I had thought I’d protected against this when I first created Just Playlists.  It turns out that–somewhere around Android version 2.1–programmers were being instructed to explicitly alert the OS that a running service shouldn’t be shut down as part of Android process management.  This is done via a  call to the startForeground() method.  When the service is in a state where shutdown is acceptable (such as not actively playing music), the stopForeground() method is to be called.  By adding these calls where appropriate within the code of Just Playlists, I have fixed the problem and JP no longer exits in this way.

I’ve also received reports from users that the program has been exiting when the screen is turned off on some devices.  The Archos Android tablet is one such device.  I am hoping that the change described above will also fix this problem.

As part of trying to work around this problem, I also added code to save track position every few seconds, such that if the program does crash or the OS shuts it down, the next time JP is run, the track that was playing should be ready to play again at the same position it was at before the shutdown.

Just Playlists 4.2.1—Play/Pause Headset Button Double-Click and Triple-Click

September 11th, 2011

A user has been waiting since January of this year for a promised update to JP that would use a double-click of the play/pause headset button to cause a next track action.  Thanks, Nicholas, for your patience.  I have implemented this.  I’ve also added a triple-click for doing a previous track action.  It sounds like this is a standard feature of other apps–including the stock Android music player.  It’s not something I was aware of, but it is a useful feature.

Just Playlists 4.2.0—Ogg Streaming, Use of Native Streaming Support, Bug Fixes

May 26th, 2011

I haven’t had time to add any new features to Just Playlists once again, but I have improved a few more things under the hood.  First, I was alerted by a couple users that I wasn’t allowing for non-MP3 streams, even when the codecs are supported on the phone.  I added stream types that I know of, chief amongst these being Ogg streams.  Even with this, Ogg streams don’t all play back reliably, though this may be an underlying Android problem.  Ogg streams also show a starting play time greater than 0:00.  I haven’t figured that one out yet, but it doesn’t really impact use.

Android versions 2.2 and greater offer native SHOUTcast streaming support.  Thus, I no longer massage the headers sent and received by the Android media service.  I don’t know if this will improve performance, but it should make it more likely not to be broken by future Android updates.  I also am no longer hard-coding my proxy server to port 8080–I let the device choose an unused port when the proxy is started.  And the media service no longer fails to start when a “Content-length” header isn’t received–it just issues a warning.  This means I don’t have to fake it out with a huge number.

Finally, I fixed some bugs, including a null pointer reference that was reported a few times via the Market.

The next new thing I want to add to JP is re-starting playback of a stream when it disconnects unexpectedly rather than just going on to the next stream listed in a playlist.  And, of course, I still have a huge number of new features to work on, as time allows.

Just Playlists 4.1.2—Update to Fix Problem Under Android Gingerbread Version 2.3.3, File Path

March 13th, 2011

Google made a change in the way the Android OS handles media streaming in version 2.3.3.  In past versions, the HTML “Transfer-Encoding: Chunked” header was accepted but chunked transfer coding was not actually implemented.  That allowed me to get around not having an explicit content length for streaming media, though I couldn’t chunk the data stream.  In 2.3.3, Android is handling the chunked coding.  I’ve thus adjusted JP/JPP accordingly.

A new user named Grant found a problem with JP relative to how other programs interpret relative file paths.  In Unix, if you specify a file path like “/here/there/everywhere,” it means this is an absolute file path that starts from the root of the partition.  But it turns out that most/all music programs Grant and I have tried also see at is a valid way to refer to a relative file path starting in the current working directory.  It’s equivalent to “./here/there/everywhere” and “here/there/everywhere.”  I’ve updated JP/JPP to work the same way.

I haven’t had time to implement any new features–including a few suggestions from those using the program.  I’ve moved and started a new job over the last couple months, which hasn’t left me much time for Android programming.  I’m getting settled in and will try to get some new features out in not-too-distant future.

Just Playlists 4.1.0—Progress Bar Fix for Tablets, Android 2.3 Support, Add Tracks to Playlists

December 18th, 2010

I had a chance to try JP on a Samsung Galaxy Tab and found that the progress bar wasn’t extending properly across the larger screen.  I fixed this, such that any screen size should work properly.  I’ve also built the program using the Android 2.3 (Gingerbread) SDK and run it within a 2.3 emulator without any problems.  I haven’t had a chance to try it on the new Nexus S with 2.3, but it should work just fine.

The only new feature in 4.1.0 is for JPP.  You can now select tracks from the “Create playlists” function of the app and then, when you use the “Edit playlists” function, you will be asked if you wish to insert these tracks into the playlist(s) being edited.  Thus, you can add tracks to existing playlists, rather than just being restricted to editing and combining playlists.

Just Playlists 4.0.0—Playlist Editing, Background Color Choices, Playlist Creation Directory Choice

November 14th, 2010

I’ve added playlist editing to Just Playlists Plus 4.0.0.  You can edit single playlists or select a number of playlists and edit them as a whole, to create new, aggregate playlists.  Once a playlist is in the editor, tracks can be selected, deleted, copied, and pasted in a number of ways.  I hope it’s fairly intuitive and can be learned quickly with a bit of experimentation.

One nice thing is that it’s pretty hard to lose your edits.  Once you’ve begun to make changes to a playlist, you can exit the editor and even close the program and, when you choose to edit playlists from the menu once more, you will be taken right back into your last editing session.  Until you explicitly save an edited playlist or exit the editor without saving, you’ll always be presented with the playlist that is currently being edited.

The one thing that can’t be done right now from the editor is adding new tracks.  I’ll see if I can come up with a good way to do it.  But by creating new playlists and editing them into existing playlists with the editor, it’s possible to accomplish the same thing.

For both Just Playlists Plus and Just Playlists, I’ve made the default background color a shade of charcoal.  I received quite a bit feedback saying that the old gray color wasn’t ideal.  You can still choose the gray background or several others from Preferences.

Another feature is that, from the playlist chooser, you can now use the menu to specify the current directory as where newly-created playlists should be stored.  In the past, new playlists were saved in the directory where a playlist had last been loaded from or in the root of the SD card, if none had ever been loaded.  This is only applicable to the “Create playlists” function.  When editing playlists, they will be saved in the directory from which the edit is started.

Another new feature is that a default playlist directory is now created when the program is first run.  It’s called “justplaylists/playlists.”  Along with this, a couple sample SHOUTcast streaming playlists are included.

Just Playlists 3.6.4—Last.fm Scrobbling, Streaming Improvements and Fixes, etc.

September 23rd, 2010

I’ve integrated Last.fm scrobbling support.  That means, if you install a program from the Android Market like Simple Last.fm Scrobbler (SLS), it will detect when Just Playlists starts and finishes songs that are on your phone and send this information to Last.fm to update your listening stats.  If you don’t have SLS installed, scrobbling won’t happen.   Also, streamed music isn’t scrobbled, at least for now.  Information about song titles and artists isn’t sent to JP in a consistent format with SHOUTcast streams, so it would be a bit problematic to scrobble the info.

Thanks to Eric and others, I’ve been able to improve streaming a bit–particularly for MP3’s hosted on a server and played by clicking on an M3U playlist file in a browser.  There were problems getting JP to work reliably while doing this.  I was able to make some changes to the program that made it work, at least in most cases.  I also learned about a really neat program called GNUmp3d.  It is a streaming server that can be installed under Linux or Windows and which indexes your music collection and lets you browse and play it via a web browser.  If you are using an Android phone with JP installed, you can click on a “Play” link and a hosted M3U file will be sent to the phone which JP can play.  The only problem I’ve found is that Android doesn’t always seem to stream VBR (variable bit rate) files all that well, so if your music collection is VBR, you might have to set GNUmp3d to dynamically transcode your files to CBR (constant bit rate) for reliable playback.  Other than that, it’s a great way to avoid copying files to your phone if you have a large music collection.

I made a few other small fixes and improvements behind the scenes.  The one that is most visible is making Windows Media files (.wma) visible during playlist creation.  If you have a phone or app with support for WMA playback, you can use JP to play WMA’s or a least create playlists for play by apps that support WMA.