cordova-plugin-mserviceinterface-2.0 1.0.58 → 1.0.60
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.60">
|
|
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>
|
|
@@ -662,7 +662,12 @@ public class mInterface extends CordovaPlugin implements com.google.android.gms.
|
|
|
662
662
|
callbackContext.error("failure");
|
|
663
663
|
} else if (action.equals("OpenFileWithViewer")) {
|
|
664
664
|
Context context = cordova.getActivity().getApplicationContext();
|
|
665
|
-
String filePath =
|
|
665
|
+
String filePath = "";
|
|
666
|
+
if (args.optString(0).contains("Android/data/com.selfservit.doubleo/files/")) {
|
|
667
|
+
filePath = mInterfaceUtil.rootDirectory + "/" + (args.optString(0).replace("Android/data/com.selfservit.doubleo/files/",""));
|
|
668
|
+
} else {
|
|
669
|
+
filePath = mInterfaceUtil.rootDirectory + "/" + args.optString(0);
|
|
670
|
+
}
|
|
666
671
|
File imageFilePath = new File(filePath);
|
|
667
672
|
try {
|
|
668
673
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
|
@@ -1606,6 +1611,8 @@ public class mInterface extends CordovaPlugin implements com.google.android.gms.
|
|
|
1606
1611
|
case LOCATION_ACCURACY_REQUEST_NEW:
|
|
1607
1612
|
switch (resultCode) {
|
|
1608
1613
|
case Activity.RESULT_OK:
|
|
1614
|
+
mInterfaceService mInterfaceService = new mInterfaceService();
|
|
1615
|
+
mInterfaceService.startLocationUpdates(cordova.getContext());
|
|
1609
1616
|
callback.success();
|
|
1610
1617
|
break;
|
|
1611
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
|
@@ -2031,7 +2031,7 @@
|
|
|
2031
2031
|
{
|
|
2032
2032
|
ALAssetRepresentation *imageRep = [imageAsset defaultRepresentation];
|
|
2033
2033
|
NSString* directory = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
|
|
2034
|
-
NSString *dest = [NSString stringWithFormat:@"%@/%@/%@",directory,[self GetAppName],@"
|
|
2034
|
+
NSString *dest = [NSString stringWithFormat:@"%@/%@/%@",directory,[self GetAppName],@"images"];
|
|
2035
2035
|
if (![[NSFileManager defaultManager] fileExistsAtPath:dest]){
|
|
2036
2036
|
[[NSFileManager defaultManager] createDirectoryAtPath:dest withIntermediateDirectories:YES attributes:nil error:nil];
|
|
2037
2037
|
}
|