How to avoid session timeout in Android
<p>In my Android application am showing live video streaming using <code>LibVLC</code> library. To connect <strong>SSH</strong> server i have used <code>jsch</code> library.</p>

<p>When i run application, after session connection video runs properly. and when i minimize the app for 3-4 minutes, and resume again still video runs properly. But when i minimize the application for 10 or more minutes and on resume it shows <code>session timeout</code> message.</p>

<p><code>OnResume()</code> I tried to create session and <code>createPlayer()</code> but still not working .</p>

<p>I have tried by changing session connect time.</p>

<p>Is there is any way to avoid session timeout for long period like 30 minutes.</p>

<p>//** AFTER EDIT**//</p>

<p>I checked after <code>onResume()</code> session is still connected, and error log says <code>Connection reset by peer.</code> </p>

<p>What does that mean? Is ssh tunnel is closed? If yes, how to check ssh tunnel status? </p>

<p><strong>Error log:</strong></p>

<blockquote>
  <p>08-09 10:52:15.268 6529-21339/com.compdigitec.libvlcandroidsample E/VLC: live555 demux: Failed to connect with rtsp://localhost:8554/video.ts
  08-09 10:52:15.268 6529-21339/com.compdigitec.libvlcandroidsample D/VLC: core demux: no access_demux modules matched
  08-09 10:52:15.268 6529-21339/com.compdigitec.libvlcandroidsample D/VLC: core input: creating access 'rtsp' location='localhost:8554/video.ts', path='(null)'
  08-09 10:52:15.268 6529-21339/com.compdigitec.libvlcandroidsample D/VLC: core access: looking for access module matching "rtsp": 15 candidates
  08-09 10:52:15.268 6529-21339/com.compdigitec.libvlcandroidsample D/VLC: core access: net: connecting to localhost port 8554
  08-09 10:52:15.278 6529-21339/com.compdigitec.libvlcandroidsample D/VLC: core access: connection succeeded (socket = 36)
  08-09 10:52:35.823 6529-21339/com.compdigitec.libvlcandroidsample E/VLC: core access: read error: Connection reset by peer
  08-09 10:52:35.823 6529-21339/com.compdigitec.libvlcandroidsample D/VLC: access_realrtsp access: rtsp connected
  08-09 10:52:35.823 6529-21339/com.compdigitec.libvlcandroidsample W/VLC: access_realrtsp access: only real/helix rtsp servers supported for now
  08-09 10:52:35.823 6529-21339/com.compdigitec.libvlcandroidsample D/VLC: core access: no access modules matched
  08-09 10:52:35.823 6529-21339/com.compdigitec.libvlcandroidsample E/VLC: core input: open of rtsp://localhost:8554/video.ts' failed
  08-09 10:52:35.823 6529-21339/com.compdigitec.libvlcandroidsample E/VLC: core input: Your input can't be opened
  08-09 10:52:35.823 6529-21339/com.compdigitec.libvlcandroidsample E/VLC: core input: VLC is unable to open the MRL 'rtsp://localhost:8554/video.ts'</p>
</blockquote>