Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save warodri-sendbird/ca0d119667480ef0e6b2cf2258fcddd7 to your computer and use it in GitHub Desktop.
Save warodri-sendbird/ca0d119667480ef0e6b2cf2258fcddd7 to your computer and use it in GitHub Desktop.
const permission = await check(PERMISSIONS.ANDROID.READ_EXTERNAL_STORAGE);
if (permission !== RESULTS.GRANTED) {
const result = await request(PERMISSIONS.ANDROID.READ_EXTERNAL_STORAGE);
if (result !== RESULTS.GRANTED) {
throw new Error('Please allow the storage access permission request.');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment