javax.microedition.amms.control.tuner
Interface RDSControl

All Superinterfaces:
Control

public interface RDSControl
extends Control

RDSControl is an interface for accessing the Radio Data System for VHF/FM sound broadcasting (RDS) (BS EN 50067:1998) settings of a Player. RDSControl can also be used with Radio Broadcast Data System (RBDS) (U.S. RBDS Standard - April 1998), but RDS terminology is used in this API documentation.

See Also:
Control, Player, PlayerListener, TunerControl
Since:
BlackBerry API 5.0.0

Field Summary
static String RADIO_CHANGED
          Posted to PlayerListener when the tuning settings (usually the frequency) of a radio Player have been changed automatically for some reason.
static String RDS_NEW_ALARM
          Posted to PlayerListener when the Programme TYpe (PTY) field of a Player changes to "alarm".
static String RDS_NEW_DATA
          Posted to PlayerListener when new data is available via RDS on a Player.
 
Method Summary
 boolean getAutomaticSwitching()
          Gets the mode of the automatic switching of the transmitter in case of a stronger transmitter with the same PI presence.
 boolean getAutomaticTA()
          Gets the mode of the automatic switching of the program in case of the presence of Traffic Anouncement in another program.
 Date getCT()
          Gets the current Clock Time and date (CT).
 int[] getFreqsByPTY(short PTY)
          Gets the frequencies sending the given Programme TYpe.
 int[][] getFreqsByTA(boolean TA)
          Gets the frequencies sending Traffic Anouncements (TA).
 short getPI()
          Gets the current Programme Identification code.
 String getPS()
          Gets the current Programme Service name.
 String[] getPSByPTY(short PTY)
          Gets the Programme Service names (PS) sending the given Programme TYpe.
 String[] getPSByTA(boolean TA)
          Gets the Programme Service names (PS) sending Traffic Anouncements.
 short getPTY()
          Gets the current Programme TYpe as short.
 String getPTYString(boolean longer)
          Gets the current Programme TYpe as a String with the maximum of 8 or 16 characters in English.
 String getRT()
          Gets the current Radio Text.
 boolean getTA()
          Gets the current status of the Traffic Anouncement (TA) switch.
 boolean getTP()
          Gets the current status of the Traffic Programme (TP) switch.
 boolean isRDSSignal()
           
 void setAutomaticSwitching(boolean automatic)
          Sets the automatic switching of the transmitter in the case of a stronger transmitter with the same PI presence.
 void setAutomaticTA(boolean automatic)
          Sets the automatic switching of the program in case of the presence of Traffic Anouncement in another program.
 



Field Detail

RDS_NEW_DATA

static final String RDS_NEW_DATA
Posted to PlayerListener when new data is available via RDS on a Player. Typically, this happens within few seconds after tuning to a new channel or when some part of the RDS data, such as Radio Text, is changed. When this event is received, the eventData parameter will be a Short object that is the Programme Identification of the program where new data was received.

Value RDS_NEW_DATA is assigned to RDS_NEW_DATA.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

RDS_NEW_ALARM

static final String RDS_NEW_ALARM
Posted to PlayerListener when the Programme TYpe (PTY) field of a Player changes to "alarm". When this event is received, the eventData parameter will be a Short object that is the Programme Identification of the program where the alarm was switched on.

Value RDS_ALARM is assigned to RDS_NEW_ALARM.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

RADIO_CHANGED

static final String RADIO_CHANGED
Posted to PlayerListener when the tuning settings (usually the frequency) of a radio Player have been changed automatically for some reason. This typically happens when the radio has been ordered to change, based on RDS, the transmitter, for example, to get stronger signal when moving the location of the mobile device or when Traffic Announcement is on in an other program. When this event is received, the eventData parameter will be a Short object that is the Programme Identification of the new program.

Value radio_changed is assigned to RADIO_CHANGED.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0


Method Detail

isRDSSignal

boolean isRDSSignal()
Returns:

true if RDS signal can be recepted, false otherwise

Since:
BlackBerry API 5.0.0

getPS

String getPS()
Gets the current Programme Service name.

Returns:
name of the Programme Service or a zero-length String if unknown
Since:
BlackBerry API 5.0.0

getRT

