Android Question MediaPlayer control in a B4XMainPage project.

Nando

Member
Licensed User
Longtime User
Hi, I using a MediaPlayer control in a B4XMainPage project.

When the application goes to the background everything works fine and I can still hear the audio but when I come back to the application, I have no more control over the MediaPlayer, for example I can't put it in pause anymore.

I need to declare the media differently, currently it is declared as:

B4X:
Sub Class_Globals
    Public MP As MediaPlayer
….

Private Sub B4XPage_Created (Root1 As B4XView)
    MP.Initialize2("MP")

Thank you in advance for any help
 
Top