Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
stardomains
Posts: 104
Registered: ‎12-14-2009

FM Radio using TunerControl

[ Edited ]

As noted with 7.1 API http://supportforums.blackberry.com/t5/Java-Development/BlackBerry-Java-SDK-v7-1-Now-in-Beta/m-p/142...

 

FM Radio API is available and says "to manipulate FM tuner settings on BlackBerry smartphones with supporting hardware." I imagine they wouldn't says this if no java-running BlackBerry handsets didn't have the hardware to support FM Radio. 

 

I wanted to see if using Java microedition TunerControl that's been out since OS 5 would work: http://www.blackberry.com/developers/docs/5.0.0api/javax/microedition/amms/control/tuner/TunerContro...

 

I tested on my 9780 running OS 6.0 and others tested on 9900 running OS 7.0 and we couldn't get it to work. We all used headsets with wires too.

 

Would someone post which handsets support FM Radio, please?

 

Does anyone see any problems with my code?:

 

        int freqtext = Integer.parseInt(freqfield.getText());
try {
Player play = Manager.createPlayer("capture://radio");

play.realize();
TunerControl tunercnt = (TunerControl) play.getControl("TunerControl");
// play.prefetch();

tunercnt.setFrequency(freqtext, TunerControl.MODULATION_FM);
play.start();

} catch (MediaException me){
} catch (IOException ioe){
}

freqfield is where the user enters the FM frequency in 100 hertz.

Please use plain text.
BlackBerry Development Advisor
gbeukeboom
Posts: 1,837
Registered: ‎10-16-2009
My Carrier: Bell

Re: FM Radio using TunerControl

There have been no announcements to date about devices that include and support FM tuners. You will need to wait for more information to be released before any actual testing can commence.

 

Note that *only* devices running OS 7.1 or higher will allow programmatic access to the FM tuner (if equipped).

 

Be sure to watch the Developer Blog for more information on this as it gets released:

http://devblog.blackberry.com

 

Regards,

 

Garett Beukeboom
BlackBerry Development Advisor
Developer Zone
@garettbeukeboom

--
Think of a great new feature? Find a bug?
Log and track them using the Developer Issue Tracker
Please use plain text.