java.lang.Object | |
↳ | co.megacool.megacool.Event |
Events are passed in the callback to
start(Context, String, Megacool.OnEventsReceivedListener)
, which will be
triggered as soon as the app opens.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public final EventType | type | What kind of event this is. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Date |
getCreatedAt()
The time the event happened.
| ||||||||||
Map<String, Object> |
getData()
Get any extra data associated with the event.
| ||||||||||
String |
getReceiverUserId()
For
SENT_SHARE_OPENED events, get the receiving user's user id. | ||||||||||
ReferralCode |
getReferralCode()
Get the referral code (if any).
| ||||||||||
String |
getSenderUserId()
For
RECEIVED_SHARE_OPENED events, get the sender's user id. | ||||||||||
Share |
getShare()
Get the
Share that was involved in the event, for
RECEIVED_SHARE_OPENED or SENT_SHARE_OPENED events. | ||||||||||
String |
getUrl()
For link clicked events, get the URL that was clicked.
| ||||||||||
boolean |
isFirstSession()
Whether the event occurred in the first session or not on the originating device.
| ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The time the event happened.
Get any extra data associated with the event. You probably want to use the helpers
getReferralCode()
, getUrl()
, getSenderUserId()
and
getReceiverUserId()
instead of accessing this directly.
Get the referral code (if any). Always present for RECEIVED_SHARE_OPENED
and SENT_SHARE_OPENED
, might be present for
LINK_CLICKED
events.
Get the Share
that was involved in the event, for
RECEIVED_SHARE_OPENED
or SENT_SHARE_OPENED
events.
For link clicked events, get the URL that was clicked. This should be used to navigate to a specific section within your app.
Whether the event occurred in the first session or not on the originating device.
Use this with RECEIVED_SHARE_OPENED
to determine if an installation came
from Megacool or not. For SENT_SHARE_OPENED
events, this can be used to
determine whether the share resulted in a re-engaged user or a new install.