简体   繁体   中英

autostart audio record in Android

I'm using an intent to start sound recording activity, but when the activity opens it doesn't start record. how can i autostart record? perhaps there are some extras to do it but i don't find nothing on internet and on android developers. here is my code

Intent intent=new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
context.startActivity(intent);

i know it can be done because i found an example where it work. but i don't manage to replicate it. Thanks in advance XD

You're starting another application to do your audio recording. It will start whenever that application wants it to. If you want to start immediately, use the AudioRecord API and implement the recording yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM