blob: 3b81a077bfdf512596acc0fc69066a4cc1936934 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
//
// Adjust.java
// Adjust
//
// Created by Christian Wellenbrock on 2012-10-11.
// Copyright (c) 2012-2014 adjust GmbH. All rights reserved.
// See the file MIT-LICENSE for copying permission.
//
package com.adjust.sdk;
import android.net.Uri;
/**
* The main interface to Adjust.
* Use the methods of this class to tell Adjust about the usage of your app.
* See the README for details.
*/
public class Adjust {
private static AdjustInstance defaultInstance;
private Adjust() {
}
public static synchronized AdjustInstance getDefaultInstance() {
if (defaultInstance == null) {
defaultInstance = new AdjustInstance();
}
return defaultInstance;
}
public static void onCreate(AdjustConfig adjustConfig) {
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
adjustInstance.onCreate(adjustConfig);
}
public static void trackEvent(AdjustEvent event) {
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
adjustInstance.trackEvent(event);
}
public static void onResume() {
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
adjustInstance.onResume();
}
public static void onPause() {
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
adjustInstance.onPause();
}
public static void setEnabled(boolean enabled) {
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
adjustInstance.setEnabled(enabled);
}
public static boolean isEnabled() {
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
return adjustInstance.isEnabled();
}
public static void appWillOpenUrl(Uri url) {
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
adjustInstance.appWillOpenUrl(url);
}
public static void setReferrer(String referrer) {
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
adjustInstance.sendReferrer(referrer);
}
public static void setOfflineMode(boolean enabled) {
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
adjustInstance.setOfflineMode(enabled);
}
}
|