UIQ Internet Radio
Yell Radio
Yell Radio (from the original name of the popular streaming SHOUTcast protocol, ICanYell) is an application capable of locating and listening to Internet radio stations. The example demonstrates the use of some APIs and good practices in application development for the UIQ platform, including:
- Separation of engine and user interface
- Use of HTTP framework
- Use of XML parser
- Audio output and volume control
- Typical UIQ user interface with multiple views, pages, dialogs, and controls
- Other aspects, such as localization and use of SVG application icon
Features include:
- Access to online directory of radio stations, with a search function
- List of favorite radio stations
The application consists of two parts: the UI-independent engine and the UIQ-based player. The engine is provided as a static library, and can be easily reused. The player provides front end to all functionality provided by the engine. The engine is further divided into directory and streaming parts. The player consists of playlist and playback views.
Directory
The www.shoutcast.com website serves as a central directory for all publicly broadcasted SHOUTcast radio stations. It responds to HTTP GET queries with XML documents.
CDirectory provides services for accessing SHOUTcast yellow pages.
MDirectoryClient receives data from the directory.
CStation contains information on a radio station retrieved from yellow pages, such as name, audio format, and bitrate.
CPlaylist contains list of URIs which can then be used to retrieve audio streams.
Application class using directory services implements MDirectoryClient interface, and issues requests to CDirectory instance. Supported requests include:
- Retrieval of full list of genres
- Search for stations by genre
- Search for stations by keyword
- Retrieval of playlist for a listed station
For each station found, the following information is available:
- Station name
- Stream type (MP3 or AAC+)
- Bitrate (affects quality and bandwidth)
- Current number of listeners
- Current track name
Station playlist is simply a list of servers (IP addresses and port numbers) hosted by the station. Multiple servers are often provided to expand listener capacity, and almost always stream the same content.
Streaming
SHOUTcast protocol was developed by Nullsoft, Inc. and is very HTTP-like. Unfortunately, it uses a custom HTTP header, preventing the use of the HTTP framework; therefore, RSocket API is used instead. Body part of the response is just raw MP3 or AAC+ data with some metadata embedded at regular intervals, containing e.g. artist and track names.
CStream represents audio stream being retrieved from a radio station.
MStreamClient receives meta-information on the stream being retrieved.
MStreamSink is the audio stream consumer interface.
CAudioSink directs audio stream to device speaker or headphones. It does not decode audio stream, but instead expects the corresponding codec to be present in the system.
User Interface
When the application starts, Playlist view is opened. Playlist view contains two tabs, Favorites and Directory. If there are stored favorite stations, Favorites tab is opened; otherwise Directory is displayed. The Directory provides access to the search function, which can perform search by genre and by keyword.

When a search is complete, the stations found are displayed in a list box. Highlighted list box item indicates number of listeners, audio format, and bitrate. The list is sorted by number of listeners in descending order, keeping popular stations on top. For a selected station, it is possible to add it to favorites, and to start listening.
On the Favorites tab, it is possible to start listening to a favorite station, import new entries from .pls files, remove, rename and edit existing entries (select servers to be used).
During playback, the following information is displayed: name of a radio station, artist, track, bitrate, and amount of traffic used. Controls are provided for playback and volume adjustment.
Building
Run the usual:
and
on both projects (the static library and the application), and then create a sis file using
You may need to make some changes to path names in the package file if you use other SDK version than the UIQ 3.0 SDK.
Changes in this version
Version 1.0 2008-04-30
First release.
Download:
YellRadio
You need to be a registered member of the UIQ Developer Community and logged in to be able to download this file.