Required game logging APIs to report all game events.
More... |
Map< Long, String > | getCustomData () |
| Get custom data (provided using setCustomData) More...
|
|
String | getLastLevelPlayed () |
| Fetch the last level played by the user. More...
|
|
Float | getPlayerSpend () |
| Fetch the player spent value. More...
|
|
boolean | logCustomEvent (@NonNull final String name, @NonNull final Hashtable< String, Object > data) |
| Log a custom event to Big Fish Mobile Telemetry Services. More...
|
|
boolean | logCustomEvent (@NonNull final String name, @Nullable final Integer value, @Nullable final Integer level, @NonNull final String details1, @Nullable final String details2, @Nullable final String details3, @NonNull final Hashtable< String, Object > data) |
| Log a custom event to Big Fish Mobile Telemetry Services. More...
|
|
void | logCustomPlacement (@NonNull final String placementName) |
| logCustomPlacement More...
|
|
void | logLevelFinished (@Nullable final String levelID) |
|
void | logLevelStart (@Nullable final String levelID) |
|
void | logRewardedVideoSeenWithProvider (@NonNull final String videoProvider) |
| Log rewarded video event, facilitates logging rewarded video when video location parameter is not applicable. More...
|
|
void | logRewardedVideoSeenWithProvider (@NonNull final String videoProvider, @Nullable final String videoLocation) |
| Log rewarded video event. More...
|
|
void | setCustomData (@Nullable final Map< Long, String > customData) |
| Add custom data fields to the next Zendesk request. More...
|
|
void | setDeepLinkListener (bfgDeepLinkListener deepLinkListener) |
| Setter method for deep link listener. More...
|
|
void | setIsNetworkDataCollectionEnabled (boolean isEnabled) |
| Turn on/off whether network data should be collected and sent to tracking systems. More...
|
|
void | setLastLevelPlayed (@NonNull final String lastLevelPlayed) |
| Set the last level played by the user to be added as a custom field in the Zendesk request. More...
|
|
void | setPlayerSpend (final float playerSpend) |
| Set the Player Spend (LTV) to be added as a custom field in Zendesk requests. More...
|
|
|
static void | setSuppressPlacement (boolean suppressPlacements) |
| If it would be inappropriate for a placement ad to appear over the game in the moment, call this method with the boolean parameter: true. More...
|
|
static bfgGameReporting | sharedInstance () |
| Get a non-null singleton instance (thread-safe, optimized for frequent use)
|
|
|
static final int | BFG_PURCHASE_BUTTON_BUY = 0 |
| "Buy" button
|
|
static final int | BFG_PURCHASE_BUTTON_CLOSE = 3 |
| "Close button"
|
|
static final int | BFG_PURCHASE_BUTTON_LATER = 2 |
| "Later" button
|
|
static final int | BFG_PURCHASE_BUTTON_RESTORE = 1 |
| "Restore" button
|
|
Required game logging APIs to report all game events.
◆ getCustomData()
Map< Long, String > com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.getCustomData | ( | | ) | |
| inline |
Get custom data (provided using setCustomData)
- Returns
- Last custom data set; NULL if never set
◆ getLastLevelPlayed()
String com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.getLastLevelPlayed | ( | | ) | |
| inline |
Fetch the last level played by the user.
- Returns
- Last level played by the user, null if unavailable
◆ getPlayerSpend()
Float com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.getPlayerSpend | ( | | ) | |
| inline |
Fetch the player spent value.
- Returns
- Player spend value, null if unavailable
◆ logCustomEvent() [1/2]
boolean com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.logCustomEvent | ( | @NonNull final String | name, | | | @NonNull final Hashtable< String, Object > | data | | ) | | |
| inline |
Log a custom event to Big Fish Mobile Telemetry Services. When the Big Fish Mobile Telemetry Services backend rejects a custom event, a bfgReporting.BFG_REPORTING_EVENT_FAILED_NOTIFICATION notification is raised. For example, in an instance when a custom event exceeds the maximum size.
- Parameters
name | Event name that cannot be null. Pass in "" (empty string) as a string if necessary. |
data | Hashtable of extra data to be sent as JSON. |
- Returns
- whether sending of the event was successful
◆ logCustomEvent() [2/2]
boolean com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.logCustomEvent | ( | @NonNull final String | name, | | | @Nullable final Integer | value, | | | @Nullable final Integer | level, | | | @NonNull final String | details1, | | | @Nullable final String | details2, | | | @Nullable final String | details3, | | | @NonNull final Hashtable< String, Object > | data | | ) | | |
| inline |
Log a custom event to Big Fish Mobile Telemetry Services. Based on a prior telemetry service that is now deprecated. Although event name is no longer required by the Mobile Telemetry Services, this method has not changed, so it's still required that a value be passed to it. The event will not be sent if the event name is null. Other null fields will not be sent.
- Parameters
name | Event name that cannot be null. Pass in "" (empty string) as a string if necessary. |
value | An optional arbitrary value you assign to associate with the event. |
level | Optional integer value between 0 and 255 associated with the current game level. |
details1 | String data. Cannot be null. |
details2 | Optional String data. Required if using details3. |
details3 | Optional String data. |
data | Hashtable of extra data to be sent as JSON. |
- Returns
- whether sending of the event was successful
◆ logCustomPlacement()
void com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.logCustomPlacement | ( | @NonNull final String | placementName | ) | |
| inline |
logCustomPlacement Game should call this to log a custom placement.
◆ logLevelFinished()
void com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.logLevelFinished | ( | @Nullable final String | levelID | ) | |
| inline |
Game should call this each time a level is finished.
- Parameters
levelID | Identifier of the level that was finished. |
◆ logLevelStart()
void com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.logLevelStart | ( | @Nullable final String | levelID | ) | |
| inline |
Game should call this each time a level has started.
- Parameters
levelID | Identifier of the level that was started. |
◆ logRewardedVideoSeenWithProvider() [1/2]
void com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.logRewardedVideoSeenWithProvider | ( | @NonNull final String | videoProvider | ) | |
| inline |
Log rewarded video event, facilitates logging rewarded video when video location parameter is not applicable.
- Parameters
videoProvider | - provider from which video was supplied |
- Since
- 6.1
◆ logRewardedVideoSeenWithProvider() [2/2]
void com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.logRewardedVideoSeenWithProvider | ( | @NonNull final String | videoProvider, | | | @Nullable final String | videoLocation | | ) | | |
| inline |
Log rewarded video event. Calling this method will send an event to Big Fish servers that reports that a rewarded video was watched. At a minimum you must provide the videoProvider parameter, otherwise the event will not send. You can also optionally pass along the videoLocation where this rewarded video was viewed.
- Parameters
videoProvider | - provider from which video was displayed (e.g. vungle) |
videoLocation | - location where video was viewed (e.g. main_menu) |
- Since
- 6.1
◆ setCustomData()
void com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.setCustomData | ( | @Nullable final Map< Long, String > | customData | ) | |
| inline |
Add custom data fields to the next Zendesk request. Each field is defined using a Zendesk-specific ID number and a string value. The string values should be consistently formatted for display, depending on data type, as follows:
- Text: Text strings can be formatted as the developer thinks appropriate or as otherwise specified.
- Numeric: Integer value. Commas and other separators are not allowed.
- Decimal: Floating point value, formatted in IEEE 754 string format (e.g. Double.toString(someDoubleValue) or Float.toString(someFloatValue)).
- Boolean: "true" or "false".
- Date: ISO 8601 date format string, must be formatted as YYYY-MM-DD (2018-12-06). Including the time is not supported.
- DropDown: String that matches the tag for the corresponding value. For example, BFC/JMS would use sdk_vip_#, such as "sdk_vip_11" for VIP 11.
- Parameters
customData | Collection of ID/Value pairs to provide to Zendesk as extra, game-specific data. The IDs are defined in Zendesk specifically by each game that requires them. They uniquely identify the corresponding value. For example, an ID/Value pair of 1234567890L and "123.45" could be used to specify the total recent purchase amount as $123.45, given a corresponding custom field with an ID of 1234567890L. |
◆ setDeepLinkListener()
void com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.setDeepLinkListener | ( | bfgDeepLinkListener | deepLinkListener | ) | |
| inline |
Setter method for deep link listener.
- Parameters
deepLinkListener | Deep link listener instance |
- Since
- 6.9
◆ setIsNetworkDataCollectionEnabled()
void com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.setIsNetworkDataCollectionEnabled | ( | boolean | isEnabled | ) | |
| inline |
Turn on/off whether network data should be collected and sent to tracking systems.
- Parameters
isEnabled | Whether network data collection should be turned on |
◆ setLastLevelPlayed()
void com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.setLastLevelPlayed | ( | @NonNull final String | lastLevelPlayed | ) | |
| inline |
Set the last level played by the user to be added as a custom field in the Zendesk request.
- Parameters
lastLevelPlayed | Last level the user played before hitting support |
◆ setPlayerSpend()
void com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.setPlayerSpend | ( | final float | playerSpend | ) | |
| inline |
Set the Player Spend (LTV) to be added as a custom field in Zendesk requests.
- Parameters
playerSpend | Player spend value to be added to the Zendesk requests |
◆ setSuppressPlacement()
static void com.bigfishgames.bfglib.bfgreporting.bfgGameReporting.setSuppressPlacement | ( | boolean | suppressPlacements | ) | |
| inlinestatic |
If it would be inappropriate for a placement ad to appear over the game in the moment, call this method with the boolean parameter: true. As soon as it is okay to show placements again, be sure to set it back to false.
- Parameters
suppressPlacements | - Whether or not placement should be suppressed. |