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

Step-1
Add the following name space in your .CS file.
using Microsoft.Devices.Radio;
 
Step-2

  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