Nothing happened if click the "Start No Prepare" ! Does anyone know why mnuPrepare_Click and mnuStart_Click can't be combined in Sub StartNoPrepare?
And it can't click Prepare twice, is there any function of is_prepare ?
B4X:
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
AR.Initialize()
End If
Activity.AddMenuItem("Prepare","mnuPrepare")
Activity.AddMenuItem("Start","mnuStart")
Activity.AddMenuItem("Stop","mnuStop")
Activity.AddMenuItem("isRecording","mnuisRecording")
Activity.AddMenuItem("Start No Prepare","StartNoPrepare")
ToastMessageShow("Press on Menu button...", True)
End Sub
Sub StartNoPrepare
mnuPrepare_Click
mnuStart_Click
End Sub
Sub mnuStart_Click
ToastMessageShow("Recording started.",False)
AR.Start
End Sub
Sub mnuStop_Click
ToastMessageShow("Recording stopped.",False)
AR.Stop
End Sub
Sub mnuPrepare_Click
ToastMessageShow("Preparing the AudioRecorder.",False)
AR.AudioSource = AR.AS_MIC
AR.OutputFormat = AR.OF_THREE_GPP
AR.AudioEncoder = AR.AE_AMR_NB
AR.setOutputFile(File.DirRootExternal,"myRecording.wav")
AR.prepare()
ToastMessageShow("AudioRecorder is ready to record.",False)
End Sub
Sub mnuisRecording_Click
ToastMessageShow(AR.isRecording,False)
End Sub
And it can't click Prepare twice, is there any function of is_prepare ?
Attachments
Last edited: