Skip to content
This repository was archived by the owner on Jun 16, 2023. It is now read-only.

Conversation

@Njinou
Copy link

@Njinou Njinou commented Nov 13, 2019

  • The camera on android was not opening as soon as the user granted the authorization, because the refreshAuthorization was not being updated on realtime.
    After the user grants the authorization, it still displayed the black screen with the spinning activityIndicator. But now with the change, as soon as the user grants the permission, it opens up the camera right away.
  • Refactor the code to use the refreshAuthorization in ComponentDidMount, realize the function was created but never used and in ComponentDidMount was just a copy paste of that code's function.

Steps to reproduce

Install on the device and authorize the permission then camera will open up right away in Android

Compatibility

OS Implemented
iOS ✅❌
Android ✅❌
  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I mentioned this change in CHANGELOG.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)

…oon as permission is granted instead of displaying the black screen with indicator
}
}

async componentDidMount() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move to hooks?

@cristianoccazinsp
Copy link
Contributor

Interesting, is this from the latest version? I haven't really noticed any delay after authorization is granted. Would this trigger a double render?

@fabOnReact
Copy link
Contributor

fabOnReact commented Mar 12, 2020

to fix the Circle CI issue, I suggest you to:

origin is njinou github repo
upstream is react-native-community repo

git checkout <my-local-branch>
git fetch upstream
git rebase upstream/master
git push origin <my-local-branch>

you may have to use git push origin <my-local-branch> --force.

@fabOnReact fabOnReact mentioned this pull request Mar 20, 2020
5 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants