cordova-plugin-mserviceinterface-2.0 1.0.58 → 1.0.59
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 +1 -1
- package/src/android/mInterface.java +6 -1
- package/src/ios/mInterface.m +1 -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.59">
|
|
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);
|
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
|
}
|