Android Question (SOLVED) Playing mp3 files from a folder

Xandoca

Active Member
Licensed User
Longtime User
Hi,

I want to build a music player that "plays" all mp3 files from a folder.
As all music player user can play, pause, next music etc.
I'm planning to build using:

activity - controls play, pause, next music buttons.
service 1 - It controls the current file running and manage next file and handle activity actions
service 2 - It plays the current file.

Is that a good approach?
Is anyone has some experience on that?

Tks.
 

Xandoca

Active Member
Licensed User
Longtime User
Thank you.
The main problem I see with only one service is:
If I make a function with "for each file in folder plays it" how can I control it when the user press Pause? How can I also pause the "For construction"?

Regards.
 
Upvote 0

Xandoca

Active Member
Licensed User
Longtime User
Erel,
I'm planning to use some variables to control the for construction. Is that the right way?

Tks.
 
Upvote 0

Xandoca

Active Member
Licensed User
Longtime User
Erel,

Other idea is to use timer_Tick function to do all control, what you think about it?

Tks.
 
Upvote 0

Xandoca

Active Member
Licensed User
Longtime User
That's amazing Klaus. Thank you very much.
I have to combine this event with events coming from UI.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…