@glympse-inc/com.glympse.enroute 2.108.288 → 2.109.289
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/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/android/EnRoutePlugin.java +29 -0
- package/src/android/gradle/build.gradle +1 -1
- package/src/ios/EnRoutePlugin.h +2 -0
- package/src/ios/EnRoutePlugin.mm +15 -0
- package/www/Native.js +4 -0
- package/www/OrgConfig.js +5 -0
- package/www/Task.js +5 -0
- package/www/TaskManager.js +16 -0
package/package.json
CHANGED
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" id="com.glympse.enroute" version="2.
|
|
2
|
+
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" id="com.glympse.enroute" version="2.109.289">
|
|
3
3
|
|
|
4
4
|
<name>Glympse En Route</name>
|
|
5
5
|
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
<source url="https://github.com/CocoaPods/Specs.git"/>
|
|
237
237
|
</config>
|
|
238
238
|
<pods use-frameworks="true">
|
|
239
|
-
<pod name="EnRouteApi" spec="~> 2.
|
|
239
|
+
<pod name="EnRouteApi" spec="~> 2.109.289"/>
|
|
240
240
|
</pods>
|
|
241
241
|
</podspec>
|
|
242
242
|
<!-- RELEASE END -->
|
|
@@ -181,6 +181,11 @@ public class EnRoutePlugin extends CordovaPlugin implements GListener
|
|
|
181
181
|
addOrUpdateMetadataItem(args, callbackContext);
|
|
182
182
|
return true;
|
|
183
183
|
}
|
|
184
|
+
else if (action.equals("updateConfirmationImages"))
|
|
185
|
+
{
|
|
186
|
+
updateConfirmationImages(args, callbackContext);
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
184
189
|
else if (action.equals("setTravelModeForTask"))
|
|
185
190
|
{
|
|
186
191
|
setTravelModeForTask(args, callbackContext);
|
|
@@ -926,6 +931,30 @@ public class EnRoutePlugin extends CordovaPlugin implements GListener
|
|
|
926
931
|
manager.getTaskManager().addOrUpdateMetadataItem(task, key, valuePrim);
|
|
927
932
|
}
|
|
928
933
|
|
|
934
|
+
private synchronized void updateConfirmationImages(final JSONArray args, final CallbackContext callbackContext)
|
|
935
|
+
{
|
|
936
|
+
long taskId = -1;
|
|
937
|
+
GPrimitive confirmationImages = null;
|
|
938
|
+
|
|
939
|
+
try
|
|
940
|
+
{
|
|
941
|
+
taskId = args.getLong(0);
|
|
942
|
+
String valueString = args.getString(1);
|
|
943
|
+
confirmationImages = CoreTools.stringToPrimitive(valueString);
|
|
944
|
+
}
|
|
945
|
+
catch (JSONException e)
|
|
946
|
+
{
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
if ( null == confirmationImages )
|
|
950
|
+
{
|
|
951
|
+
return;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
GEnRouteManager manager = ManagerWrapper.instance().manager();
|
|
955
|
+
manager.getTaskManager().updateTaskConfirmationImages(taskId, confirmationImages);
|
|
956
|
+
}
|
|
957
|
+
|
|
929
958
|
private synchronized void setTravelModeForTask(final JSONArray args, final CallbackContext callbackContext)
|
|
930
959
|
{
|
|
931
960
|
GEnRouteManager manager = ManagerWrapper.instance().manager();
|
|
@@ -17,7 +17,7 @@ android {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
dependencies {
|
|
20
|
-
def GLYMPSE_VERSION = '2.
|
|
20
|
+
def GLYMPSE_VERSION = '2.109.289'
|
|
21
21
|
implementation "com.glympse:enrouteapi:$GLYMPSE_VERSION"
|
|
22
22
|
implementation "com.glympse:glympseapi:$GLYMPSE_VERSION"
|
|
23
23
|
implementation "com.glympse:glympseapi-push:$GLYMPSE_VERSION"
|
package/src/ios/EnRoutePlugin.h
CHANGED
|
@@ -72,6 +72,8 @@
|
|
|
72
72
|
|
|
73
73
|
- (void) addOrUpdateMetadataItem:(CDVInvokedUrlCommand *)command;
|
|
74
74
|
|
|
75
|
+
- (void) updateConfirmationImages:(CDVInvokedUrlCommand *)command;
|
|
76
|
+
|
|
75
77
|
- (void) sendMessageToTask:(CDVInvokedUrlCommand *)command;
|
|
76
78
|
|
|
77
79
|
- (void) markTaskMessagesAsRead:(CDVInvokedUrlCommand *)command;
|
package/src/ios/EnRoutePlugin.mm
CHANGED
|
@@ -468,6 +468,21 @@
|
|
|
468
468
|
[EnRouteWrapper instance].manager->getTaskManager()->addOrUpdateMetadataItem(task, keyString, valuePrim);
|
|
469
469
|
}
|
|
470
470
|
|
|
471
|
+
- (void) updateConfirmationImages:(CDVInvokedUrlCommand *)command
|
|
472
|
+
{
|
|
473
|
+
Glympse::int64 taskId = [[command argumentAtIndex:0] longLongValue];
|
|
474
|
+
NSString *value = (NSString *)[command argumentAtIndex:1];
|
|
475
|
+
Glympse::GString valueString = [GETHelpers toGString:value];
|
|
476
|
+
Glympse::GPrimitive confirmationImages = Glympse::CoreTools::stringToPrimitive(valueString);
|
|
477
|
+
|
|
478
|
+
if ( NULL == confirmationImages )
|
|
479
|
+
{
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
[EnRouteWrapper instance].manager->getTaskManager()->updateTaskConfirmationImages(taskId, confirmationImages);
|
|
484
|
+
}
|
|
485
|
+
|
|
471
486
|
- (void) setTravelModeForTask:(CDVInvokedUrlCommand *)command
|
|
472
487
|
{
|
|
473
488
|
Glympse::int64 taskId = [[command argumentAtIndex:0] longLongValue];
|
package/www/Native.js
CHANGED
|
@@ -96,6 +96,10 @@ module.exports = {
|
|
|
96
96
|
cordova.exec(successCallback, errorCallback, "EnRoutePlugin", "addOrUpdateMetadataItem", [taskId, key, value]);
|
|
97
97
|
},
|
|
98
98
|
|
|
99
|
+
updateConfirmationImages: function (taskId, imagesData, successCallback, errorCallback) {
|
|
100
|
+
cordova.exec(successCallback, errorCallback, "EnRoutePlugin", "updateConfirmationImages", [taskId, imagesData]);
|
|
101
|
+
},
|
|
102
|
+
|
|
99
103
|
setTravelModeForTask: function(taskId, travelMode, successCallback, errorCallback) {
|
|
100
104
|
cordova.exec(successCallback, errorCallback, "EnRoutePlugin", "setTravelModeForTask", [taskId, travelMode]);
|
|
101
105
|
},
|
package/www/OrgConfig.js
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
this._keepLocationAlive = data.keepLocationAlive;
|
|
14
14
|
this._etaQueryPeriod = data.etaQueryPeriod;
|
|
15
15
|
this._stopDuration = data.stopDuration;
|
|
16
|
+
this._isSessionReturnTripEnabled = data.isSessionReturnTripEnabled;
|
|
16
17
|
this._activeSessionTimeout = data.activeSessionTimeout;
|
|
17
18
|
this._sessionControlMode = data.sessionControlMode;
|
|
18
19
|
this._routingEnabled = data.routingEnabled;
|
|
@@ -95,6 +96,10 @@
|
|
|
95
96
|
return this._stopDuration;
|
|
96
97
|
};
|
|
97
98
|
|
|
99
|
+
OrgConfig.prototype.isSessionReturnTripEnabled = function() {
|
|
100
|
+
return this._isSessionReturnTripEnabled;
|
|
101
|
+
};
|
|
102
|
+
|
|
98
103
|
OrgConfig.prototype.getActiveSessionTimeout = function() {
|
|
99
104
|
return this._activeSessionTimeout;
|
|
100
105
|
};
|
package/www/Task.js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
this._phase = data.phase;
|
|
18
18
|
this._foreignId = data.foreignId;
|
|
19
19
|
this._metadata = data.metadata;
|
|
20
|
+
this._confirmationImages = data.confirmationImages;
|
|
20
21
|
this._cardId = data.cardId;
|
|
21
22
|
this._travelMode = data.travelMode;
|
|
22
23
|
this._messages = [];
|
|
@@ -88,6 +89,10 @@
|
|
|
88
89
|
return this._metadata;
|
|
89
90
|
};
|
|
90
91
|
|
|
92
|
+
Task.prototype.getConfirmationImages = function() {
|
|
93
|
+
return this._confirmationImages;
|
|
94
|
+
};
|
|
95
|
+
|
|
91
96
|
Task.prototype.getCardId = function() {
|
|
92
97
|
return this._cardId;
|
|
93
98
|
};
|
package/www/TaskManager.js
CHANGED
|
@@ -173,6 +173,11 @@
|
|
|
173
173
|
spreadEvent('taskCreateFailed', [taskData, error]);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
function spreadTaskImagesUpdated(taskId) {
|
|
177
|
+
console.log("[TaskManager] spreadTaskImagesUpdated");
|
|
178
|
+
spreadEvent('taskImagesUpdated', [taskId]);
|
|
179
|
+
}
|
|
180
|
+
|
|
176
181
|
function spreadEvent(event, params) {
|
|
177
182
|
// console.log("spreadEvent");
|
|
178
183
|
if (_listeners) {
|
|
@@ -420,6 +425,17 @@
|
|
|
420
425
|
Native.addOrUpdateMetadataItem(task.getId(), key, value, _noop, _noop);
|
|
421
426
|
},
|
|
422
427
|
|
|
428
|
+
/**
|
|
429
|
+
* @param taskId Long id of the Task to update
|
|
430
|
+
* @param imagesArray image properties as a JSON formatted string
|
|
431
|
+
*/
|
|
432
|
+
updateConfirmationImages: function(taskId, imagesArray) {
|
|
433
|
+
Native.updateConfirmationImages(taskId, imagesArray, _noop, _noop);
|
|
434
|
+
refreshState(false, function() {
|
|
435
|
+
spreadTaskImagesUpdated(taskId);
|
|
436
|
+
});
|
|
437
|
+
},
|
|
438
|
+
|
|
423
439
|
/**
|
|
424
440
|
* @param task Task object to update
|
|
425
441
|
* @param travelMode String of the travel mode to use
|