Android Tutorial MediaPlayer tutorial

AscySoft

Active Member
Licensed User
Longtime User
a little bit closer..

You can try to create the fading effect by changing the volume. Did you try to use two media player objects?

Thanks for the tip, I was thinking to go in this direction, but is good that you point it out for me, because I was AFRAID not to spend too much time in a direction that could bring nothing.
So, I should create another service module to start a separate song, or should I use another mediaplayer on the same service module?
My instinct say that I should go with the same service. Is it OK? What's your opinion? Which is better (programming/resources etc)?
 

Vabzboy

Member
Licensed User
Longtime User
Hey Erel,

Is there any way to automatically update the Position Seekbar and Label according to audio file being played.
 

seniorbot

New Member
Licensed User
Longtime User
Media Player has no sound on AVD

When using Media Player why sometimes simulator has no sound? Real device connected like phone or tablet don't have the problem. Thanks.
 

jeeradate

Member
Licensed User
Longtime User
How to stop the MediaPlayer during the phone call?

If it is possible to stop MediaPlayer during the phone call and resume the play after the phone call is end.

Would you please be so kind and advise?

Thank you in advance.

Best regards,
Jeeradate K.
 
Last edited:

jeeradate

Member
Licensed User
Longtime User
Yes, it is possible. I'm not at home, but I can recall that I was using Phone library, listening to a parameter (a flag)
I create this and test it with real phone/device, and yes is possible 100% sure.

Thank you for the good news.

I try to look in Phone library but could not find it.
Would you please advise?

Best regards,
Jeeradate K.
 

AscySoft

Active Member
Licensed User
Longtime User

jeeradate

Member
Licensed User
Longtime User

cramcha

Member
Licensed User
Longtime User
continuous playback from list

:sign0013::BangHead:
Hi all. This is my first post.
I have a little problem with this code and I hope someone can have some solution:

This is a summary of the code...

For h = 0 To lstRepro.Size-1
MP.Load(fullpath, lstRepro.Get(h))
MP.Play
Log(h)
Next


I expected continuous playback of files from the list (lstRepro), but it's not.
Log prints the entire list, but mediaplayer only loads the first file.

I have not found anything about this issue yet. Thanks to all
:sign0085:
 

klaus

Expert
Licensed User
Longtime User
You should use something like this:
B4X:
Index = 0
MP.Load(fullpath, lstRepro.Get(Index))
MP.Play



Sub MP_Complete
    Index = Index + 1
    If Index = lstRepro.Size Then
        Index = 0
    End If
    MP.Load(fullpath, lstRepro.Get(Index))
    MP.Play
End Sub
 

Pelican104

New Member
Licensed User
Longtime User
MediaPlayer GetAudioSessionID

Anyone know how I can retrieve a media players session ID?

Thanks
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…