Android Question Video recording problem

Discussion in 'Android Questions' started by IslamQabel, May 24, 2015.

  1. IslamQabel

    IslamQabel Active Member Licensed User

    Hi All.....

    I used the example of video record application
    Code:
    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, 00100%x100%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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    This is how VideoRecordApp works. It sends an intent to the system that then starts the default video capture app.
     
  3. IslamQabel

    IslamQabel Active Member Licensed User

    is there any other solution to start recording ?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Search the libraries. If I remember correctly there is a library that allows you to capture video though I'm not sure how stable it.
     
  5. IslamQabel

    IslamQabel Active Member Licensed User

    i did not find it yet
     
  6. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice