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:
Java
Kotlin
1
public class MyApplication extends Application {
2
3
@Override
4
public void onCreate() {
5
super.onCreate();
6
7
if (Adjoe.isAdjoeProcess()) {
8
// the method is executed on the adjoe process
9
return;
10
}
11
12
// ...
13
// your code
14
}
15
}
Copied!
1
class MyApplication:Application() {
2
3
fun onCreate() {
4
super.onCreate()
5
if (Adjoe.isAdjoeProcess()) {
6
// the method is executed on the adjoe process
7
return
8
}
9
// ...
10
// your code
11
}
12
}
Copied!

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 modified 10mo ago
Copy link