0

I have just started to use expo-image-picker but for testing purposes I have denied the camera permissions so many times that I'm not being asked anymore whether I want to allow or deny the permission. I have refreshed, relaunched the app but nothing to do

Sample.js

import {TouchableOpacity} from "react-native";
import React from "react";
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
import FontAwesome5 from "react-native-vector-icons/FontAwesome5";
import * as ImagePicker from "expo-image-picker";
  
  const Sample = ({ navigation }) => {
  
    const handleUpload = async () => {
      let permissionResult =
        await ImagePicker.requestMediaLibraryPermissionsAsync();
      console.log(permissionResult);
      if (permissionResult.granted === false) {
        alert("Camera access required");
        return;
      }
    };
  
    return (
      <KeyboardAwareScrollView>
          <TouchableOpacity onPress={handleUpload}>
            {image && image.url && (
              <FontAwesome5
                name="camera"
                size={20}
                color="black"
                style={{ marginTop: -20, marginLeft: 200, marginBottom: 30 }}
              />)}
          </TouchableOpacity>
      </KeyboardAwareScrollView>
    );
  };
  
  export default Sample ;
doppelgreener
  • 4,809
  • 10
  • 46
  • 63
Laspeed
  • 791
  • 1
  • 5
  • 27

2 Answers2

0

Go to the respective app settings and clear data. It should most likely reset the permissions. You can also try uninstalling the app and reinstalling it.

If you are inquiring about what to do if a user does so (which most likely they won't), you'll have to direct the user to the app's settings page and manually allow the permissions.

dev404
  • 1,047
  • 8
  • 21
0

You'll need to uninstall and reinstall to receive this prompt again I believe.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 13 '22 at 11:17