I am using plugin in xamarin to play songs on iOS and Android device which is working out perfectly.My problem is that I am unable to find way to listen to next and previous button press in control centre.
I have read blog for reference,but it doesn't seem to provide enough info to achieve solution.
You can find the related information in its README.md.
Follow these steps:
Create a SampleApplication class inherit from UIApplication To implement
RemoteControlReceived(UIEvent)
as its sample code, like this:MediaManager.MediaRemoteControl.RemoteControlReceived(uiEvent)
helps you to handle the next/previous/pause/play events. To see how it works, you can refer here.Don't foget to add the SampleApplication to
UIApplication.Main()
in Main.cs like this: