DocumentSharingProvider

open class DocumentSharingProvider : BaseFileProvider

Provider allowing access to shared files. To use this provider you just need to add this to your AndroidManifest.xml:


<provider
     android:name="com.pspdfkit.document.sharing.DocumentSharingProvider"
     android:authorities="[your application package name].pdf.share"
     android:exported="true"
     android:grantUriPermissions="true" />

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun checkProviderConfiguration(@NonNull context: Context, @NonNull featureName: String)
Tests if DocumentSharingProvider is configured correctly in AndroidManifest.xml.
Link copied to clipboard
open fun createTemporaryFile(@NonNull context: Context, @NonNull fileName: String, @Nullable fileExtension: String): Uri
Creates temporary file and returns its Uri.
Link copied to clipboard
open fun deleteFile(@NonNull context: Context, @NonNull sharedFileUri: Uri): Boolean
Deletes file handled by this provider.
Link copied to clipboard
Returns authority for this DocumentSharingProvider.
Link copied to clipboard
Returns directory from which DocumentSharingProvider can share files.
Link copied to clipboard
Returns directory from which DocumentSharingProvider can share temporary files.
Link copied to clipboard
open fun getUriForFile(@NonNull context: Context, @NonNull fileName: File): Uri
Return a content URI for a file stored in getSharedFileDirectory directory.