To see the
audio file you recorded
(audiorecordtest.3gp
),
launch the
File Manager app and go to the Music folder.
This app is a remodularized version of
this
example
and the code snippet in the “common case”
here.
MainActivity.java
activity_main.xml
strings.xml
AndroidManifest.xml
uses-permission
RECORD_AUDIO
and
WRITE_EXTERNAL_STORAGE
.
build.gradle
(Module: app)
adb devices adb -s 192.168.57.101:5555 shell find / -type f -name audiorecordtest.3gp /mnt/shell/emulated/0/Music/audiorecordtest.3gp /data/media/0/Music/audiorecordtest.3gp adb -s 192.168.57.101:5555 pull /mnt/shell/emulated/0/Music/audiorecordtest.3gp 3027 KB/s (6656 bytes in 0.002s) ls -l audiorecordtest.3gp -rw-r--r-- 1 myname mygroup 6656 Aug 28 23:31 audiorecordtest.3gp file audiorecordtest.3gp audiorecordtest.3gp: ISO Media, MPEG v4 system, 3GPP
MediaPlayer.prepare
takes too long to call in the UI thread.
Instead,
call
prepareAsync
and use a
MediaPlayer.OnPreparedListener
as in
MediaPlayerService.
Why doesn’t class
MediaRecorder
have a
prepareAsync
method or a
MediaRecorder.OnPreparedListener
class?
EditText
,
maybe mounted in a
Dialog
.