Skip to content

Commit

Permalink
[image-picker] Skip camera permission on web (#8475)
Browse files Browse the repository at this point in the history
* Skip camera permission on web

* Update CHANGELOG.md
  • Loading branch information
EvanBacon committed May 26, 2020
1 parent 7103969 commit 19017ed
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
1 change: 1 addition & 0 deletions packages/expo-image-picker/CHANGELOG.md
Expand Up @@ -10,4 +10,5 @@

### 🐛 Bug fixes

- Skip asking for camera permissions on web with `ImagePicker.getCameraPermissionsAsync`. ([#8475](https://github.com/expo/expo/pull/8475) by [@EvanBacon](https://github.com/EvanBacon))
- Fixed exception when calling `ImagePicker.getCameraPermissionsAsync` on Web. ([#7498](https://github.com/expo/expo/pull/7498) by [@IjzerenHein](https://github.com/IjzerenHein))
5 changes: 2 additions & 3 deletions packages/expo-image-picker/build/ExponentImagePicker.web.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions packages/expo-image-picker/build/ExponentImagePicker.web.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions packages/expo-image-picker/src/ExponentImagePicker.web.ts
@@ -1,4 +1,3 @@
import * as Permissions from 'expo-permissions';
import { PermissionResponse, PermissionStatus } from 'unimodules-permissions-interface';
import uuidv4 from 'uuid/v4';

Expand Down Expand Up @@ -45,10 +44,10 @@ export default {
* Delegate to expo-permissions to request camera permissions
*/
async getCameraPermissionsAsync() {
return Permissions.getAsync(Permissions.CAMERA);
return permissionGrantedResponse();
},
async requestCameraPermissionsAsync() {
return Permissions.askAsync(Permissions.CAMERA);
return permissionGrantedResponse();
},

/*
Expand Down

0 comments on commit 19017ed

Please sign in to comment.