tags:

views:

28

answers:

1

According to the documentation, http://developer.android.com/reference/android/media/MediaRecorder.html#setMaxDuration(int)

the recording stops when the timer expires.

By stop, do they mean it calls internally recorder.stop() and then restores the state the app was in before calling recorder.start()?

A: 

Hi,

This is handled by OpenCore internally, and the state of the recorder after reaching max duration is uninitialized, as it called stop(). You have setup the recorder again to use it further.

ognian
the problem is my application exits(the screen goes blank as soon the timer expires). That is not supposed to happen. It should gracefully stop recording and return to the preview state(the state it was in before I pressed record). is that possible?Also is it possible, to handle it myself as in in onInfoif (what == MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) { can I call my own function that calls recorder.stop() here?}
Namratha
I tried calling my own function as I mentioned but it crashed the same way as before
Namratha