Рет қаралды 5,489
Create a FileProvider that we can pass to the Camera intent to store an image locally on an Android device/SD Card. I start by giving an overview of why we need to create a FileProvider. A FileProvider can give us a content:// URI, which has more granular permissions than a file:// URI. That is, a content URI can have permissions shared via an intent, where a File can only have permissions set at the File level: all applications get the same permission. After that, I cover android:name, android:authorities, androidx.core.content.FileProvider, android:exported, android:grantUriPermissions, and creating a file_paths.xml file that contains the paths where we want to store our images.