Package im.getsocial.sdk.invites
Class InviteChannelPlugin
- java.lang.Object
-
- im.getsocial.sdk.invites.InviteChannelPlugin
-
public abstract class InviteChannelPlugin extends java.lang.Object
Base abstract class for all GetSocial invite channel plugins.Use this class as a base for your own invite channel plugins implementations.
List of supported invite channels is defined inInviteChannelIds
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description android.content.Context
getContext()
abstract boolean
isAvailableForDevice(InviteChannel inviteChannel)
Method should check if plugin is available on the device.abstract void
presentChannelInterface(InviteChannel inviteChannel, Invite invite, InviteCallback callback)
Implementation of the method should present invite channel plugin UI interface.
-
-
-
Method Detail
-
getContext
public android.content.Context getContext()
-
isAvailableForDevice
public abstract boolean isAvailableForDevice(InviteChannel inviteChannel)
Method should check if plugin is available on the device. You can check if plugin is enabled on GetSocial Dashboard viaInviteChannel.isEnabled()
.- Parameters:
inviteChannel
- Invite channel to be checked.- Returns:
- True if invite channel plugin should be available in the list of invite channels, false otherwise.
-
presentChannelInterface
public abstract void presentChannelInterface(InviteChannel inviteChannel, Invite invite, InviteCallback callback)
Implementation of the method should present invite channel plugin UI interface.
IMPORTANT: At least one method of providedInviteCallback
should be invoked as a result of method execution. Ignoring this requirement will result in misbehaviour of the GetSocial SDK and incorrect analytics data.- Parameters:
inviteChannel
- Invite channel to be presented.invite
- Content of the invite message including message, referral link, etc.callback
- Callback to indicate result of the method execution.
-
-