Android Question Record Audio

Husam

Member
Licensed User
Hi all

library audio version 1.63 /b4a 7.30
i just trying to test recording audio from the complete example
but got this error
B4X:
--------- beginning of system
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Unexpected event (missing RaiseSynchronousEvents): audiorecorder_recordcomplete
Check the unfiltered logs for the full stack trace.
** Activity (main) Pause, UserClosed = false **
onActivityResult: wi is null
false
** Activity (main) Resume **
 

Husam

Member
Licensed User


Which example?

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
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…