DocumentSharingIntentHelper

Helper for creating share intents.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val MIME_TYPE_PDF: String = "application/pdf"
PDF mime type.

Functions

Link copied to clipboard
open fun getShareIntent(@NonNull context: Context, @NonNull shareUri: Uri, @NonNull shareAction: ShareAction): Intent
Creates share intent for sharing shareUri using given shareAction.
open fun getShareIntent(@NonNull context: Context, @NonNull shareUri: Uri, @NonNull shareTarget: ShareTarget): Intent
Creates share intent for sharing shareUri to given shareTarget.
open fun getShareIntent(@NonNull context: Context, @NonNull shareAction: ShareAction, @Nullable sharedFileName: String): Intent
Creates share intent for sharing PDF file from DocumentSharingProvider with shareAction.
Link copied to clipboard
open fun getShareIntents(@NonNull context: Context, @NonNull shareUri: Uri, @NonNull shareActions: Array<ShareAction>): List<Intent>
Generates list of sharing intents for all apps supporting given ShareAction.
Link copied to clipboard
open fun getShareIntentsAsync(@NonNull context: Context, @NonNull shareUri: Uri, @NonNull shareAction: ShareAction): Observable<List<Intent>>
Generates list of sharing intents for all apps supporting given ShareAction asynchronously.
Link copied to clipboard
open fun getShareTarget(@NonNull context: Context, @NonNull shareAction: ShareAction, @NonNull targetPackageName: String): ShareTarget
open fun getShareTarget(@NonNull context: Context, @NonNull shareAction: ShareAction, @NonNull targetPackageName: String, @Nullable sharedFileName: String): ShareTarget
Creates ShareTarget for given shareAction and targetPackageName.
Link copied to clipboard
Generates list of share targets for all apps handling given intents.
Link copied to clipboard
open fun getShareTargetsAsync(@NonNull context: Context, @NonNull intents: List<Intent>): Observable<List<ShareTarget>>
Generates list of share targets for all apps handling given intents.
Link copied to clipboard
Generates intent for sharing plain text.
Link copied to clipboard
open fun showShareTargetDetails(@NonNull context: Context, @NonNull shareTarget: ShareTarget)
Show application details settings screen for given share target.