1

I have one service in my application.It send and receive the webservice request and response.When I received the particular response from the web service I need to stop the playing audio / video files (Media files are playing from another application).When I fininshed some process I need to resume that again.

Note:

In andoid device music player plays any music if any 2G call is coming that stoped the playing media files and then when 2G call is disconnected stoped media files are played.I need to do like this only.

Finder
  • 1,217
  • 5
  • 18
  • 46
  • 1
    And what did you try? Have you looked at Messenger, Broadcast Receivers? – RvdK Jul 02 '12 at 07:43
  • 1
    I got the answer from this post http://stackoverflow.com/questions/6577646/what-is-audio-focus-in-android-class-audiomanager – Finder Jul 05 '12 at 10:29

1 Answers1

0

Try using this :

mediaPlayerObject.pause(); //To pause
mediaPlayerObject.start(); //To play
RPB
  • 16,006
  • 16
  • 55
  • 79