0

I am trying to capture audio from the app.

I use:

Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
startActivityForResult(intent, Constants.RESULT_UPLOAD_AUDIO);

As soon as I click the capture audio button, I am returned back to the app in onActivityResult(int requestCode, int resultCode, Intent data), where data is null.

It works fine for video:

Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
startActivityForResult(intent,Constants.RESULT_UPLOAD_VIDEO);
FHan
  • 528
  • 2
  • 7
  • 18

1 Answers1

0

I was facing the similar problem. I did the following as a work around and it works perfectly fine:

Invoking audio recorder and getting the resulting file

Hope this helps.

Community
  • 1
  • 1
S.A.Norton Stanley
  • 1,833
  • 3
  • 23
  • 37