Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microphone permission

When installing the app I programmed, it requires the permission "to use the microphone". I don't however specifically ask for it in the manifest, what I have is the camera permission.

Is that where the microphone-permission is coming from?

like image 522
deimos1988 Avatar asked Jul 18 '14 05:07

deimos1988


People also ask

How do I fix my microphone permissions?

Microphone Privacy SettingsGo to Start → Settings → Privacy → Microphone. Click Change to enable microphone access for the device in use. Under “Allow apps to access your microphone”, switch the toggle to the right to allow applications to use the microphone.


3 Answers

<uses-permission android:name="android.permission.RECORD_AUDIO" />

outside the application block actually solved it!

...
    </application>


    <uses-permission android:name="android.permission.RECORD_AUDIO" /> 
</manifest>
like image 180
Nithinlal Avatar answered Oct 18 '22 07:10

Nithinlal


If you are using any kind of audio recording functionality in your application then you are supposed to provide RECORD_AUDIO permission in your manifest file as below:

 <uses-permission android:name="android.permission.RECORD_AUDIO" />
like image 38
GrIsHu Avatar answered Oct 18 '22 09:10

GrIsHu


in your manifest use this

 <uses-permission android:name="android.permission.RECORD_AUDIO" />

Then to request the permission do this:

if (ContextCompat.checkSelfPermission(getActivity(),
    Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) {

ActivityCompat.requestPermissions(getActivity(),
        new String[]{Manifest.permission.RECORD_AUDIO},
        REQUEST_MICROPHONE);

}
like image 23
Hansel Avatar answered Oct 18 '22 08:10

Hansel