Android Question how to stop background playing of video

Discussion in 'Android Questions' started by surfer, May 1, 2015.

  1. surfer

    surfer Member Licensed User

    I need help.

    I build an app with 2 activities:
    1-st activity contains ListVew1 with list of Youtube videos names.
    2-nd activity contains WebView.
    And when I touch an item in ListView I start second activity and show in Webview HTML page with <iframe> code embedding corresponding video.

    I start the video and in it’s middle I press BACK key. So I return to the list in the first activity. But I still hear some time the video playing in background. And that is the reason of rejecting this application by Google Play.

    My question: How can I prevent the background playing of the video immediately after pressing BACK key?
    Please help.
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can load a different url in Activity_Pause.
  3. surfer

    surfer Member Licensed User

    It works.
    Thank you very much
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice