java.lang.Object | |
↳ | co.megacool.megacool.EventListener |
The extension point for listening to events emitted by the SDK.
The base implementation of the methods in this class merely logs the events, if you want to
retain this you can include super()
in your implementation, but you don't have to.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
EventListener() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
linkClicked(LinkClickedEvent event)
A link was clicked on.
| ||||||||||
void |
receivedShareOpened(ReceivedShareOpenedEvent event)
This device clicked a share sent by someone else.
| ||||||||||
void |
sentShareOpened(SentShareOpenedEvent event)
A share sent from this device was clicked on by someone else.
| ||||||||||
void |
shareCompleted()
Called when a share is completed successfully.
| ||||||||||
void |
shareDismissed()
Called when a user initiates a share, but didn't select an app to share to.
| ||||||||||
void |
sharePossiblyCompleted()
Called when the user has at least selected an app to share to (API level 22 and up),
or when we're unable to tell if an app was selected or not (API level 21 and down).
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
A link was clicked on. Override this method to implement deep linking, ie navigate to a specific part of your app when a link is clicked.
event | the link clicked event |
---|
This device clicked a share sent by someone else. Override this method to reward users when they install from a referral, or autoconnect them to friends in the game based on who sent the share.
Use isFirstSession()
to determine if the event
was a new install or a re-engagement.
event | the received share opened event |
---|
A share sent from this device was clicked on by someone else. Override this to reward the
sender for referring someone to the game, use isFirstSession()
to differentiate between new installs and re-engagements.
event | the sent share opened event |
---|
Called when a share is completed successfully. Few of the apps you can share to will actually report this.
Called when a user initiates a share, but didn't select an app to share to.
This is only called on API level 22 and up.
Called when the user has at least selected an app to share to (API level 22 and up), or when we're unable to tell if an app was selected or not (API level 21 and down). Most apps do not report the result of a share, so we can't be sure that the user actually completed the share or not.