SharePayload

class NatSuite.Sharing.SharePayload

This payload is used to share items using the native sharing UI.

Creating the Payload

/// <summary>
/// Create a share payload.
/// </summary>
SharePayload ();

This payload does not require any parameters.

Adding Text

/// <summary>
/// Add plain text to the payload.
/// </summary>
ISharePayload AddText (string text);

Refer to the Adding Text section of the ISharePayload interface for more information.

Adding Images

/// <summary>
/// Add an image to the payload.
/// Note that the image MUST be readable.
/// </summary>
/// <param name="image">Image to be shared.</param>
ISharePayload AddImage (Texture2D image);

Refer to the Adding Images section of the ISharePayload interface for more information.

Adding Media Files

/// <summary>
/// Add a media file to the payload
/// </summary>
/// <param name="path">Path to media file to be shared.</param>
ISharePayload AddMedia (string path);

Refer to the Adding Media Files section of the ISharePayload interface for more information.

Sharing the Payload

/// <summary>
/// Commit the payload and return the success value.
/// </summary>
Task<bool> Commit ();

Refer to the Committing the Payload section of the ISharePayload interface for more information.