playMaker

Author Topic: Help needed with microphone recording[SOLVED]  (Read 1269 times)

emildragan

  • Playmaker Newbie
  • *
  • Posts: 28
Help needed with microphone recording[SOLVED]
« on: April 13, 2020, 04:40:14 AM »
Hello,

I am creating an AR app with latest Vuforia and Unity 2019.1.14. At some point, after clicking on a UI button, I use the Microphone Start Recording action to record a voice for 10 seconds and then to play the sound. When I test the app in editor, it works very well.

The problem is when I build the app, on Android, when the app reaches that recording state, it's asking for permission to record, I click on Allow, but it's not firing the next action, it stays forever in that state, I cannot continue with the app. I want to mention that at the beginning of any AR app made with Vuforia, it already asks for permission.

I tried to use Microphone is Acces Granted and Request Camera and Microphone before that action of recording, but it's not working, still stays on the same state.
I think it's something that should be used in conjunction with that action. If someone encountered this issue, I would appreciate any help.

Thanks.
« Last Edit: April 17, 2020, 09:05:58 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Help needed with microphone recording
« Reply #1 on: April 14, 2020, 01:23:20 AM »
Hi,

you should use the custom action ( found on the Ecosystem):

MicrophoneIsAccessGranted

and always check that access is granted before commiting to recording.

Bye,

 Jean

emildragan

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Help needed with microphone recording
« Reply #2 on: April 14, 2020, 03:17:38 AM »
Thank you for your response, but as I said in the original post, I tried to use that Action, MicrophoneisAccessGranted before that action, but it's not asking for permission in that moment, nothing happens, it's asking for permission only when the recording starts and when I click on allow, does not continue.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Help needed with microphone recording
« Reply #3 on: April 15, 2020, 02:00:11 AM »
Hi,

yes, because you likely don't check continously, if you check only once, then it won't work. make for example a timer so that every seconds you check if you are allowed.

also, I think you can setup the build to ask for permission right at the start of the application the first time you open it, have you look into this?

Bye,

 Jean

emildragan

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Help needed with microphone recording
« Reply #4 on: April 15, 2020, 10:46:55 AM »
I fixed it by using the script for allowing access for microphone from Unity's website, it's runing on a gameobject when the application starts. I think this is what the action MicrophoneisAccessGranted was supposed to do, but for me didn t work or I didn t know how to set it up properly.

Thanks you.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Help needed with microphone recording
« Reply #5 on: April 17, 2020, 09:05:48 AM »
Hi,

 MicrophoneisAccessGranted only checks, it does not request access. So yes, it's good that you found a way to request access.

Bye,

 Jean