String getRT()
Gets the current Radio Text.

Returns:
Radio Text or zero-length String if unknown
Since:
BlackBerry API 5.0.0

getPTY

short getPTY()
Gets the current Programme TYpe as short. The return value zero corresponds to No Programme Type or to undefined type.

Please note that PTYs in RBDS differ from the ones in RDS.

Returns:
Programme TYpe or zero for undefined type
Since:
BlackBerry API 5.0.0

getPTYString

String getPTYString(boolean longer)
Gets the current Programme TYpe as a String with the maximum of 8 or 16 characters in English.

Please note that PTYs in RBDS differ from the ones in RDS.

Parameters:
longer - @return Programme TYpe or "None" for an undefined typetrue for the maximum lenght of 16 characters, false for the maximum lenght of 8 characters
Since:
BlackBerry API 5.0.0

getPI

short getPI()
Gets the current Programme Identification code.

Returns:
Programme Identification code or zero for an undefined PI code
Since:
BlackBerry API 5.0.0

getFreqsByPTY

int[] getFreqsByPTY(short PTY)
Gets the frequencies sending the given Programme TYpe. Based on the EON (Enhanced Other Networks information) field. The alternate frequencies will not be returned.

Returns:
frequencies of programs in 100 Hertzs, or null if none are found or EON field is not supported.
Since:
BlackBerry API 5.0.0

getFreqsByTA

int[][] getFreqsByTA(boolean TA)
Gets the frequencies sending Traffic Anouncements (TA). Based on the EON field.

Parameters:
TA - @return matrix of Programmes * Alternative Frequencies in 100 Hertzs, or null if none is found or EON field is not supported.true to get TAs, false to get no TAs
Since:
BlackBerry API 5.0.0

getPSByPTY

String[] getPSByPTY(short PTY)
Gets the Programme Service names (PS) sending the given Programme TYpe. Based on the EON field.

Parameters:
PTY - @return Programme Service names, or null if none are found or EON field is not supported.the Programme TYpe of programmes whose Programme Service names to get
Since:
BlackBerry API 5.0.0

getPSByTA

String[] getPSByTA(boolean TA)
Gets the Programme Service names (PS) sending Traffic Anouncements. Based on the EON field.

Parameters:
TA - @return Programme Service names, or null if none are found or EON field is not supported.true to get TAs, false to get no TAs
Since:
BlackBerry API 5.0.0

getCT

Date getCT()
Gets the current Clock Time and date (CT).

Returns:
current time and date or null if unknown
Since:
BlackBerry API 5.0.0

getTA

boolean getTA()
Gets the current status of the Traffic Anouncement (TA) switch.

Returns:
true if TA is on, false otherwise
Since:
BlackBerry API 5.0.0

getTP

boolean getTP()
Gets the current status of the Traffic Programme (TP) switch.

Returns:
true if TP is on, false otherwise
Since:
BlackBerry API 5.0.0

setAutomaticSwitching

void setAutomaticSwitching(boolean automatic)
                           throws MediaException
Sets the automatic switching of the transmitter in the case of a stronger transmitter with the same PI presence. Based on AF and/or EON fields.

Parameters:
automatic - true to turn on the automatic switching, false to turn it off
Throws:
MediaException - if setting the given value is not supported
Since:
BlackBerry API 5.0.0

getAutomaticSwitching

boolean getAutomaticSwitching()
Gets the mode of the automatic switching of the transmitter in case of a stronger transmitter with the same PI presence.

Returns:
true if the automatic switching is on, false otherwise
Since:
BlackBerry API 5.0.0

setAutomaticTA

void setAutomaticTA(boolean automatic)
                    throws MediaException
Sets the automatic switching of the program in case of the presence of Traffic Anouncement in another program. Based on TP and TA fields.

Parameters:
automatic - true to turn on the automatic switching, false to turn it off
Throws:
MediaException - if setting the given value is not supported
Since:
BlackBerry API 5.0.0

getAutomaticTA

boolean getAutomaticTA()
Gets the mode of the automatic switching of the program in case of the presence of Traffic Anouncement in another program. Based on TP and TA fields.

Returns:
true if the automatic switching is on, false otherwise
Since:
BlackBerry API 5.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal