cordova-plugin-mserviceinterface-2.0 1.0.59 → 1.0.61
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
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.61">
|
|
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>
|
|
@@ -1611,6 +1611,8 @@ public class mInterface extends CordovaPlugin implements com.google.android.gms.
|
|
|
1611
1611
|
case LOCATION_ACCURACY_REQUEST_NEW:
|
|
1612
1612
|
switch (resultCode) {
|
|
1613
1613
|
case Activity.RESULT_OK:
|
|
1614
|
+
mInterfaceService mInterfaceService = new mInterfaceService();
|
|
1615
|
+
mInterfaceService.startLocationUpdates(cordova.getContext());
|
|
1614
1616
|
callback.success();
|
|
1615
1617
|
break;
|
|
1616
1618
|
case Activity.RESULT_CANCELED:
|
|
@@ -239,11 +239,11 @@ public class mInterfaceService extends Service implements com.google.android.gms
|
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
protected void startLocationUpdates() {
|
|
242
|
+
protected void startLocationUpdates(Context context) {
|
|
243
243
|
boolean isPermissionGranted;
|
|
244
244
|
try {
|
|
245
245
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
246
|
-
if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
|
246
|
+
if (context.checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
|
247
247
|
isPermissionGranted = false;
|
|
248
248
|
}else{
|
|
249
249
|
isPermissionGranted = true;
|
|
@@ -312,7 +312,7 @@ public class mInterfaceService extends Service implements com.google.android.gms
|
|
|
312
312
|
public void onConnected(@Nullable Bundle bundle) {
|
|
313
313
|
try {
|
|
314
314
|
if (mGoogleApiClient.isConnected()) {
|
|
315
|
-
startLocationUpdates();
|
|
315
|
+
startLocationUpdates(mInterfaceService.this);
|
|
316
316
|
}
|
|
317
317
|
} catch (Exception e) {
|
|
318
318
|
e.printStackTrace();
|
|
@@ -423,7 +423,7 @@ public class mInterfaceService extends Service implements com.google.android.gms
|
|
|
423
423
|
locationUpdateInd = "true";
|
|
424
424
|
mInterfaceUtil.timerInd = "running";
|
|
425
425
|
if (mGoogleApiClient.isConnected()) {
|
|
426
|
-
startLocationUpdates();
|
|
426
|
+
startLocationUpdates(mInterfaceService.this);
|
|
427
427
|
}
|
|
428
428
|
} catch (Exception e) {
|
|
429
429
|
e.printStackTrace();
|
package/src/ios/mInterface.h
CHANGED
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
//- (void)AuthenticationRefresh;
|
|
108
108
|
//- (void)triggerAuthenticationServices:(NSString *)clientId countryCode:(NSString *)countryCode userId:(NSString *)userId sessionId:(NSString *)sessionId localeId:(NSString *)localeId deviceID:(NSString *)deviceID clientUrl:(NSString *)clientUrl cvsUrl:(NSString *)cvsUrl authIndFilePath:(NSString *)authIndFilePath;
|
|
109
109
|
- (void)GetSyncIndicator:(CDVInvokedUrlCommand*)command;
|
|
110
|
+
- (void)CopyAttachmentFile:(CDVInvokedUrlCommand*)command;
|
|
110
111
|
@property (strong, nonatomic) CLLocationManager * locationManager;
|
|
111
112
|
@property (strong, nonatomic) NSMutableArray * coordinatesArray;
|
|
112
113
|
@property (weak, nonatomic) IBOutlet UIButton *btnGallery;
|
package/src/ios/mInterface.m
CHANGED
|
@@ -1308,7 +1308,7 @@
|
|
|
1308
1308
|
}];
|
|
1309
1309
|
}
|
|
1310
1310
|
|
|
1311
|
-
- (void)
|
|
1311
|
+
- (void)CopyAttachmentFile:(CDVInvokedUrlCommand*)command {
|
|
1312
1312
|
[self.commandDelegate runInBackground:^{
|
|
1313
1313
|
@try {
|
|
1314
1314
|
for(int index = 0; index < [[command arguments] count]; index++) {
|