First Back button press not caught when playing a video android

后端 未结 2 1014
北荒
北荒 2021-01-24 14:07

I have a weird error that I cant figure out how to fix . I have a video player - a simple videoview that plays a video. Now I ve implemented logic so that when the user presses

相关标签:
2条回答
  • 2021-01-24 14:36

    Thanks to @Satya got the answer(Commonsware) at Android back button and MediaController . Basically override dispatchKeyEvent to catch the back button press. @Satya - post your comment as an answer so I can mark it correct, marking this correct until then

    0 讨论(0)
  • 2021-01-24 14:40

    Are you using MediaController for video user interaction? I hade something similar and in the end it turned out that the MediaController was catching the first user input even so it was hidden.

    0 讨论(0)
提交回复
热议问题