Android Question MediaPlayerStream Resume

cbanks

Active Member
Licensed User
Longtime User
What is the code to resume MediaPlayerStream audio? I don't mean just the stop and play, but a way to save where the user was and when they run the app to resume where they left off. Thanks.
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
This is the code I use.

B4X:
Private Sub btnPlayPause_Click
    If mp.IsPlaying Then
        mp.Pause
        btnPlayPause.Text = "paused"
        ShowStatus("Paused")
    Else
        mp.Play
        btnPlayPause.Text = "playing"
    End If
End Sub
 
Upvote 0

JakeBullet70

Well-Known Member
Licensed User
Longtime User
Probably because MediaPlayerStream get destroyed when you exit the app so it does not remember where it was at.
 
Upvote 0

cbanks

Active Member
Licensed User
Longtime User
Position doesn't seem to be an option for MediaPlayerStream. Is there a way to save where you left off and resume there next time you start the app when streaming audio?
 
Upvote 0
Top