tags:

views:

16

answers:

1

In my Project I want to play audio files in mediaplayer and displays progressbar. If I exit the application then also player have to play audio file. If I restart The Activity I have to display progress bar with last activity progress.

Here I tried using onSaveInstanceState() method. But I cant display progress bar with last progress. when I exit the activity player is playing but when I restart activity it stopped and displayed new view without any progress and saved data.

A: 

A media player is the common example of use of an Android Service. Your service should be in charge of playing the music and your Activity of showing the progress.

Macarse