开发者

How to set maximum duration when recording audio in android using an intent

开发者 https://www.devze.com 2023-03-25 01:51 出处:网络
Hi i am recording audio in android using the following intent public void onClick (View arg0) { 开发者_如何学运维// TODO Auto-generated method stub

Hi i am recording audio in android using the following intent

public void onClick (View arg0) {
           开发者_如何学运维     // TODO Auto-generated method stub
               Intent intent =
                       new     Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);                 
               startActivityForResult(intent, RQS_RECORDING);
           }});
           }

i have tried set max duration but it doesn't work please help thank you


For video I know you can use intent.putExtra("android.intent.extra.durationLimit", 30000); (substituting 30000 for the length you need). I recommend giving this a try.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号