Skip to content

Instantly share code, notes, and snippets.

@KatieBarnett
Created January 13, 2025 06:06
Show Gist options
  • Save KatieBarnett/81cc9ff5b90fb8a99c4397bc56f5f7b3 to your computer and use it in GitHub Desktop.
Save KatieBarnett/81cc9ff5b90fb8a99c4397bc56f5f7b3 to your computer and use it in GitHub Desktop.
ImageFileProvider
<manifest>
<application>
...
<provider
android:name=".widget.image.ImageFileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/image_paths" />
</provider>
</application>
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<paths>
<cache-path name="widget_images" path="image_cache/" />
</paths>
class ImageFileProvider : FileProvider()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment