To play audio in background mode I've used the method described here: https://www.b4x.com/android/forum/threads/background-playback.49337/
It works.
But when i'm outside the app I can rise up from bottom the panel that let me pause and play volume. It doesn't work, as if the app wasn't registered as the currently playing an audio. I used videoview to play the audio.
I've missed something or there's something more to add, perhaps something more in plistextra ?
This lnk may help: on "didTapPlayPause" from here https://www.raywenderlich.com/29948/backgrounding-for-ios
"Now all that’s remaining is for you to add the implementation of didTapPlayPause to get the play/pause button working. Add this new method at the bottom of TBFirstViewController.m, just above @end:
- (IBAction)didTapPlayPauseid)sender
{
self.btnPlayPause.selected = !self.btnPlayPause.selected;
if (self.btnPlayPause.selected)
{
[self.player play];
}
else
{
[self.player pause];
}
}
"
Thanks,
It works.
But when i'm outside the app I can rise up from bottom the panel that let me pause and play volume. It doesn't work, as if the app wasn't registered as the currently playing an audio. I used videoview to play the audio.
I've missed something or there's something more to add, perhaps something more in plistextra ?
This lnk may help: on "didTapPlayPause" from here https://www.raywenderlich.com/29948/backgrounding-for-ios
"Now all that’s remaining is for you to add the implementation of didTapPlayPause to get the play/pause button working. Add this new method at the bottom of TBFirstViewController.m, just above @end:
- (IBAction)didTapPlayPauseid)sender
{
self.btnPlayPause.selected = !self.btnPlayPause.selected;
if (self.btnPlayPause.selected)
{
[self.player play];
}
else
{
[self.player pause];
}
}
"
Thanks,
Last edited: