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?
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.
<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>
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" />
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);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With