ShareHandler

interface ShareHandler

A class through which all shared data is directed.

Since

8.30

Inheritors

Types

Link copied to clipboard
class FileShareInfo(val fileName: String, altBaseName: String?, val mimeType: String) : Parcelable

This class holds the information for files being shared or saved.

Functions

Link copied to clipboard
abstract fun saveFile(activity: FragmentActivity, saveInfo: ShareHandler.FileShareInfo)

Save the contents of the file to a location outside the app's internal storage.

Link copied to clipboard
abstract fun shareFile(activity: FragmentActivity, shareInfo: ShareHandler.FileShareInfo)

Share a file to an external app for viewing.

Link copied to clipboard
abstract fun shareMail(context: Context, subject: String?, text: String?, html: String?, attachmentPaths: List<String>?)

Share information with an external source by email.

Link copied to clipboard
abstract fun shareOrSaveFile(activity: FragmentActivity, shareInfo: ShareHandler.FileShareInfo)

Prompt the user to save a file or share it to an external app for viewing.