Android Question Video recording problem

IslamQabel

Active Member
Licensed User
Hi All.....

I used the example of video record application
B4X:
Sub Process_Globals
    Dim audioRecorder As AudioRecordApp
    Dim videoRecorder As VideoRecordApp
End Sub

Sub Globals
    Dim vv As VideoView
End Sub

Sub Activity_Create(FirstTime As Boolean)
   If FirstTime Then
           audioRecorder.Initialize("audioRecorder")
        videoRecorder.Initialize("videoRecorder")
    End If
    vv.Initialize("vv")
    Activity.AddView(vv, 0, 0, 100%x, 100%y)
    Activity.AddMenuItem("Record Video", "RecordVideo")
    Activity.AddMenuItem("Record Audio", "RecordAudio")
    ToastMessageShow("Press on Menu button...", True)
End Sub

Sub RecordVideo_Click
    videoRecorder.Record(File.DirRootExternal, "1.mp4")
End Sub
Sub RecordAudio_Click
    audioRecorder.Record(File.DirRootExternal, "1.3gpp")
End Sub
Sub videoRecorder_RecordComplete (Success As Boolean)
    Log(Success)
    If Success Then
        vv.LoadVideo(File.DirRootExternal, "1.mp4")
        vv.Play
    End If
End Sub
Sub audioRecorder_RecordComplete (Success As Boolean)
    Log(Success)
    If Success Then
        vv.LoadVideo(File.DirRootExternal, "1.3gpp")
        vv.Play
    End If
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

but i noticed the following:

1) After i press menu button...video record ..the default application video opens and i have to press on record to record...............I want to start/Stop record by simple click button by this application not by the default application on my mobile
2) After stop recording, a video view appears...but the video still unsaved...and i see two buttons "SAVE" and "DISCARD"......so why the video is not saved automatically after stop recording?
thanks
 
Top