function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vijay kumar kvijay kumar k 

Salesforce mobile app not reading microphone

Hello Everyone

I'm facing issue with salesforce mobile unable to accessing the mobile microphone.
My requirement is user should record the information and upload the files. For that I followed 2 ways.
1. Directly taking HTML input file accept audio.
2.Recording using js navigator.Means using this similar syntax navigator.mediaDevices.getUserMedia({audio:true,video:false});
I failed to get access the microphone and I tried almost 10-12 phones every where same problem.What is reason?Did I missing here?

And I can able to record using any mobile browser but not in our app.

My camera is accessing but not accesing the microphone.
Client is not ready to accept upload recoring files.He wants live record only.I'm madly strucking here.

Thanks in advance
vijay

 
SwethaSwetha (Salesforce Developers) 
HI Vijay,
Have you been able to fix the issue?  It is likely an issue with the settings of the Salesforce mobile app. If the Salesforce mobile app doesn’t have access to the microphone, audio will not be sent to the Assistant service. 
 
To fix the problem, open your mobile phone’s settings and ensure that microphone access is enabled for the Salesforce app.
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.
 
Thank you
vijay kumar kvijay kumar k
Hi Swetha

Thank you for the reply.

Yeah, Me and my team all are enabled all the access permission for mobile app , but no use. Michro Phone not detecting any where.

Can you please test in you device, use any media syntax to get microphone,we are following navigator.mediaDevices.getUserMedia({audio:true,video:false}); .

If you able to record something successfully, please share steps with us, this is very needful.

Thanks
SwethaSwetha (Salesforce Developers) 
HI Vijay,
Recording audio+video appears to be working with IOS and does not work with Android as per the below idea Posted. Would you be able to verify?

Record video & audio on the Salesforce Mobile App running on an Android device (https://success.salesforce.com/ideaView?id=0873A0000015DJhQAM)

Please consider upvoting this idea so that Product team can implement this idea in coming releases.

Explanation:
The getUserMedia() method is only available in secure contexts. A secure context is one the browser is reasonably confident contains a document which was loaded securely, using HTTPS/TLS, and has limited exposure to insecure contexts. It appears that navigator.mediaDevices is not recommended to use. However, it is working as expected in Browser devices.
See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mediaDevices

This issue is basically related to webview , so we may have to wait for Google to provide a fix on it.  https://github.com/webrtc/samples/issues/1222

Also see,  https://success.salesforce.com/ideaView?id=0873A000000CLRbQAO. The workaround would be to use Mobile browser for time-being.
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.
Thank you