Companion

object Companion

Static helpers for building share intents and resolving share targets.

Properties

Link copied to clipboard

PDF mime type.

Functions

Link copied to clipboard
fun getShareIntent(context: Context, shareUri: Uri, shareAction: ShareAction): Intent

Creates share intent for sharing shareUri using given shareAction.

fun getShareIntent(context: Context, shareUri: Uri, shareTarget: ShareTarget): Intent

Creates share intent for sharing shareUri to given shareTarget.

Link copied to clipboard
fun getShareIntents(context: Context, shareUri: Uri, vararg shareActions: ShareAction): List<Intent>

Generates list of sharing intents for all apps supporting given ShareAction.

Link copied to clipboard
suspend fun getShareIntentsAsync(context: Context, shareUri: Uri, shareAction: ShareAction): List<Intent>

Generates list of sharing intents for all apps supporting given ShareAction.

Link copied to clipboard
fun getShareTarget(context: Context, shareAction: ShareAction, targetPackageName: String): ShareTarget?
fun getShareTarget(context: Context, shareAction: ShareAction, targetPackageName: String, sharedFileName: String?): ShareTarget?
Link copied to clipboard

Generates list of share targets for all apps handling given intents.

Link copied to clipboard
suspend fun getShareTargetsAsync(context: Context, intents: List<Intent>): 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

Show application details settings screen for given share target.