The verify method was created in order to make the Embrace SDK integration easier.

This process should be executed by the client only the first time after integrating Embrace or when the support team requests. That way, if some integration issue is found customers could easily share what is wrong.

Verify() runs a series of actions to check if the Embrace features are working well.


For <Kotlin>
import io.embrace.android.embracesdk.Embrace

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        Embrace.getInstance().start(this)
        EmbraceSamples.verifyIntegration() // temporarily add this to verify the integration
    }
}
For <Java>
import io.embrace.android.embracesdk.Embrace;
public final class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Embrace.getInstance().start(this);
        EmbraceSamples.verifyIntegration(); // temporarily add this to verify the integration
    }
}

The user will see a toast icon indicating the Embrace verification is running. It shouldn’t take too long (<1 min), but it could be slow depending on their internet connection.

The method will run the following actions:

  • Log a Breadcrumb
  • Set user data
  • Add info, warning, and error logs
  • Start and end a moment
  • Executes a GET request
  • Add the trace id to the request (default or the one specified in the local config)
  • Check the current and the latest SDK version
  • Execute a POST request
  • Execute a bad request
  • Trigger an ANR
  • Throw an Exception

This last step will relaunch the application.

When the application comes to the foreground again, it ends the session and checks if it can be sent. A popup will be displayed with the results.