CropPhotoContract
class CropPhotoContract @JvmOverloads constructor(val authority: String? = null) : ActivityResultContract<CropIntent, Uri?>
Cropping photo.
When Build.VERSION.SDK_INT is between Build.VERSION_CODES.R and Build.VERSION_CODES.N, You need to refer to the following example configuration path for FileProvider.
// The output image path.
val path = Environment.getExternalStoragePublicDirectory(DIRECTORY_PICTURES).path
Content copied to clipboard
<!-- File named file_paths.xml in xml folder. -->
<resources>
<!-- add this line -->
<external-path name="name_you_define" path="Pictures" />
</manifest>
Content copied to clipboard
Parameters
authority
The authority of a FileProvider defined in a