Skip to main content
Version: 0.4

Configuration

Two options govern the Fedo SDK, both optional, and the defaults fit most apps: a 10-second HTTP timeout and quiet logging. Below: when to change them, and what misconfigured setups look like in your logs.

Configuration is applied once, inside the trailing lambda of Fedo.initialize, and never varies per screen. For runtime-decided behavior, compute it at startup — from a build flavor or a remote flag — and feed the value into the lambda.

When to change the defaults​

  • Raise the timeout for slow or unreliable networks — flaky mobile data, field-service and ride apps, high-latency regions.
  • Lower it to 3_000–5_000 when your own backend is fast and you want submissions to fail fast rather than hold a spinner.
  • Set a logHandler while integrating, or to diagnose a "feedback did not post" report. FedoLogHandler.Logcat writes a plain-text trail of what the SDK is doing, tagged Fedo; your own handler can forward it to your logging or error tracking service.

Initialization with a custom configuration​

Pass the config to Fedo.initialize:

Fedo.initialize(
applicationContext,
"your-api-key",
) {
timeoutInMillis = 15_000
logHandler = FedoLogHandler.Logcat
}

The lambda is optional. Call Fedo.initialize(context, "your-api-key") to use the defaults.

Options reference​

PropertyTypeDefaultDescription
timeoutInMillisLong10_000HTTP request timeout for API calls
logHandlerFedoLogHandler?nullReceives every SDK log. null means the SDK logs nothing
debugBooleanfalseDeprecated, use logHandler = FedoLogHandler.Logcat. Removed in 0.5.0

On iOS the same options are networkTimeout (seconds, default 10) and logLevel (FedoLogLevel, default .none).

timeoutInMillis​

The per-request timeout for every API call the SDK makes: loading the board, posting, voting, commenting, and identity calls from User Management. When a request exceeds it, the call fails and the SDK surfaces its error state; there is no automatic retry, so the user may need to try again.

logHandler​

Receives every log the SDK emits. Without one, the SDK logs nothing. To see the logs in Logcat, use the built-in handler:

logHandler = if (BuildConfig.DEBUG) FedoLogHandler.Logcat else null

It logs under the Fedo tag, with the stack trace of any exception. Filter with:

adb logcat -s Fedo

To forward logs to your own logging or error tracking service, pass your own handler. It receives every FedoLogLevel (VERBOSE, DEBUG, INFO, WARN, ERROR), so filter in the handler:

logHandler = FedoLogHandler { level, message, throwable ->
if (level >= FedoLogLevel.WARN) myLogger.log("[Fedo] $message", throwable)
}
  • The handler runs synchronously on whichever thread logged, main or background: keep it fast and thread-safe.
  • Don't call Fedo methods from inside it.
  • Exceptions it throws are caught and ignored.
  • Messages never contain the user's email, display name or property values.

The handler only affects logging, not SDK behavior.

debug (deprecated)​

Replaced by logHandler = FedoLogHandler.Logcat. debug = true still logs to Logcat when no logHandler is set. It will be removed in 0.5.0.

Calling initialize more than once​

Not allowed. Only the first Fedo.initialize call takes effect; any later call is a no-op, so you cannot change the API key or configuration at runtime. Decide both once, up front.

Blank API key​

initialize logs error if the key is blank — a programmer error, since an invalid key cannot fall back to another board (see Core concepts). The problem is wiring, not a transient condition.

Troubleshooting and FAQ​

My feedback never posts — is it a timeout?​

Possibly — check the logs first. Set logHandler = FedoLogHandler.Logcat, reproduce, and filter adb logcat -s Fedo; you will see each request, its outcome, and any error. If the board loads but a single post fails, a longer timeoutInMillis is unlikely to help — that points at a backend or networking issue. See Getting Started for the other failure modes.

Where are the debug logs? I see nothing in Logcat.​

The SDK logs nothing without a logHandler. Confirm you set logHandler = FedoLogHandler.Logcat in the initialize lambda, rebuilt, and are filtering the right tag — Fedo. On iOS the equivalent is logLevel: .debug in FedoConfig.

Do I have to configure anything to use Fedo?​

No. Fedo.initialize(context, "your-api-key") with the defaults is all the SDK needs; the UI is self-contained (see Feedback UI).