Hardeep
Hardeep

Reputation: 11

Background Music Player While Switching Between Activities in Android

I am making an music streaming application with music player in it. Now i want that users should be able to switch between activities while listening to music in the player. Also i would like to control and display info about the track being played in one activity.

I have tried implementing the MediaPlayer but is stops playing when i navigate to another activity. Any code example or pseudocode is welcome.

Thanks.

Upvotes: 1

Views: 1163

Answers (1)

Abhi
Abhi

Reputation: 9005

The best option for this is Service.., See this Tutorial.You can learn more Here about services

Upvotes: 3

Related Questions