Callbacks and Error handling

Whenever there’s an error, the SDK returns a CustomerIOError instance. For now, the SDK doesn’t handle errors for your app; you need to handle errors on your own.

 Our mobile SDKs are in alpha and subject to change

While we’re very excited about our mobile SDKs, they’re still works in progress! If you want to try them out, contact

This page is part of an introductory series to help you get started with the essential features of our SDK. The highlighted step(s) below are covered on this page. Before you continue, make sure you've implemented previous features—i.e. you can't identify people before you initialize the SDK!

graph LR getting-started(Install SDK) -->B(Initialize SDK) B --> identify(identify people) identify -.-> track-events(Send events) identify -.-> push(Receive push) identify -.-> rich-push(Receive Rich Push) track-events --> testing-error-handling(handle errors) push --> testing-error-handling rich-push --> testing-error-handling click getting-started href "/docs/sdk/android/getting-started" click B href "/docs/sdk/android/getting-started/#initialize-the-sdk" click identify href "/docs/sdk/android/identify" click track-events href "/docs/sdk/android/track-events/" click push href "/docs/sdk/android/push" click rich-push href "/docs/sdk/android/rich-push" click testing-error-handling href "/docs/sdk/android/testing-error-handling" style testing-error-handling fill:#B5FFEF,stroke:#007069

The SDK provides an Action interface for almost all of its methods. You can use it to make method calls execute synchronously or asynchronously.

Method calls return a Result<T> object, which itself contains a Success<T> or ErrorResult<T> object. To get error details, ErrorResult provides an ErrorDetail object.

class ErrorDetail(
    val message: String? = null,
    val statusCode: StatusCode = StatusCode.Unknown,
    val cause: Throwable = Throwable()
Copied to clipboard!
Latest release