I made an app which which launches with an Activity which is essentially a list of videos. When the user clicks on one of the options that video is streamed via HLS(Apple's http live streaming) in another Activity. Now when I press the back button, home button etc, the activity is not finished and the video plays in the background. All i want to do is whenever somebody navigates out of the app for whatever reason, i want to kill that activity. How can that be done.
code i use for hls streaming:
MediaPlayer m = new MediaPlayer();
try{
m.setDataSource("http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8");
m.prepare();
m.start();}
catch(Exception e){}
thanks, Jay
for killing an activity you can do
yourClassName.this.finish();
this.finish();
finish();
hope this helps