Thursday, June 6, 2013

How to use FM Radio API in Windows Phone

In this post I am going to show you how to use FM Radio API in Windows Phone.

The Microsoft.Devices.Radio namespace contains the FMRadio API

Add the following name space in your .CS file.
using Microsoft.Devices.Radio;

  1: // create an instance of the FMRadio class.
  2: FMRadio oRadio = FMRadio.Instance;
  3: // Turn the radio on.
  4: oRadio.PowerMode = RadioPowerMode.On;
  5: // set the region. 
  6: oRadio.CurrentRegion = RadioRegion.UnitedStates;
  7: // set the frequency.
  8: oRadio.Frequency = 94.9;

Download Source code here


Happy Coding


Sarah Taylor said...

Thanks for posting easy steps for using FM radio API in windows phone.though window phone are not being admired by application development

shubham said...

Can you explain i have Two button one forward and second previous, so how to app search for frequency less then current frequency on previous button click and s watch for frequency greater then current frequency on forward button click, how to implement that please explain