public class

ShareConfig

extends Object
java.lang.Object
   ↳ co.megacool.megacool.ShareConfig

Class Overview

ShareConfig enables you to customize the share created, to link to a specific section in your game, or add additional data for analytics.

Summary

Public Constructors
ShareConfig()
Build a new empty ShareConfig.
Public Methods
ShareConfig data(Map<String, String> data)
Set extra data to attach to the share.
ShareConfig fallbackImage(int fallbackImage)
An image that will be shared if there's no frames recorded yet, or the gif creation fails for some reason.
ShareConfig fallbackImageUrl(String fallbackImageUrl)
An image that will be shared if there's no frames recorded yet, or the gif creation fails for some reason.
ShareConfig recordingId(String recordingId)
Which recording to share.
ShareConfig url(Uri url)
The URL path to share.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ShareConfig ()

Build a new empty ShareConfig.

Public Methods

public ShareConfig data (Map<String, String> data)

Set extra data to attach to the share.

This can be used to include extra, trusted data in the share that is not visible in the URL.

Parameters
data Data to include in the share. Must be encodable as JSON, thus no complex types.

public ShareConfig fallbackImage (int fallbackImage)

An image that will be shared if there's no frames recorded yet, or the gif creation fails for some reason.

Parameters
fallbackImage an image that will be shared if there is no gif
Returns
  • the builder

public ShareConfig fallbackImageUrl (String fallbackImageUrl)

An image that will be shared if there's no frames recorded yet, or the gif creation fails for some reason.

Parameters
fallbackImageUrl absolute URL to an image on disk that will be shared if there is no gif
Returns
  • the builder

public ShareConfig recordingId (String recordingId)

Which recording to share. Only needed if you set a recordingId during capture.

Parameters
recordingId the recordingId used when recording
Returns
  • the builder

public ShareConfig url (Uri url)

The URL path to share.

You can encode any data you want into the URL parameters to ensure they are available to the recipient immediately when they open the app, as getUrl().

Note that only the path and query parameters are actually embedded into the shared url.