Background Services in Mono for Android: Listing 1
The MusicService class.
- By Greg Shackles
public class MusicService : Service
public const string PlayCommand = "Play";
public const string StopCommand = "Stop";
public const string CommandExtraName = "Command";
private const int MusicPlayingNotification = 1;
private MediaPlayer _player;
public override IBinder OnBind(Intent intent)
Greg Shackles is a Senior Software Engineer at OLO Online Ordering, based in New York City. His book, Mobile Development with C# (O'Reilly), covers how to get started building iOS, Android and Windows Phone apps with C#. As an active member of the community, Greg speaks regularly at many user groups and developer events. Outside of technology, Greg is obsessed with heavy metal, baseball, and craft beer, sometimes in combination, as well as an aspiring homebrewer. You can find him online on his blog, gregshackles.com, or on Twitter: @gshackles.