cordova-plugin-mserviceinterface-2.0 1.0.44 → 1.0.46
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 +5 -5
- package/src/android/mInterface.java +16 -1
package/package.json
CHANGED
package/plugin.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
3
3
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
4
|
id="cordova-plugin-mserviceinterface-2.0"
|
|
5
|
-
version="1.0.
|
|
5
|
+
version="1.0.46">
|
|
6
6
|
<name>mserviceinterface-2.0</name>
|
|
7
7
|
<description>This plugin establishes the connection to the native interface and performs the requested task.</description>
|
|
8
8
|
<author>selfservit@gmail.com</author>
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
</js-module>
|
|
20
20
|
<platform name="android">
|
|
21
21
|
<framework src="src/android/doubleogradle.gradle" custom="true" type="gradleReference"/>
|
|
22
|
-
|
|
22
|
+
<framework src="com.google.android.gms:play-services-location:20.0.0" />
|
|
23
23
|
<framework src="com.android.support:support-v4:28.0.0" />
|
|
24
|
-
<framework src="com.google.zxing:core:3.2
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
<framework src="com.google.zxing:core:3.3.2" />
|
|
25
|
+
<framework src="com.journeyapps:zxing-android-embedded:3.6.0@aar" />
|
|
26
|
+
<framework src="id.zelory:compressor:2.1.1" />
|
|
27
27
|
<edit-config xmlns:android="http://schemas.android.com/apk/res/android" file="AndroidManifest.xml" mode="merge" target="/manifest/application">
|
|
28
28
|
<application android:networkSecurityConfig="@xml/network_security_config" />
|
|
29
29
|
<application android:requestLegacyExternalStorage="true" />
|
|
@@ -60,6 +60,7 @@ import com.google.android.gms.location.LocationSettingsStatusCodes;
|
|
|
60
60
|
import com.google.android.gms.tasks.Task;
|
|
61
61
|
import com.google.zxing.integration.android.IntentIntegrator;
|
|
62
62
|
import com.google.zxing.integration.android.IntentResult;
|
|
63
|
+
import com.onesignal.OSDeviceState;
|
|
63
64
|
import com.onesignal.OneSignal;
|
|
64
65
|
|
|
65
66
|
import org.apache.cordova.CallbackContext;
|
|
@@ -205,6 +206,20 @@ public class mInterface extends CordovaPlugin implements com.google.android.gms.
|
|
|
205
206
|
System.out.println("Exception is: " + e.getMessage());
|
|
206
207
|
callbackContext.error(e.getMessage());
|
|
207
208
|
}
|
|
209
|
+
}else if (action.equals("GetFCMUtils")) {
|
|
210
|
+
try {
|
|
211
|
+
OSDeviceState device = OneSignal.getDeviceState();
|
|
212
|
+
String userId = device.getUserId();
|
|
213
|
+
//Get device's push token identifier
|
|
214
|
+
String pushToken = device.getPushToken();
|
|
215
|
+
JSONObject progressObj = new JSONObject();
|
|
216
|
+
progressObj.put("userId", userId);
|
|
217
|
+
progressObj.put("pushToken", pushToken);
|
|
218
|
+
callbackContext.success(progressObj);
|
|
219
|
+
} catch (Exception e) {
|
|
220
|
+
System.out.println("Exception is: " + e.getMessage());
|
|
221
|
+
callbackContext.error(e.getMessage());
|
|
222
|
+
}
|
|
208
223
|
} else if (action.equals("GetSyncIndicator")) {
|
|
209
224
|
try {
|
|
210
225
|
File newQueueFolder, oldQueueFolder;
|
|
@@ -931,7 +946,7 @@ public class mInterface extends CordovaPlugin implements com.google.android.gms.
|
|
|
931
946
|
callback = callbackContext;
|
|
932
947
|
SCANCODEINT = 118;
|
|
933
948
|
IntentIntegrator integrator = new IntentIntegrator(this.cordova.getActivity());
|
|
934
|
-
integrator.setDesiredBarcodeFormats(IntentIntegrator.
|
|
949
|
+
integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE);
|
|
935
950
|
integrator.setPrompt("Scan");
|
|
936
951
|
integrator.setCameraId(0);
|
|
937
952
|
integrator.setBeepEnabled(true);
|