Integration details

The adjoe process and Application.onCreate

The adjoe SDK uses a Service to track the usage of partner apps. This service runs in a child process which is private to your app. When the service is started, your Application.onCreate method will be called from the adjoe process. If you want to make sure that no further code is executed from the onCreate (e.g. initialize other SDKs), you can use the following code:

public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        if (Adjoe.isAdjoeProcess()) {
            // the method is executed on the adjoe process
            return;
        }

        // ...
        // your code
    }
}

Best practices for Adjoe process

It's recommended to apply the above code in your application class if you are using other SDKs that initiate their own initialization process to avoid bad and weird behaviors.

Last updated