When installing the APK, it shows the app doesn't require special permissions.
When launching the camera inside the app, it asks the user whether they'd like to allow the app to access the camera, which is fine.
When trying to use the microphone, it does not ask and force quits due to permission issues.
EDIT (Clarification): Why is the app not requesting these permissions?
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="lbu.c3369131.noter"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="23"
android:targetSdkVersion="23" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<application
On Android 6.0, with a targetSdkVersion of 23 or higher, you need to call requestPermissions() for all dangerous permissions, in addition to having <uses-permission> elements for them in the manifest. When and where you request the permissions from the user (on first run, when the user clicks the Big Red Button, etc.) is up to you.
In your case, it sounds like you requested CAMERA this way, but failed to request RECORD_AUDIO. Requesting those separately may make sense, particularly if you are operating both the still camera and recording videos, as you do not need RECORD_AUDIO for photos. So, for example, in this sample app, I request CAMERA (and WRITE_EXTERNAL_STORAGE) on first run, but I only ask for RECORD_AUDIO when the user specifically asks to record a video.
Failing to request a dangerous permission at runtime, then using some API protected by that permission, usually results in a SecurityException.
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