|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.amms.control.fmradio.FmRadioLocale
public class FmRadioLocale
Represents the regional characteristics of FM radio reception. These
characteristics optimize radio signal reception based for the region.
This class configures the frequency band and frequency step parameters of
FmTunerControl.seek()
.
Differences can be observed in the following parameters of the implementation:
The locale is set by the BlackBerry device and the API can only be
used to update the UI properly or set seek parameters according to the set locale.
Use the FmTunerControl.getLocale()
method to retrieve an FmRadioLocale
object that you can use to
fine configure your application according to the regional settings.
FmTunerControl
Field Summary | ||
---|---|---|
static int |
BAND_CCIR
FM band outside of Japan (87.5-108MHz) |
|
static int |
BAND_JAPAN
FM band in Japan (76-90MHz). |
|
static int |
EMPHASIS_50_US
FM Emphasis used outside of North America |
|
static int |
EMPHASIS_75_US
FM Emphasis used in North America |
|
static FmRadioLocale |
LOCALE_AMERICA
FM Locale for North America. |
|
static FmRadioLocale |
LOCALE_JAPAN
FM Locale for Japan. |
|
static FmRadioLocale |
LOCALE_OTHERS
FM Locale for other countries. |
|
static FmRadioLocale |
LOCALE_OTHERS_STEP_50
FM Locale for other countries using a frequency step of 50kHz like Italy and Thailand. |
|
static int |
STEP_100_KHZ
FM step used mostly in the rest of the world outside of North America |
|
static int |
STEP_200_KHZ
FM step used in North America |
|
static int |
STEP_50_KHZ
FM step |
Constructor Summary | ||
---|---|---|
FmRadioLocale(int band,
int maxFreq,
int minFreq,
int step,
boolean isEvenOffset,
int emphasis)
Constructor. |
Method Summary | ||
---|---|---|
int |
clampFrequency(int freq)
Clamps the specified frequency into this locale's valid range. |
|
boolean |
equals(Object obj)
Indicates whether two FmRadioLocale objects are equal by
checking their FM data (band, minFreq, maxFreq, step, offset, and emphasis). |
|
int |
getBand()
Gets the FM band. |
|
int |
getEmphasis()
Gets the FM emphasis. |
|
int |
getFrequencyDigitsAfterDecimal()
Checks the FM step size to be 50kHz. |
|
int |
getMaxFreq()
Gets the maximum frequency for this locale. |
|
int |
getMinFreq()
Gets the minimum frequency for this locale. |
|
static FmRadioLocale[] |
getPredefined()
Gets a list of predefined FmRadioLocale objects. |
|
int |
getStep()
Gets the FM step. |
|
static int[] |
getValidEmphases()
Gets a list of valid FM emphasis. |
|
static int[] |
getValidSteps()
Gets a list of valid FM steps. |
|
int |
hashCode()
Creates a unique hashcode for this object. |
|
boolean |
isEvenOffset()
Gets the FM offset. |
|
boolean |
isFrequencyInRange(int freq)
Indicates whether the frequency is valid in the range defined for the locale. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BAND_CCIR
public static final int BAND_JAPAN
public static final int STEP_200_KHZ
public static final int STEP_100_KHZ
public static final int STEP_50_KHZ
public static final int EMPHASIS_75_US
public static final int EMPHASIS_50_US
public static final FmRadioLocale LOCALE_JAPAN
equals()
method to determine whether the set locale is Japan.
public static final FmRadioLocale LOCALE_AMERICA
equals()
method to determine whether the set locale is North America.
public static final FmRadioLocale LOCALE_OTHERS
equals()
method to determine whether the set
locale is outside of Japan and North America.
public static final FmRadioLocale LOCALE_OTHERS_STEP_50
equals()
method to determine whether the set
locale is outside of Japan and North America.
Constructor Detail |
---|
public FmRadioLocale(int band, int maxFreq, int minFreq, int step, boolean isEvenOffset, int emphasis)
band
- The FM band to be set.maxFreq
- The upper frequency band-limit of the locale in 100Hz.minFreq
- The lower frequency band-limit of the locale in 100Hz.step
- The FM step to be set.isEvenOffset
- true
even offset; false odd offset.emphasis
- The FM emphasis to be set.
IllegalArgumentException
- If the band is not either BAND_JAPAN or BAND_CCIR; If the step is not STEP_200_KHZ or STEP_100_KHZ or STEP_50_KHZ; If the emphasis is not EMPHASIS_75_US or EMPHASIS_50_USMethod Detail |
---|
public int getStep()
STEP_200_KHZ
or STEP_100_KHZ
or STEP_50_KHZ
constants defined in this class.public int getFrequencyDigitsAfterDecimal()
STEP_50_KHZ
, 1, otherwise.public boolean isEvenOffset()
true
if the offset is even; false
otherwise.public int getEmphasis()
EMPHASIS_75_US
or EMPHASIS_50_US
constants defined in this class.public int getBand()
BAND_JAPAN
or BAND_CCIR
constants defined in this class.public boolean equals(Object obj)
FmRadioLocale
objects are equal by
checking their FM data (band, minFreq, maxFreq, step, offset, and emphasis).
equals
in class Object
obj
- An FMRadioLocale
object.
true
if the two locale objects have the same FM data; false
otherwise.Boolean.hashCode()
,
Hashtable
public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
Hashtable
public static FmRadioLocale[] getPredefined()
FmRadioLocale
objects.
LOCALE_
constants defined in this class.public static int[] getValidSteps()
STEP_
constants defined in this class.public static int[] getValidEmphases()
EMPHASIS_
constants defined in this class.public int getMinFreq()
public int getMaxFreq()
public boolean isFrequencyInRange(int freq)
frequency
- The desired frequency.
true
if the frequency is valid in the locale's range; false
otherwise.public int clampFrequency(int freq)
frequency
- The desired frequency.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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