-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat: allow camera scene when audio permissions are denied #2048
feat: allow camera scene when audio permissions are denied #2048
Conversation
@HighSoftWare96 What does the crashlog offer? |
How can I retrieve the crashlog? |
@HighSoftWare96 check the console output in XCode |
@n1ru4l |
@HighSoftWare96 Seems like you should clear your react-native packager cache. Try starting the package with |
@n1ru4l Right now I'm using npm but I've already tried with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove common handle permission function?
@sibelius wrote
Because they now differ as the |
we should remove RCTCamera soon |
@sibelius Do you know why on my Nexus 5X with Android Also I do not need to add I only have to add This happens in both development and release builds |
Ok I understood it partially. The However I still do not understand why I do not see a dialog... |
@@ -369,4 +373,22 @@ public void execute(NativeViewHierarchyManager nativeViewHierarchyManager) { | |||
} | |||
}); | |||
} | |||
|
|||
@ReactMethod | |||
public void checkIfRecordAudioPermissionsAreDefined(final Promise promise) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a new method similar to the one on ios to check if the key is defined in the AndroidManifest.xml
before asking for the permissions.
@n1ru4l Tested, it solved the problem without setting |
d77c9c3
to
fb43491
Compare
dac0f92
to
c73cb10
Compare
🎉 This PR is included in version 1.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…ild (#2070), Fixes #2069 It seems like Apple is rejecting apps that access a Info.plist usage description that is not available. This conflicts with enhanced developer warnings I implemented in #2048. To fix that I changed the implementation to only check if the usage descriptions are available in `DEBUG` mode. I also added a note developer warnings, that the app might crash in release mode because using a feature that requires a usage description without having one provided will result in an application crash).
PermissionsAndroid.PERMISSIONS.CAMERA, | ||
params, | ||
); | ||
hasCameraPermissions = cameraPermissionResult === PermissionsAndroid.RESULTS.GRANTED; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Why you use different "requestPermissions" method for Camera.js and RNCamera.js? Can you add || cameraPermissionResult === true
like in Camera.js? Because react-native return boolean-type result for devices before Android 6.0
thx!
# [1.9.0](react-native-camera/react-native-camera@v1.8.1...v1.9.0) (2019-01-18) ### Features * **android:** add videoBitrate option for recordAsync ([#2055](react-native-camera/react-native-camera#2055)) [skip release] ([d93a6c7](react-native-camera/react-native-camera@d93a6c7)) * allow camera scene when audio permissions are denied ([#2048](react-native-camera/react-native-camera#2048)), Fixes [#2047](react-native-camera/react-native-camera#2047), Fixes [#2051](react-native-camera/react-native-camera#2051) ([22533ed](react-native-camera/react-native-camera@22533ed))
## [1.9.2](react-native-camera/react-native-camera@v1.9.1...v1.9.2) (2019-01-25) ### Bug Fixes * **ios:** only check permission descriptions availability in debug build ([#2070](react-native-camera/react-native-camera#2070)), Fixes [#2069](react-native-camera/react-native-camera#2069) ([3f8b795](react-native-camera/react-native-camera@3f8b795)), closes [#2048](react-native-camera/react-native-camera#2048)
@n1ru4l wrote:
What this PR does:
Info.plist
/AndroidManifest.xml
How to test this?
TODO:
Info.plist
before calling iOS API's (Front camera shows black screen and crashes app on iOS #1956 (comment))AndroidManifest.xml
before asking (possible crash)recordAudioPermissionStatus
Affected Issues:
Closes #2051
Closes #2047