1

I am making an android application that would play live streams on android boxes. The box I have has android OS 2.3 and works fine with streams with urls like

http: // server /abc/abc/def.m3u8

but streams from clients that are like

rtsp: // server /abc/abc.stream

even though they play fine but any activity like going back to home screen crashes my application. I am unable to catch exception / error anywhere and it just asks to Force close/Wait.

Even ACRA does not help me with this.

Anyone who knows how to work around this or solve this or even convert urls with rtsp://xxxxxxx.yyyyy.stream extension to http://xxxxxxx.yyyy.m3u8, please help me.

Thank you very much in advance.

And oh! I am using VideoView for this purpose. The Mediaplayer with ssurface view did not help me with live streams.

If somebody knows for sure this problem won't occur in OS versions greater than 3.0, please support.

samreen
  • 209
  • 2
  • 6

1 Answers1

0

You need to respond to changes in the Activity lifecycle of your video by creating the respective methods and clearing up resources

protected void onPause(){//Clear up resources or pause video}
protected void onDestroy(){}
protected void onStop(){}

respond appropriately to these calls in your activity lifecycle. Sure it should help

Enoobong
  • 1,594
  • 2
  • 15
  • 25