-
Notifications
You must be signed in to change notification settings - Fork 3
/
Smartlook.Android.cs
272 lines (236 loc) · 8.77 KB
/
Smartlook.Android.cs
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
#if UNITY_ANDROID
using UnityEngine;
namespace SmartlookUnity
{
public partial class Smartlook
{
static AndroidJavaClass SL;
static AndroidJavaClass getSLClass()
{
if (SL == null) SL = new AndroidJavaClass("com.smartlook.sdk.smartlook.Smartlook");
return SL;
}
static partial void SetupAndStartRecordingInternal(string key)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setupAndStartRecording", key);
}
}
static partial void SetupAndStartRecordingInternal(string key, int frameRate)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setupAndStartRecording", key, frameRate);
}
}
static partial void SetupAndStartRecordingInternal(SetupOptions setupOptions)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setupAndStartRecordingBridge", JsonUtility.ToJson(setupOptions));
}
}
static partial void SetupInternal(string key)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setup", key);
}
}
static partial void SetupInternal(string key, int frameRate)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setup", key, frameRate);
}
}
static partial void SetupInternal(SetupOptions setupOptions)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setupBridge", JsonUtility.ToJson(setupOptions));
}
}
static partial void StartFullscreenSensitiveModeInternal()
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("startFullscreenSensitiveMode");
}
}
static partial void StopFullscreenSensitiveModeInternal()
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("stopFullscreenSensitiveMode");
}
}
static partial void SetReferrerInternal(string referrer, string source)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setReferrer", referrer, source);
}
}
static partial void TrackCustomEventInternal(string eventName)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("trackCustomEvent", eventName);
}
}
static partial void TrackCustomEventInternal(string eventName, string properties)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("trackCustomEvent", eventName, properties);
}
}
static partial void TrackNavigationEventInternal(string screenName, int direction)
{
if (Application.platform == RuntimePlatform.Android)
{
string internalDirection = "start";
if (direction.Equals(NavigationEventType.exit))
{
internalDirection = "stop";
}
getSLClass().CallStatic("trackNavigationEvent", screenName, internalDirection);
}
}
static partial void StopTimedCustomEventInternal(string eventId)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("stopTimedCustomEvent", eventId);
}
}
static partial void StopTimedCustomEventInternal(string eventId, string properties)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("stopTimedCustomEvent", eventId, properties);
}
}
static partial void CancelTimedCustomEventInternal(string eventId, string reason)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("cancelTimedCustomEvent", eventId, reason);
}
}
static partial void CancelTimedCustomEventInternal(string eventId, string reason, string properties)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("cancelTimedCustomEvent", eventId, reason, properties);
}
}
static partial void SetGlobalEventPropertyInternal(string eventName, string eventValue, bool immutable)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setGlobalEventProperty", eventName, eventValue, immutable);
}
}
static partial void SetGlobalEventPropertiesInternal(string properties, bool immutable)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setGlobalEventProperties", properties, immutable);
}
}
static partial void RemoveGlobalEventPropertyInternal(string eventName)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("removeGlobalEventProperty", eventName);
}
}
static partial void RemoveAllGlobalEventPropertiesInternal()
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("removeAllGlobalEventProperties");
}
}
static partial void SetUserIdentifierInternal(string userIdentifier)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setUserIdentifier", userIdentifier);
}
}
static partial void SetUserIdentifierInternal(string userIdentifier, string properties)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setUserIdentifier", userIdentifier);
getSLClass().CallStatic("setUserProperties", properties, false);
}
}
static partial void StartRecordingInternal()
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("startRecording");
}
}
static partial void StopRecordingInternal()
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("stopRecording");
}
}
static partial void EnableCrashlyticsInternal(bool enable)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("enableCrashlytics", enable);
}
}
static partial void ResetSessionInternal(bool resetUser)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("resetSession", resetUser);
}
}
static partial void SetRenderingModeInternal(int renderingMode)
{
if (Application.platform == RuntimePlatform.Android)
{
string internalRenderingMode = "native";
if (renderingMode.Equals(RenderingModeType.no_rendering))
{
internalRenderingMode = "no_rendering";
}
getSLClass().CallStatic("setRenderingMode", internalRenderingMode);
}
}
static partial void SetEventTrackingModeInternal(string eventTrackingMode)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setEventTrackingMode", eventTrackingMode);
}
}
static partial void SetEventTrackingModesInternal(string eventTrackingModes)
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("setEventTrackingModes", eventTrackingModes);
}
}
static partial void UnregisterIntegrationListenerInternal()
{
if (Application.platform == RuntimePlatform.Android)
{
getSLClass().CallStatic("unregisterIntegrationListener");
}
}
}
}
#endif