cordova-plugin-appice 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -120
- package/package.json +27 -23
- package/plugin.xml +131 -132
- package/scripts/BeforeAndroidBuilt.js +2 -3
- package/scripts/BeforeIosBuilt.js +38 -38
- package/scripts/androidAfterPluginAdd.js +159 -159
- package/scripts/androidAfterPluginRm.js +195 -195
- package/scripts/iOSAfterPluginAdd.js +98 -98
- package/scripts/iOSAfterPluginRm.js +74 -74
- package/src/build.gradle +5 -5
- package/src/firebase/modified/android/FirebasePluginMessagingService.java +356 -356
- package/src/firebase/modified/ios/AppDelegate+FirebasePlugin.m +529 -529
- package/src/firebase/original/android/FirebasePluginMessagingService.java +348 -348
- package/src/firebase/original/ios/AppDelegate+FirebasePlugin.m +519 -519
- package/src/ios/AppDelegate+AppICEPlugin.h +8 -8
- package/src/ios/AppDelegate+AppICEPlugin.m +259 -259
- package/src/ios/AppICEPlugin.h +89 -89
- package/src/ios/AppICEPlugin.m +1068 -1068
- package/www/AppICE.js +283 -278
package/www/AppICE.js
CHANGED
|
@@ -1,279 +1,284 @@
|
|
|
1
|
-
cordova.define("cordova-plugin-appice.AppICE", function(require, exports, module) {
|
|
2
|
-
|
|
3
|
-
// Copyright (C) 2015 AppICE
|
|
4
|
-
//
|
|
5
|
-
// This code is provided under a commercial License.
|
|
6
|
-
// A copy of this license has been distributed in a file called LICENSE
|
|
7
|
-
// with this source code.
|
|
8
|
-
var AppICE = function () {
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
AppICE.prototype.validateIntegration = function(success, error) {
|
|
12
|
-
cordova.exec(success, error, "AppICEPlugin", "validateIntegration", []);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
AppICE.prototype.startContext = function(gcmID, success, error) {
|
|
16
|
-
cordova.exec(success, error, "AppICEPlugin", "startContext", [{"gcmID":gcmID}]);
|
|
17
|
-
|
|
18
|
-
var inputArr = [];
|
|
19
|
-
var inputs = document.getElementsByTagName('input');
|
|
20
|
-
for (var index = 0; index < inputs.length; ++index) {
|
|
21
|
-
var element = inputs[index];
|
|
22
|
-
var data = {
|
|
23
|
-
"t":element.tagName,
|
|
24
|
-
"i":element.id,
|
|
25
|
-
"n":element.name,
|
|
26
|
-
"y":element.getBoundingClientRect().top + window.scrollY,
|
|
27
|
-
"x":element.getBoundingClientRect().left + window.scrollX,
|
|
28
|
-
"w":element.getBoundingClientRect().width,
|
|
29
|
-
"h":element.getBoundingClientRect().height
|
|
30
|
-
};
|
|
31
|
-
inputArr.push(data);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
cordova.exec(success, error, "AppICEPlugin", "trackScreens",
|
|
35
|
-
[{"old":"", "new":"", "loc":location.hash, "h":document.documentElement.clientHeight, "w":document.documentElement.clientWidth, "arr":inputArr}]);
|
|
36
|
-
};
|
|
37
|
-
AppICE.prototype.initSdk = function(appID, appKey, apiKey, gcmID, region, baseUrl, certs,success, error) {
|
|
38
|
-
cordova.exec(success, error, "AppICEPlugin", "initSdk", [{"appID":appID, "appKey":appKey, "apiKey":apiKey, "gcmID":gcmID, "region":region ,"baseUrl":baseUrl ,"certs":certs}]);
|
|
39
|
-
var inputArr = [];
|
|
40
|
-
var inputs = document.getElementsByTagName('input');
|
|
41
|
-
for (var index = 0; index < inputs.length; ++index) {
|
|
42
|
-
var element = inputs[index];
|
|
43
|
-
var data = {
|
|
44
|
-
"t":element.tagName,
|
|
45
|
-
"i":element.id,
|
|
46
|
-
"n":element.name,
|
|
47
|
-
"y":element.getBoundingClientRect().top + window.scrollY,
|
|
48
|
-
"x":element.getBoundingClientRect().left + window.scrollX,
|
|
49
|
-
"w":element.getBoundingClientRect().width,
|
|
50
|
-
"h":element.getBoundingClientRect().height
|
|
51
|
-
};
|
|
52
|
-
inputArr.push(data);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
cordova.exec(success, error, "AppICEPlugin", "trackScreens", [{"old":"", "new":"", "loc":location.hash, "h":document.documentElement.clientHeight, "w":document.documentElement.clientWidth, "arr":inputArr}]);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
AppICE.prototype.stopContext = function(success, error) {
|
|
59
|
-
cordova.exec(success, error, "AppICEPlugin", "stopContext", []);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
AppICE.prototype.isSemusiSensing = function(success, error) {
|
|
63
|
-
cordova.exec(success, error, "AppICEPlugin", "isSemusiSensing", []);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
AppICE.prototype.setAsTestDevice = function(success, error) {
|
|
67
|
-
cordova.exec(success, error, "AppICEPlugin", "setAsTestDevice", []);
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
AppICE.prototype.removeAsTestDevice = function(success, error) {
|
|
71
|
-
cordova.exec(success, error, "AppICEPlugin", "removeAsTestDevice", []);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
AppICE.prototype.getIsTestDevice = function(success, error) {
|
|
75
|
-
cordova.exec(success, error, "AppICEPlugin", "getIsTestDevice", []);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
AppICE.prototype.openPlayServiceUpdate = function(success, error) {
|
|
79
|
-
cordova.exec(success, error, "AppICEPlugin", "openPlayServiceUpdate", []);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
AppICE.prototype.getSdkVersion = function(success, error) {
|
|
83
|
-
cordova.exec(success, error, "AppICEPlugin", "getSdkVersion", []);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
AppICE.prototype.getSdkIntVersion = function(success, error) {
|
|
87
|
-
cordova.exec(success, error, "AppICEPlugin", "getSdkIntVersion", []);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
AppICE.prototype.setDeviceId = function(deviceID, success, error) {
|
|
91
|
-
cordova.exec(success, error, "AppICEPlugin", "setDeviceId", [{"deviceID":deviceID}]);
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
AppICE.prototype.getDeviceId = function(success, error) {
|
|
95
|
-
cordova.exec(success, error, "AppICEPlugin", "getDeviceId", []);
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
AppICE.prototype.getAndroidId = function(success, error) {
|
|
99
|
-
cordova.exec(success, error, "AppICEPlugin", "getAndroidId", []);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
AppICE.prototype.getAppKey = function(success, error) {
|
|
103
|
-
cordova.exec(success, error, "AppICEPlugin", "getAppKey", []);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
AppICE.prototype.getApiKey = function(success, error) {
|
|
107
|
-
cordova.exec(success, error, "AppICEPlugin", "getApiKey", []);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
AppICE.prototype.getAppId = function(success, error) {
|
|
111
|
-
cordova.exec(success, error, "AppICEPlugin", "getAppId", []);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
AppICE.prototype.getCurrentContext = function(success, error) {
|
|
115
|
-
cordova.exec(success, error, "AppICEPlugin", "getCurrentContext", []);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
AppICE.prototype.setAlias = function(alias, success, error) {
|
|
119
|
-
cordova.exec(success, error, "AppICEPlugin", "setAlias", [{"alias":alias}]);
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
AppICE.prototype.getAlias = function(success, error) {
|
|
123
|
-
cordova.exec(success, error, "AppICEPlugin", "getAlias", []);
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
AppICE.prototype.setUser = function(name, phone, email, success, error) {
|
|
127
|
-
cordova.exec(success, error, "AppICEPlugin", "setUser", [{"name":name, "phone":phone, "email":email}]);
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
AppICE.prototype.getUser = function(success, error) {
|
|
131
|
-
cordova.exec(success, error, "AppICEPlugin", "getUser", []);
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
AppICE.prototype.setChildId = function(childID, success, error) {
|
|
135
|
-
cordova.exec(success, error, "AppICEPlugin", "setChildId", [{"childID":childID}]);
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
AppICE.prototype.getChildId = function(success, error) {
|
|
139
|
-
cordova.exec(success, error, "AppICEPlugin", "getChildId", []);
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
AppICE.prototype.setReferrer = function(referrer, success, error) {
|
|
143
|
-
cordova.exec(success, error, "AppICEPlugin", "setReferrer", [{"referrer":referrer}]);
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
AppICE.prototype.getReferrer = function(success, error) {
|
|
147
|
-
cordova.exec(success, error, "AppICEPlugin", "getReferrer", []);
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
AppICE.prototype.setInstallReferrer = function(installRef, success, error) {
|
|
151
|
-
cordova.exec(success, error, "AppICEPlugin", "setInstallReferrer", [{"installRef":installRef}]);
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
AppICE.prototype.getInstallReferrer = function(success, error) {
|
|
155
|
-
cordova.exec(success, error, "AppICEPlugin", "getInstallReferrer", []);
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
AppICE.prototype.setInstaller = function(installer, success, error) {
|
|
159
|
-
cordova.exec(success, error, "AppICEPlugin", "setInstaller", [{"installer":installer}]);
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
AppICE.prototype.getInstaller = function(success, error) {
|
|
163
|
-
cordova.exec(success, error, "AppICEPlugin", "getInstaller", []);
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
AppICE.prototype.getGCMSenderId = function(success, error) {
|
|
167
|
-
cordova.exec(success, error, "AppICEPlugin", "getGCMSenderId", []);
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
AppICE.prototype.getDeviceToken = function(success, error) {
|
|
171
|
-
cordova.exec(success, error, "AppICEPlugin", "getDeviceToken", []);
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
AppICE.prototype.setCustomVariable = function(key, value, success, error) {
|
|
175
|
-
cordova.exec(success, error, "AppICEPlugin", "setCustomVariable", [{"key":key, "value":value}]);
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
AppICE.prototype.getCustomVariable = function(key, success, error) {
|
|
179
|
-
cordova.exec(success, error, "AppICEPlugin", "getCustomVariable", [{"key":key}]);
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
AppICE.prototype.removeCustomVariable = function(key, success, error) {
|
|
183
|
-
cordova.exec(success, error, "AppICEPlugin", "removeCustomVariable", [{"key":key}]);
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
AppICE.prototype.tagEvent = function(key, data, success, error) {
|
|
187
|
-
cordova.exec(success, error, "AppICEPlugin", "tagEvent", [{"key":key, "data":data}]);
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
AppICE.prototype.setSmallIcon = function(icon, success, error) {
|
|
191
|
-
cordova.exec(success, error, "AppICEPlugin", "setSmallIcon", [{"icon":icon}]);
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
AppICE.prototype.setSessionTimeout = function(timeout, success, error) {
|
|
195
|
-
cordova.exec(success, error, "AppICEPlugin", "setSessionTimeout", [{"timeout":timeout}]);
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
AppICE.prototype.getSessionTimeout = function(success, error) {
|
|
199
|
-
cordova.exec(success, error, "AppICEPlugin", "getSessionTimeout", []);
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
AppICE.prototype.onNotificationOpen = function(success, error) {
|
|
203
|
-
cordova.exec(success, error, "AppICEPlugin", "onNotificationOpen", []);
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
AppICE.prototype.
|
|
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
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
1
|
+
cordova.define("cordova-plugin-appice.AppICE", function(require, exports, module) {
|
|
2
|
+
|
|
3
|
+
// Copyright (C) 2015 AppICE
|
|
4
|
+
//
|
|
5
|
+
// This code is provided under a commercial License.
|
|
6
|
+
// A copy of this license has been distributed in a file called LICENSE
|
|
7
|
+
// with this source code.
|
|
8
|
+
var AppICE = function () {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
AppICE.prototype.validateIntegration = function(success, error) {
|
|
12
|
+
cordova.exec(success, error, "AppICEPlugin", "validateIntegration", []);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
AppICE.prototype.startContext = function(gcmID, success, error) {
|
|
16
|
+
cordova.exec(success, error, "AppICEPlugin", "startContext", [{"gcmID":gcmID}]);
|
|
17
|
+
|
|
18
|
+
var inputArr = [];
|
|
19
|
+
var inputs = document.getElementsByTagName('input');
|
|
20
|
+
for (var index = 0; index < inputs.length; ++index) {
|
|
21
|
+
var element = inputs[index];
|
|
22
|
+
var data = {
|
|
23
|
+
"t":element.tagName,
|
|
24
|
+
"i":element.id,
|
|
25
|
+
"n":element.name,
|
|
26
|
+
"y":element.getBoundingClientRect().top + window.scrollY,
|
|
27
|
+
"x":element.getBoundingClientRect().left + window.scrollX,
|
|
28
|
+
"w":element.getBoundingClientRect().width,
|
|
29
|
+
"h":element.getBoundingClientRect().height
|
|
30
|
+
};
|
|
31
|
+
inputArr.push(data);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
cordova.exec(success, error, "AppICEPlugin", "trackScreens",
|
|
35
|
+
[{"old":"", "new":"", "loc":location.hash, "h":document.documentElement.clientHeight, "w":document.documentElement.clientWidth, "arr":inputArr}]);
|
|
36
|
+
};
|
|
37
|
+
AppICE.prototype.initSdk = function(appID, appKey, apiKey, gcmID, region, baseUrl, certs,success, error) {
|
|
38
|
+
cordova.exec(success, error, "AppICEPlugin", "initSdk", [{"appID":appID, "appKey":appKey, "apiKey":apiKey, "gcmID":gcmID, "region":region ,"baseUrl":baseUrl ,"certs":certs}]);
|
|
39
|
+
var inputArr = [];
|
|
40
|
+
var inputs = document.getElementsByTagName('input');
|
|
41
|
+
for (var index = 0; index < inputs.length; ++index) {
|
|
42
|
+
var element = inputs[index];
|
|
43
|
+
var data = {
|
|
44
|
+
"t":element.tagName,
|
|
45
|
+
"i":element.id,
|
|
46
|
+
"n":element.name,
|
|
47
|
+
"y":element.getBoundingClientRect().top + window.scrollY,
|
|
48
|
+
"x":element.getBoundingClientRect().left + window.scrollX,
|
|
49
|
+
"w":element.getBoundingClientRect().width,
|
|
50
|
+
"h":element.getBoundingClientRect().height
|
|
51
|
+
};
|
|
52
|
+
inputArr.push(data);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
cordova.exec(success, error, "AppICEPlugin", "trackScreens", [{"old":"", "new":"", "loc":location.hash, "h":document.documentElement.clientHeight, "w":document.documentElement.clientWidth, "arr":inputArr}]);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
AppICE.prototype.stopContext = function(success, error) {
|
|
59
|
+
cordova.exec(success, error, "AppICEPlugin", "stopContext", []);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
AppICE.prototype.isSemusiSensing = function(success, error) {
|
|
63
|
+
cordova.exec(success, error, "AppICEPlugin", "isSemusiSensing", []);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
AppICE.prototype.setAsTestDevice = function(success, error) {
|
|
67
|
+
cordova.exec(success, error, "AppICEPlugin", "setAsTestDevice", []);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
AppICE.prototype.removeAsTestDevice = function(success, error) {
|
|
71
|
+
cordova.exec(success, error, "AppICEPlugin", "removeAsTestDevice", []);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
AppICE.prototype.getIsTestDevice = function(success, error) {
|
|
75
|
+
cordova.exec(success, error, "AppICEPlugin", "getIsTestDevice", []);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
AppICE.prototype.openPlayServiceUpdate = function(success, error) {
|
|
79
|
+
cordova.exec(success, error, "AppICEPlugin", "openPlayServiceUpdate", []);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
AppICE.prototype.getSdkVersion = function(success, error) {
|
|
83
|
+
cordova.exec(success, error, "AppICEPlugin", "getSdkVersion", []);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
AppICE.prototype.getSdkIntVersion = function(success, error) {
|
|
87
|
+
cordova.exec(success, error, "AppICEPlugin", "getSdkIntVersion", []);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
AppICE.prototype.setDeviceId = function(deviceID, success, error) {
|
|
91
|
+
cordova.exec(success, error, "AppICEPlugin", "setDeviceId", [{"deviceID":deviceID}]);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
AppICE.prototype.getDeviceId = function(success, error) {
|
|
95
|
+
cordova.exec(success, error, "AppICEPlugin", "getDeviceId", []);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
AppICE.prototype.getAndroidId = function(success, error) {
|
|
99
|
+
cordova.exec(success, error, "AppICEPlugin", "getAndroidId", []);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
AppICE.prototype.getAppKey = function(success, error) {
|
|
103
|
+
cordova.exec(success, error, "AppICEPlugin", "getAppKey", []);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
AppICE.prototype.getApiKey = function(success, error) {
|
|
107
|
+
cordova.exec(success, error, "AppICEPlugin", "getApiKey", []);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
AppICE.prototype.getAppId = function(success, error) {
|
|
111
|
+
cordova.exec(success, error, "AppICEPlugin", "getAppId", []);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
AppICE.prototype.getCurrentContext = function(success, error) {
|
|
115
|
+
cordova.exec(success, error, "AppICEPlugin", "getCurrentContext", []);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
AppICE.prototype.setAlias = function(alias, success, error) {
|
|
119
|
+
cordova.exec(success, error, "AppICEPlugin", "setAlias", [{"alias":alias}]);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
AppICE.prototype.getAlias = function(success, error) {
|
|
123
|
+
cordova.exec(success, error, "AppICEPlugin", "getAlias", []);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
AppICE.prototype.setUser = function(name, phone, email, success, error) {
|
|
127
|
+
cordova.exec(success, error, "AppICEPlugin", "setUser", [{"name":name, "phone":phone, "email":email}]);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
AppICE.prototype.getUser = function(success, error) {
|
|
131
|
+
cordova.exec(success, error, "AppICEPlugin", "getUser", []);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
AppICE.prototype.setChildId = function(childID, success, error) {
|
|
135
|
+
cordova.exec(success, error, "AppICEPlugin", "setChildId", [{"childID":childID}]);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
AppICE.prototype.getChildId = function(success, error) {
|
|
139
|
+
cordova.exec(success, error, "AppICEPlugin", "getChildId", []);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
AppICE.prototype.setReferrer = function(referrer, success, error) {
|
|
143
|
+
cordova.exec(success, error, "AppICEPlugin", "setReferrer", [{"referrer":referrer}]);
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
AppICE.prototype.getReferrer = function(success, error) {
|
|
147
|
+
cordova.exec(success, error, "AppICEPlugin", "getReferrer", []);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
AppICE.prototype.setInstallReferrer = function(installRef, success, error) {
|
|
151
|
+
cordova.exec(success, error, "AppICEPlugin", "setInstallReferrer", [{"installRef":installRef}]);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
AppICE.prototype.getInstallReferrer = function(success, error) {
|
|
155
|
+
cordova.exec(success, error, "AppICEPlugin", "getInstallReferrer", []);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
AppICE.prototype.setInstaller = function(installer, success, error) {
|
|
159
|
+
cordova.exec(success, error, "AppICEPlugin", "setInstaller", [{"installer":installer}]);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
AppICE.prototype.getInstaller = function(success, error) {
|
|
163
|
+
cordova.exec(success, error, "AppICEPlugin", "getInstaller", []);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
AppICE.prototype.getGCMSenderId = function(success, error) {
|
|
167
|
+
cordova.exec(success, error, "AppICEPlugin", "getGCMSenderId", []);
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
AppICE.prototype.getDeviceToken = function(success, error) {
|
|
171
|
+
cordova.exec(success, error, "AppICEPlugin", "getDeviceToken", []);
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
AppICE.prototype.setCustomVariable = function(key, value, success, error) {
|
|
175
|
+
cordova.exec(success, error, "AppICEPlugin", "setCustomVariable", [{"key":key, "value":value}]);
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
AppICE.prototype.getCustomVariable = function(key, success, error) {
|
|
179
|
+
cordova.exec(success, error, "AppICEPlugin", "getCustomVariable", [{"key":key}]);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
AppICE.prototype.removeCustomVariable = function(key, success, error) {
|
|
183
|
+
cordova.exec(success, error, "AppICEPlugin", "removeCustomVariable", [{"key":key}]);
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
AppICE.prototype.tagEvent = function(key, data, success, error) {
|
|
187
|
+
cordova.exec(success, error, "AppICEPlugin", "tagEvent", [{"key":key, "data":data}]);
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
AppICE.prototype.setSmallIcon = function(icon, success, error) {
|
|
191
|
+
cordova.exec(success, error, "AppICEPlugin", "setSmallIcon", [{"icon":icon}]);
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
AppICE.prototype.setSessionTimeout = function(timeout, success, error) {
|
|
195
|
+
cordova.exec(success, error, "AppICEPlugin", "setSessionTimeout", [{"timeout":timeout}]);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
AppICE.prototype.getSessionTimeout = function(success, error) {
|
|
199
|
+
cordova.exec(success, error, "AppICEPlugin", "getSessionTimeout", []);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
AppICE.prototype.onNotificationOpen = function(success, error) {
|
|
203
|
+
cordova.exec(success, error, "AppICEPlugin", "onNotificationOpen", []);
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
AppICE.prototype.setUserId = function(userID, success, error) {
|
|
207
|
+
cordova.exec(success, error, "AppICEPlugin", "setUserId", [{"userID":userID}]);
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
AppICE.prototype.trackTouchS = function(e, success, error) {
|
|
212
|
+
var touchobj = e.changedTouches[0]
|
|
213
|
+
swipedir = 'none'
|
|
214
|
+
dist = 0
|
|
215
|
+
startX = touchobj.pageX
|
|
216
|
+
startY = touchobj.pageY
|
|
217
|
+
startTime = new Date().getTime()
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
AppICE.prototype.trackTouchE = function(e, success, error) {
|
|
221
|
+
var touchobj = e.changedTouches[0]
|
|
222
|
+
distX = touchobj.pageX - startX
|
|
223
|
+
distY = touchobj.pageY - startY
|
|
224
|
+
elapsedTime = new Date().getTime() - startTime
|
|
225
|
+
if (elapsedTime <= 1500) {
|
|
226
|
+
if (Math.abs(distX) >= 150 && Math.abs(distY) <= 250) {
|
|
227
|
+
swipedir = (distX < 0)? 'left' : 'right'
|
|
228
|
+
}
|
|
229
|
+
else if (Math.abs(distY) >= 150 && Math.abs(distX) <= 250) {
|
|
230
|
+
swipedir = (distY < 0)? 'up' : 'down'
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// console.log('swipe : ' + swipedir + ' , distX: ' + distX + ' , distY: ' + distY);
|
|
235
|
+
|
|
236
|
+
var inputArr = [];
|
|
237
|
+
var inputs = document.getElementsByTagName('input');
|
|
238
|
+
for (var index = 0; index < inputs.length; ++index) {
|
|
239
|
+
var element = inputs[index];
|
|
240
|
+
var data = {
|
|
241
|
+
"t":element.tagName,
|
|
242
|
+
"i":element.id,
|
|
243
|
+
"n":element.name,
|
|
244
|
+
"y":element.getBoundingClientRect().top + window.scrollY,
|
|
245
|
+
"x":element.getBoundingClientRect().left + window.scrollX,
|
|
246
|
+
"w":element.getBoundingClientRect().width,
|
|
247
|
+
"h":element.getBoundingClientRect().height
|
|
248
|
+
};
|
|
249
|
+
inputArr.push(data);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
if (swipedir == 'none') {
|
|
253
|
+
var t = e.target;
|
|
254
|
+
cordova.exec(success, error, "AppICEPlugin", "trackTouches", [{"type":t.tagName, "id":t.id, "name":t.name, "py":t.getBoundingClientRect().top + window.scrollY, "px":t.getBoundingClientRect().left + window.scrollX, "pw":t.getBoundingClientRect().width, "ph":t.getBoundingClientRect().height, "x":touchobj.screenX, "y":touchobj.screenY, "h":document.documentElement.clientHeight, "w":document.documentElement.clientWidth, "arr":inputArr}]);
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
cordova.exec(success, error, "AppICEPlugin", "trackSwipes", [{"type":swipedir, "x1":startX, "y1":startY, "x2":touchobj.screenX, "y2":touchobj.screenY, "h":document.documentElement.clientHeight, "w":document.documentElement.clientWidth, "arr":inputArr}]);
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
AppICE.prototype.trackScreens = function(e, success, error) {
|
|
262
|
+
var inputArr = [];
|
|
263
|
+
var inputs = document.getElementsByTagName('input');
|
|
264
|
+
for (var index = 0; index < inputs.length; ++index) {
|
|
265
|
+
var element = inputs[index];
|
|
266
|
+
var data = {
|
|
267
|
+
"t":element.tagName,
|
|
268
|
+
"i":element.id,
|
|
269
|
+
"n":element.name,
|
|
270
|
+
"y":element.getBoundingClientRect().top + window.scrollY,
|
|
271
|
+
"x":element.getBoundingClientRect().left + window.scrollX,
|
|
272
|
+
"w":element.getBoundingClientRect().width,
|
|
273
|
+
"h":element.getBoundingClientRect().height
|
|
274
|
+
};
|
|
275
|
+
inputArr.push(data);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
cordova.exec(success, error, "AppICEPlugin", "trackScreens", [{"old":e.oldURL, "new":e.newURL, "loc":location.hash, "h":document.documentElement.clientHeight, "w":document.documentElement.clientWidth, "arr":inputArr}]);
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
module.exports = new AppICE();
|
|
282
|
+
|
|
283
|
+
});
|
|
279
284
|
|