@glympse-inc/com.glympse.enroute 2.105.237 → 2.106.239

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glympse-inc/com.glympse.enroute",
3
- "version": "2.105.237",
3
+ "version": "2.106.239",
4
4
  "description": "Glympse En Route Cordova Plugin",
5
5
  "cordova": {
6
6
  "id": "com.glympse.enroute",
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.105.237">
2
+ <plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" id="com.glympse.enroute" version="2.106.239">
3
3
 
4
4
  <name>Glympse En Route</name>
5
5
 
@@ -240,7 +240,7 @@
240
240
  <source url="https://github.com/CocoaPods/Specs.git"/>
241
241
  </config>
242
242
  <pods use-frameworks="true">
243
- <pod name="EnRouteApi" spec="~> 2.105.236"/>
243
+ <pod name="EnRouteApi" spec="~> 2.106.237"/>
244
244
  </pods>
245
245
  </podspec>
246
246
  <!-- RELEASE END -->
@@ -83,6 +83,11 @@ public class EnRoutePlugin extends CordovaPlugin implements GListener
83
83
  setFetchCompletedTasks(args, callbackContext);
84
84
  return true;
85
85
  }
86
+ if (action.equals("setForegroundNotificationMessage"))
87
+ {
88
+ setForegroundNotificationMessage(args, callbackContext);
89
+ return true;
90
+ }
86
91
  if (action.equals("registerDeviceToken"))
87
92
  {
88
93
  registerDeviceToken(args, callbackContext);
@@ -389,6 +394,21 @@ public class EnRoutePlugin extends CordovaPlugin implements GListener
389
394
  manager.getTaskManager().setFetchCompletedTasks(enabled);
390
395
  }
391
396
 
397
+ private synchronized void setForegroundNotificationMessage(final JSONArray args, final CallbackContext callbackContext)
398
+ {
399
+ GEnRouteManager manager = ManagerWrapper.instance().manager();
400
+
401
+ String message = null;
402
+ try
403
+ {
404
+ message = args.getString(0);
405
+ }
406
+ catch (JSONException e)
407
+ {
408
+ }
409
+ manager.setForegroundNotificationMessage(message);
410
+ }
411
+
392
412
  private synchronized void registerDeviceToken(final JSONArray args, final CallbackContext callbackContext)
393
413
  {
394
414
  GEnRouteManager manager = ManagerWrapper.instance().manager();
@@ -17,7 +17,7 @@ android {
17
17
  }
18
18
 
19
19
  dependencies {
20
- def GLYMPSE_VERSION = '2.105.236'
20
+ def GLYMPSE_VERSION = '2.106.237'
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"
@@ -96,6 +96,8 @@
96
96
 
97
97
  - (void) setFetchCompletedTasks:(CDVInvokedUrlCommand *)command;
98
98
 
99
+ - (void) setForegroundNotificationMessage:(CDVInvokedUrlCommand *)command;
100
+
99
101
  - (void) refreshPickups:(CDVInvokedUrlCommand *)command;
100
102
 
101
103
  - (void) setPickupPhase:(CDVInvokedUrlCommand *)command;
@@ -720,6 +720,11 @@
720
720
  [EnRouteWrapper instance].manager->getTaskManager()->setFetchCompletedTasks(enabled);
721
721
  }
722
722
 
723
+ - (void) setForegroundNotificationMessage:(CDVInvokedUrlCommand *)command
724
+ {
725
+ // No effect on iOS
726
+ }
727
+
723
728
  - (void) refreshPickups:(CDVInvokedUrlCommand *)command
724
729
  {
725
730
  [_cordovaCommands setObject:command forKey:COMMAND_KEY_REFRESH_PICKUPS];
@@ -608,6 +608,10 @@
608
608
  Native.checkCellularDataAvailable(successCallback, errorCallback);
609
609
  },
610
610
 
611
+ setForegroundNotificationMessage: function(message) {
612
+ Native.setForegroundNotificationMessage(message);
613
+ },
614
+
611
615
  AUTH_MODE_NONE: AUTH_MODE_NONE,
612
616
  AUTH_MODE_CREDENTIALS: AUTH_MODE_CREDENTIALS,
613
617
  AUTH_MODE_TOKEN: AUTH_MODE_TOKEN
package/www/Native.js CHANGED
@@ -153,6 +153,10 @@ module.exports = {
153
153
  cordova.exec(successCallback, errorCallback, "EnRoutePlugin", "setFetchCompletedTasks", [enabled]);
154
154
  },
155
155
 
156
+ setForegroundNotificationMessage: function (message, successCallback, errorCallback) {
157
+ cordova.exec(successCallback, errorCallback, "EnRoutePlugin", "setForegroundNotificationMessage", [message]);
158
+ },
159
+
156
160
  refreshPickups: function (successCallback, errorCallback) {
157
161
  cordova.exec(successCallback, errorCallback, "EnRoutePlugin", "refreshPickups", []);
158
162
  },