How to regain the cached object in android for a music app

49 views Asked by At

Well this question of mine doesnt relate to any code especially, but what I wanted to ask is that How do I achieve something like

1: Play the music on my application.
2: Then press the home key on the device, whilst the music is been played.
3: Then again long press the home key n regain access to the object that was playing the file, which is a common user expectation, but what my player does is the 4th step.

4: Whilst continuing to play the previous file, it launches a whole new interface of the player , wherein the seekbar is at 0 the play button is in the idle mode. Hence leads to confusion. 
5: N if I touch the play button the player starts playing another file from the start along with the previous one, so now I have 2 files played by my player

How do I avoid this?

Is singleton that is necessary to be applied here? Plz guide me in some manner.

0

There are 0 answers