Search code examples
androidandroid-music-player

Handel Strange Application flow - Android


I got in to strange problem with the flow of application.I am creating music Playing application, which have capability of background playing. And the problem I am having is,

  1. on application starts application loads all the songs from SD card.
  2. User starts the playing of song.
  3. Now he exit form the application.
  4. songs is still playing in the background.
  5. Now when he starts application again either from Notification bar or from the menu... all songs starts loading again Now that is the thing I don't want.

can any one suggest me how to handle this thing ?


Solution

  • Your notification intent must be identical to the launcher intent.

    See this answer: https://stackoverflow.com/a/5502950/377478