Introduction
If the device’s Internet connection is down or an unknown error occurs either on the SDK or on Fyber’s backend while loading Offer Wall Edge, the OfferWallActivity
presents an alert dialog to the user.
The dialog contains a title, a message, and one single button to dismiss the alert. We have provided the following default messages in English:
Identifier | Description | Error |
---|---|---|
ERROR_DIALOG_TITLE | Single title for all alert dialogs | "Error" |
ERROR_LOADING_OFFERWALL_NO_INTERNET_CONNECTION | Error message presented when the device seems not to have a Internet connection and, as a consequence, the Offer Wall Edge cannot be loaded. | An error happened when loading the Offer Wall Edge (no internet connection)" |
ERROR_LOADING_OFFERWALL | Error message shown when an unknown issue has prevented the Offer Wall Edge from being loaded. | "An error happened when loading the Offer Wall Edge” |
GENERIC_ERROR | Generic error message. It’s not in use at the moment. | "An error happened when performing this operation" |
DISMISS_ERROR_DIALOG | The caption of the dismiss dialog button. | “Dismiss” |
LOADING_OFFERWALL | A loading message which appears next to the progress bar when loading the mobile Offer Wall Edge | “Loading…” |
We encourage you to provide your own versions of the error messages in several languages. To accomplish this, we provide the following methods inside the Fyber.Settings class. You are able to obtain this object when you start the SDK:
Fyber.Settings settings = Fyber.with(appID, Activity).start();
setCustomUIString(UIStringIdentifier identifier, String message)
Allows you to specify one overridden version of a message at a time. You can identify the message you want to customize by using the enumeration UIStringIdentifier
.
setCustomUIStrings(EnumMap<UIStringIdentifier, String> messages)
Allows you to specify several or all overridden messages at once by passing an EnumMap
instance. If the passed map doesn’t contain keys for each of the possible messages, those not specified are left to its default value.
setCustomString(UIString Identifier identifier, int message, Context context)
andsetCustomUIStrings(EnumMap<UIStringIdentifier, Integer> messages, Context context)
These are the localization-friendly versions of the two previous methods. Instead of passing a string with the text for the overridden message, pass an integer reference to your strings and let the Android localization mechanism do the rest! Refer to the Android documentation about localization for more details.