MPD Client for Tizen, Gear S2

This native Tizen application implements a traditional MPD client functionality that was built for Tizen Gear S2 devices. We tried to use the same code for Gear S, but unfortunately Native API is not available for this model yet. You can install the MPD Client to your Gear S2 device using Gear App running on your smartphone.

Few Quick Notes about MPD Server

We’ve tested it with MPD server’s versions 0.16.7 and higer and it worked well. Playlists must be created on your MPD servers, because that’s the only objects that the client can select an play.

I’ve found playlists very useful for selecting and playing my favorite Internet radio stations along with MP3 stored on a hard drive of my MPD server.

Here is how a typical radio station playlist looks like:

# more /var/lib/mpd/playlists/RadioKievLounge.m3u
http://cast.loungefm.com.ua/loungefm

As you can see from the example above, all you need to create a radio station playlist is a URL of the station’s stream. In the case of a more traditional playlist with songs stored on a hard drive you would need something like this:

# more /var/lib/mpd/playlists/Queen.m3u
mp3/Queens/Queen – Body Language.mp3
mp3/Queens/Queen – Bohemian Rapsody.mp3
mp3/Queens/Queen – Bohemian Rhapsody.mp3
mp3/Queens/Queen – Crazy Little Thing Called Love .mp3
mp3/Queens/Queen – I Want To Break Free.mp3
mp3/Queens/Queen – I Want to Ride My Bicycle.mp3

The path to an MP3 file is relative to a root MP3 folder, which needs to be provided in your MPD config file, e.g. here is mine for a server running in Linux environment on Raspberry PI:

music_directory     “/var/lib/mpd/music”
playlist_directory      “/var/lib/mpd/playlists”
# User under which MPD daemonn runs
user                “mpd”
# For network
bind_to_address     “0.0.0.0”
# An example of an ALSA output for Linux:
audio_output {
type        “alsa”
name        “My ALSA Device”
device      “hw:0,0”    # optional
#   format      “44100:16:2”    # optional
mixer_type      “hardware”      # optional
mixer_device    “default”   # optional
mixer_control   “PCM”       # optional
mixer_index “0”     # optional
}

# An example of output for Windows
#audio_output {
#  type “winmm”
#  name “Speakers”
#  device “Speakers (Realtek High Definition Audio)”
#}
# You can also try “libao” instead of “winmm” on Windows

# An example of output for Mac
#audio_output {
#       type            “osx”
#        type            “ao”
#        name            “My Mac Device”
#        mixer_type      “software”
#}

The config file can be provided as a parameter when you run your MPD server, e.g.

#mpd ~/.mpd/conf

On Linux environment there is a default location for the config file – /etc/mpd.conf

Using MPD Client

After you’ve configured your MPD server and installed MPD Client to your Gear S2 device running the client is simple. The first thing that you need to do is to connect Gear S2 through WiFi to the same  network where your MPD server runs. After that you’ll need to provide the IP address and port of your MPD server:

mpd-settings

The default MPD’s port is 6600, so you should use this one if didn’t change it in MPD’s config. There are some additional and self-explanatory parameters on this screen. If you find difficult toggling the check boxes, just click on the containing rectangle to get a bigger view:

settings-zoom

 

After you’ve entered a correct IP and port, press OK button on the bottom and you’ll be taken to the next page with all playlists created on your server:

mpd-pl

Now you can select your favorite playlist and start listening to it. If you tap the speaker button the previously selected playlist will be played.

mpd-player-pink

You can navigate to the next/previous song in the list by tapping the buttons on the screen, or you can navigate between playlists by rotating the bezel.

To zoom the player’s view simply tap the rectangle with the song info:

player-zoom-queen

You can still navigate between songs in the playlist by swiping the title left or right or you can toggle a current playlist by rotating the bezel.

“Back” button functionality is available and can be always used to go to the previous page. Connection icon included to all screens is used to indicate if a connection with MPD server is alive.

Leave a Reply

Your email address will not be published. Required fields are marked *