Merge pull request #3918 from dpalou/MOBILE-4492

Mobile 4492
main
Alfonso Salces 2024-01-31 15:16:37 +01:00 committed by GitHub
commit a9cad65bc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 147 additions and 97 deletions

140
package-lock.json generated
View File

@ -43,10 +43,10 @@
"@ionic/angular": "^7.6.5",
"@ionic/cordova-builders": "^10.1.1",
"@moodlehq/cordova-plugin-advanced-http": "3.3.1-moodle.1",
"@moodlehq/cordova-plugin-camera": "6.0.0-moodle.2",
"@moodlehq/cordova-plugin-file-transfer": "1.7.1-moodle.5",
"@moodlehq/cordova-plugin-file-opener": "4.0.0-moodle.1",
"@moodlehq/cordova-plugin-file-transfer": "2.0.0-moodle.2",
"@moodlehq/cordova-plugin-inappbrowser": "5.0.0-moodle.3",
"@moodlehq/cordova-plugin-intent": "2.2.0-moodle.2",
"@moodlehq/cordova-plugin-intent": "2.2.0-moodle.3",
"@moodlehq/cordova-plugin-ionic-webview": "5.0.0-moodle.3",
"@moodlehq/cordova-plugin-local-notification": "0.9.0-moodle.11",
"@moodlehq/cordova-plugin-qrscanner": "3.0.1-moodle.5",
@ -66,14 +66,14 @@
"cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-badge": "^0.8.9",
"cordova-plugin-camera": "^7.0.0",
"cordova-plugin-chooser": "^1.3.2",
"cordova-plugin-customurlscheme": "^5.0.2",
"cordova-plugin-device": "^2.1.0",
"cordova-plugin-file": "6.0.2",
"cordova-plugin-file-opener2": "^4.0.0",
"cordova-plugin-file": "^8.0.1",
"cordova-plugin-geolocation": "^5.0.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-media-capture": "3.0.3",
"cordova-plugin-media-capture": "^5.0.0",
"cordova-plugin-network-information": "^3.0.0",
"cordova-plugin-prevent-override": "^1.0.1",
"cordova-plugin-screen-orientation": "^3.0.4",
@ -7745,44 +7745,33 @@
],
"license": "MIT"
},
"node_modules/@moodlehq/cordova-plugin-camera": {
"version": "6.0.0-moodle.2",
"license": "Apache-2.0",
"node_modules/@moodlehq/cordova-plugin-file-opener": {
"version": "4.0.0-moodle.1",
"resolved": "https://registry.npmjs.org/@moodlehq/cordova-plugin-file-opener/-/cordova-plugin-file-opener-4.0.0-moodle.1.tgz",
"integrity": "sha512-8UoGoXA9mTixAPJ2YpewHJgRvNBE+5NrH0koo4yAuHV0MN4FslICOPatsaIuuTQC7ciH9Y02sizjSWpHpIS8mg==",
"engines": {
"cordovaDependencies": {
"2.0.0": {
"cordova": ">=6.0.0"
},
"3.0.0": {
"cordova-android": ">=6.3.0"
"cordova": ">=7.0.0"
},
"4.1.0": {
"cordova": ">=7.1.0",
"cordova-android": ">=6.3.0"
},
"5.0.0": {
"cordova": ">=9.0.0",
"cordova-android": ">=9.0.0",
"cordova-ios": ">=5.1.0"
},
"5.0.4-dev": {
"cordova": ">=9.0.0",
"cordova-android": "<10.0.0",
"cordova-ios": ">=5.1.0"
},
"6.0.0": {
"cordova": ">=9.0.0",
"cordova-android": ">=10.0.0",
"cordova-ios": ">=5.1.0"
},
"7.0.0": {
"cordova": ">100"
"4.0.0": {
"cordova-android": ">=10.0.0"
}
}
}
},
"node_modules/@moodlehq/cordova-plugin-file-transfer": {
"version": "1.7.1-moodle.5",
"license": "Apache-2.0",
"version": "2.0.0-moodle.2",
"resolved": "https://registry.npmjs.org/@moodlehq/cordova-plugin-file-transfer/-/cordova-plugin-file-transfer-2.0.0-moodle.2.tgz",
"integrity": "sha512-RAujySF80CtMF5+QgiSzEsyLldko15wwouLnwNkL4qszhj11OuHStNIY2d46Gert4RspHzbGxRExQDeqJN5u8Q==",
"engines": {
"cordovaDependencies": {
"2.0.0": {
"cordova-android": ">=12.0.0"
},
"3.0.0": {
"cordova": ">100"
}
@ -7813,8 +7802,9 @@
}
},
"node_modules/@moodlehq/cordova-plugin-intent": {
"version": "2.2.0-moodle.2",
"license": "MIT"
"version": "2.2.0-moodle.3",
"resolved": "https://registry.npmjs.org/@moodlehq/cordova-plugin-intent/-/cordova-plugin-intent-2.2.0-moodle.3.tgz",
"integrity": "sha512-sr5PPeGADRVM+z9JMGX4D5jhaAl4tD1s6SKrkChnEXxrONq9KZ7qkiZ68BsNsi962+PsRKMxLd0hfb8PZwphUg=="
},
"node_modules/@moodlehq/cordova-plugin-ionic-webview": {
"version": "5.0.0-moodle.3",
@ -12734,6 +12724,45 @@
],
"license": "Apache 2.0"
},
"node_modules/cordova-plugin-camera": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-camera/-/cordova-plugin-camera-7.0.0.tgz",
"integrity": "sha512-OVQWZTBb18Y6e5c+bbXt3E4Z1yGnYqaywh2h5vVr/+nxMcdMIE+lm527bRK5vLN/RUqhGYP/Z+5n+O7Fk7fVNw==",
"engines": {
"cordovaDependencies": {
"3.0.0": {
"cordova-android": ">=6.3.0"
},
"4.1.0": {
"cordova": ">=7.1.0",
"cordova-android": ">=6.3.0"
},
"5.0.0": {
"cordova": ">=9.0.0",
"cordova-android": ">=9.0.0",
"cordova-ios": ">=5.1.0"
},
"5.0.4-dev": {
"cordova": ">=9.0.0",
"cordova-android": "<10.0.0",
"cordova-ios": ">=5.1.0"
},
"6.0.0": {
"cordova": ">=9.0.0",
"cordova-android": ">=10.0.0",
"cordova-ios": ">=5.1.0"
},
"7.0.0": {
"cordova": ">=9.0.0",
"cordova-android": ">=12.0.0",
"cordova-ios": ">=5.1.0"
},
"8.0.0": {
"cordova": ">100"
}
}
}
},
"node_modules/cordova-plugin-chooser": {
"version": "1.3.2",
"license": "Apache-2.0"
@ -12761,32 +12790,22 @@
}
},
"node_modules/cordova-plugin-file": {
"version": "6.0.2",
"license": "Apache-2.0",
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/cordova-plugin-file/-/cordova-plugin-file-8.0.1.tgz",
"integrity": "sha512-LgFLNQN58xguoJkNc8eGBmg/Vuaah9lY3Nye27OAfWCKalXPRjExIg5r8L3qlfiJxzmzupjrF0M4KdU2Lovm3Q==",
"engines": {
"cordovaDependencies": {
"5.0.0": {
"cordova-android": ">=6.3.0"
},
"7.0.0": {
"cordova": ">100"
}
}
}
},
"node_modules/cordova-plugin-file-opener2": {
"version": "4.0.0",
"license": "MIT",
"engines": {
"cordovaDependencies": {
"2.0.0": {
"cordova": ">=6.0.0"
},
"3.0.0": {
"cordova": ">=7.0.0"
},
"4.0.0": {
"cordova-android": ">=10.0.0"
},
"8.0.0": {
"cordova-android": ">=12.0.0"
},
"9.0.0": {
"cordova": ">100"
}
}
}
@ -12811,17 +12830,24 @@
"license": "Apache 2.0"
},
"node_modules/cordova-plugin-media-capture": {
"version": "3.0.3",
"license": "Apache-2.0",
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-media-capture/-/cordova-plugin-media-capture-5.0.0.tgz",
"integrity": "sha512-eI8BNH3lHnWzdcpb+4Gy7mwHbN5fOKyoZfwRC1o7L/9kXiVF7S5aG5gvaga+CUSnrgsbrg4b8pSIfq70lRFrlw==",
"engines": {
"cordovaDependencies": {
">=1.4.4": {
"1.4.4": {
"cordova-ios": ">=4.0.0"
},
"2.0.0": {
"cordova-android": ">=6.3.0"
},
"4.0.0": {
"cordova-android": ">=10.0.0"
},
"5.0.0": {
"cordova-android": ">=12.0.0"
},
"6.0.0": {
"cordova": ">100"
}
}

View File

@ -78,10 +78,10 @@
"@ionic/angular": "^7.6.5",
"@ionic/cordova-builders": "^10.1.1",
"@moodlehq/cordova-plugin-advanced-http": "3.3.1-moodle.1",
"@moodlehq/cordova-plugin-camera": "6.0.0-moodle.2",
"@moodlehq/cordova-plugin-file-transfer": "1.7.1-moodle.5",
"@moodlehq/cordova-plugin-file-opener": "4.0.0-moodle.1",
"@moodlehq/cordova-plugin-file-transfer": "2.0.0-moodle.2",
"@moodlehq/cordova-plugin-inappbrowser": "5.0.0-moodle.3",
"@moodlehq/cordova-plugin-intent": "2.2.0-moodle.2",
"@moodlehq/cordova-plugin-intent": "2.2.0-moodle.3",
"@moodlehq/cordova-plugin-ionic-webview": "5.0.0-moodle.3",
"@moodlehq/cordova-plugin-local-notification": "0.9.0-moodle.11",
"@moodlehq/cordova-plugin-qrscanner": "3.0.1-moodle.5",
@ -101,14 +101,14 @@
"cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-badge": "^0.8.9",
"cordova-plugin-camera": "^7.0.0",
"cordova-plugin-chooser": "^1.3.2",
"cordova-plugin-customurlscheme": "^5.0.2",
"cordova-plugin-device": "^2.1.0",
"cordova-plugin-file": "6.0.2",
"cordova-plugin-file-opener2": "^4.0.0",
"cordova-plugin-file": "^8.0.1",
"cordova-plugin-geolocation": "^5.0.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-media-capture": "3.0.3",
"cordova-plugin-media-capture": "^5.0.0",
"cordova-plugin-network-information": "^3.0.0",
"cordova-plugin-prevent-override": "^1.0.1",
"cordova-plugin-screen-orientation": "^3.0.4",
@ -196,9 +196,7 @@
"@moodlehq/cordova-plugin-advanced-http": {
"ANDROIDBLACKLISTSECURESOCKETPROTOCOLS": "SSLv3,TLSv1"
},
"@moodlehq/cordova-plugin-camera": {
"ANDROIDX_CORE_VERSION": "1.6.+"
},
"@moodlehq/cordova-plugin-file-opener": {},
"@moodlehq/cordova-plugin-file-transfer": {},
"@moodlehq/cordova-plugin-inappbrowser": {},
"@moodlehq/cordova-plugin-intent": {},
@ -216,6 +214,9 @@
"cordova-clipboard": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-badge": {},
"cordova-plugin-camera": {
"ANDROIDX_CORE_VERSION": "1.6.+"
},
"cordova-plugin-chooser": {},
"cordova-plugin-customurlscheme": {
"URL_SCHEME": "moodlemobile",
@ -224,7 +225,6 @@
"ANDROID_PATHPREFIX": "/"
},
"cordova-plugin-device": {},
"cordova-plugin-file-opener2": {},
"cordova-plugin-geolocation": {
"GPS_REQUIRED": "false"
},

View File

@ -18,6 +18,7 @@ import { CoreFileEntry, CoreFileHelper } from '@services/file-helper';
import { CoreFileSession } from '@services/file-session';
import { CoreDomUtils } from '@services/utils/dom';
import { AddonModDataFieldPluginBaseComponent } from '../../../classes/base-field-plugin-component';
import { CoreFile } from '@services/file';
/**
* Component to render data picture field.
@ -129,7 +130,7 @@ export class AddonModDataFieldPictureComponent extends AddonModDataFieldPluginBa
setTimeout(() => {
if (this.image) {
this.imageUrl = 'name' in this.image
? this.image.toURL() // Is Offline.
? CoreFile.getFileEntryURL(this.image) // Is Offline.
: CoreFileHelper.getFileUrl(this.image);
}
}, 1);

View File

@ -80,7 +80,7 @@ export class AddonModLtiProvider {
const entry = await CoreFile.writeFile(LAUNCHER_FILE_NAME, text);
return entry.toURL();
return CoreFile.getFileEntryURL(entry);
}
/**

View File

@ -98,7 +98,7 @@ export class CoreLocalFileComponent implements OnInit {
this.fileExtension = CoreMimetypeUtils.getFileExtension(file.name);
// Let's calculate the relative path for the file.
this.relativePath = CoreFile.removeBasePath(file.toURL());
this.relativePath = CoreFile.removeBasePath(CoreFile.getFileEntryURL(file));
if (!this.relativePath) {
// Didn't find basePath, use fullPath but if the user tries to manage the file it'll probably fail.
this.relativePath = file.fullPath;
@ -139,7 +139,7 @@ export class CoreLocalFileComponent implements OnInit {
options.iOSOpenFileAction = this.defaultIsOpenWithPicker ? OpenFileAction.OPEN : OpenFileAction.OPEN_WITH;
}
CoreUtils.openFile(this.file.toURL(), options);
CoreUtils.openFile(CoreFile.getFileEntryURL(this.file), options);
}
/**

View File

@ -324,7 +324,7 @@ export class CoreEmulatorCaptureMediaComponent implements OnInit, OnDestroy {
const fileEntry = await CoreFile.writeFile(this.getFilePath(), this.mediaBlob);
if (this.isImage && !this.isCaptureImage) {
this.dismissWithData(fileEntry.toURL());
this.dismissWithData(CoreFile.getFileEntryURL(fileEntry));
} else {
// The capture plugin should return a MediaFile, not a FileEntry. Convert it.
const metadata = await CoreFile.getMetadata(fileEntry);

View File

@ -170,7 +170,7 @@ export class CoreFileUploaderAudioRecorderComponent extends CoreModalComponent<C
this.close({
name: fileEntry.name,
fullPath: fileEntry.toURL(),
fullPath: CoreFile.getFileEntryURL(fileEntry),
type: 'audio/mpeg',
});
} catch (error) {

View File

@ -185,7 +185,7 @@ export class CoreFileUploaderHelperProvider {
if (upload) {
// Pass true to delete the copy after the upload.
return this.uploadGenericFile(fileEntry.toURL(), name, file.type, true);
return this.uploadGenericFile(CoreFile.getFileEntryURL(fileEntry), name, file.type, true);
} else {
return fileEntry;
}
@ -455,7 +455,7 @@ export class CoreFileUploaderHelperProvider {
await this.confirmUploadFile(file.size);
await this.uploadGenericFile(fileEntry.toURL(), file.name, file.type, deleteAfterUpload, siteId);
await this.uploadGenericFile(CoreFile.getFileEntryURL(fileEntry), file.name, file.type, deleteAfterUpload, siteId);
CoreDomUtils.showToast('core.fileuploader.fileuploaded', true, undefined, 'core-toast-success');
} catch (error) {

View File

@ -195,7 +195,10 @@ export class CoreFileUploaderProvider {
clearTmpFiles(files: (CoreWSFile | FileEntry)[]): void {
// Delete the temporary files.
files.forEach((file) => {
if ('remove' in file && CoreFile.removeBasePath(file.toURL()).startsWith(CoreFileProvider.TMPFOLDER)) {
if (
'remove' in file &&
CoreFile.removeBasePath(CoreFile.getFileEntryURL(file)).startsWith(CoreFileProvider.TMPFOLDER)
) {
// Pass an empty function to prevent missing parameter error.
file.remove(() => {
// Nothing to do.
@ -568,7 +571,7 @@ export class CoreFileUploaderProvider {
const destFile = CorePath.concatenatePaths(folderPath, file.name);
result.offline++;
await CoreFile.copyFile(file.toURL(), destFile);
await CoreFile.copyFile(CoreFile.getFileEntryURL(file), destFile);
}
}));
@ -642,9 +645,10 @@ export class CoreFileUploaderProvider {
usedNames[name] = file;
// Now upload the file.
const options = this.getFileUploadOptions(file.toURL(), name, undefined, false, 'draft', itemId);
const filePath = CoreFile.getFileEntryURL(file);
const options = this.getFileUploadOptions(filePath, name, undefined, false, 'draft', itemId);
await this.uploadFile(file.toURL(), options, undefined, siteId);
await this.uploadFile(filePath, options, undefined, siteId);
}));
}
@ -701,9 +705,10 @@ export class CoreFileUploaderProvider {
// Now upload the file.
const extension = CoreMimetypeUtils.getFileExtension(fileName);
const mimetype = extension ? CoreMimetypeUtils.getMimeType(extension) : undefined;
const options = this.getFileUploadOptions(fileEntry.toURL(), fileName, mimetype, isOnline, 'draft', itemId);
const filePath = CoreFile.getFileEntryURL(fileEntry);
const options = this.getFileUploadOptions(filePath, fileName, mimetype, isOnline, 'draft', itemId);
const result = await this.uploadFile(fileEntry.toURL(), options, undefined, siteId);
const result = await this.uploadFile(filePath, options, undefined, siteId);
return result.itemid;
}

View File

@ -333,7 +333,7 @@ export class CoreH5PFileStorage {
const file = await CoreFile.getFile(this.getContentIndexPath(folderName, siteId));
return file.toURL();
return CoreFile.getFileEntryURL(file);
}
/**

View File

@ -201,7 +201,7 @@ export class CoreH5PHelper {
const destFolder = CorePath.concatenatePaths(CoreFileProvider.TMPFOLDER, 'h5p/' + folderName);
// Unzip the file.
await CoreFile.unzipFile(file.toURL(), destFolder, onProgress);
await CoreFile.unzipFile(CoreFile.getFileEntryURL(file), destFolder, onProgress);
try {
// Notify that the unzip is starting.

View File

@ -145,7 +145,7 @@ export class CoreH5PPlayer {
const fileEntry = await CoreFile.writeFile(indexPath, html);
return fileEntry.toURL();
return CoreFile.getFileEntryURL(fileEntry);
}
/**

View File

@ -227,7 +227,7 @@ export class CoreSharedFilesHelperProvider {
} else if (siteIds.length == 1) {
return this.storeSharedFileInSite(fileEntry, siteIds[0], !path);
} else if (!this.isChoosingSite()) {
this.goToChooseSite(fileEntry.toURL(), !path);
this.goToChooseSite(CoreFile.getFileEntryURL(fileEntry), !path);
}
} catch (error) {
if (error) {

View File

@ -245,7 +245,7 @@ export class CoreSharedFilesProvider {
// Create dir if it doesn't exist already.
await CoreFile.createDir(sharedFilesFolder);
const newFile = await CoreFile.moveExternalFile(entry.toURL(), newPath);
const newFile = await CoreFile.moveExternalFile(CoreFile.getFileEntryURL(entry), newPath);
CoreEvents.trigger(CoreEvents.FILE_SHARED, { siteId, name: newName });

View File

@ -219,7 +219,7 @@ export class CoreFileProvider {
const newDirEntry = await File.createDir(base, firstDir, true);
return this.create(isDirectory, restOfPath, failIfExists, newDirEntry.toURL());
return this.create(isDirectory, restOfPath, failIfExists, this.getFileEntryURL(newDirEntry));
}
}
@ -874,12 +874,29 @@ export class CoreFileProvider {
getInternalURL(fileEntry: FileEntry): string {
if (!fileEntry.toInternalURL) {
// File doesn't implement toInternalURL, use toURL.
return fileEntry.toURL();
return this.getFileEntryURL(fileEntry);
}
return fileEntry.toInternalURL();
}
/**
* Get the URL (absolute path) of a file.
* Use this function instead of doing fileEntry.toURL because the latter causes problems with WebView and other plugins.
*
* @param fileEntry File Entry.
* @returns URL.
*/
getFileEntryURL(fileEntry: Entry): string {
if (CorePlatform.isAndroid()) {
// Cordova plugin file v7 changed the format returned by toURL, the new format it's not compatible with
// Ionic WebView or FileTransfer plugin.
return fileEntry.nativeURL;
}
return fileEntry.toURL();
}
/**
* Adds the basePath to a path if it doesn't have it already.
*
@ -934,7 +951,7 @@ export class CoreFileProvider {
// If destFolder is not set, use same location as ZIP file. We need to use absolute paths (including basePath).
destFolder = this.addBasePathIfNeeded(destFolder || CoreMimetypeUtils.removeExtension(path));
const result = await Zip.unzip(fileEntry.toURL(), destFolder, onProgress);
const result = await Zip.unzip(this.getFileEntryURL(fileEntry), destFolder, onProgress);
if (result == -1) {
throw new CoreError('Unzip failed.');

View File

@ -771,7 +771,7 @@ export class CoreFilepoolProvider {
});
// Add the anchor again to the local URL.
return fileEntry.toURL() + (anchor || '');
return CoreFile.getFileEntryURL(fileEntry) + (anchor || '');
}).finally(() => {
// Download finished, delete the promise.
delete this.filePromises[siteId][downloadId];
@ -1278,7 +1278,7 @@ export class CoreFilepoolProvider {
const filePath = await this.getFilePath(siteId, fileId, '');
const dirEntry = await CoreFile.getDir(filePath);
return dirEntry.toURL();
return CoreFile.getFileEntryURL(dirEntry);
}
/**
@ -1666,7 +1666,7 @@ export class CoreFilepoolProvider {
const path = await this.getFilePath(siteId, fileId);
const fileEntry = await CoreFile.getFile(path);
return CoreFile.convertFileSrc(fileEntry.toURL());
return CoreFile.convertFileSrc(CoreFile.getFileEntryURL(fileEntry));
}
/**
@ -1685,7 +1685,7 @@ export class CoreFilepoolProvider {
const fileEntry = await CoreFile.getFile(path);
// This URL is usually used to launch files or put them in HTML.
return fileEntry.toURL();
return CoreFile.getFileEntryURL(fileEntry);
}
/**
@ -1701,7 +1701,7 @@ export class CoreFilepoolProvider {
const fileEntry = await CoreFile.getFile(filePath);
return fileEntry.toURL();
return CoreFile.getFileEntryURL(fileEntry);
}
/**
@ -1797,7 +1797,7 @@ export class CoreFilepoolProvider {
const dirPath = await this.getFilePath(siteId, dirName, '');
const dirEntry = await CoreFile.getDir(dirPath);
return dirEntry.toURL();
return CoreFile.getFileEntryURL(dirEntry);
}
/**

View File

@ -185,7 +185,7 @@ export class CoreMimetypeUtilsProvider {
// @todo linting: See if this can be removed
(file as { embedType?: string }).embedType = embedType;
path = path ?? (CoreUtils.isFileEntry(file) ? file.toURL() : CoreFileHelper.getFileUrl(file));
path = path ?? (CoreUtils.isFileEntry(file) ? CoreFile.getFileEntryURL(file) : CoreFileHelper.getFileUrl(file));
path = path && CoreFile.convertFileSrc(path);
switch (embedType) {

View File

@ -258,7 +258,7 @@ export class CoreWSProvider {
onProgress && transfer.onProgress(onProgress);
// Download the file in the tmp file.
await transfer.download(url, fileEntry.toURL(), true, {
await transfer.download(url, CoreFile.getFileEntryURL(fileEntry), true, {
headers: {
'User-Agent': navigator.userAgent,
},

View File

@ -12,6 +12,7 @@ For more information about upgrading, read the official documentation: https://m
- With the upgrade to Ionic7 ion-datetime has changed its usage. We recommend using ion-datetime-button. More info here: https://ionicframework.com/docs/updating/6-0#datetime
- CoreLoginHelper.getErrorMessages has been removed. Please create the messages object yourself.
- CoreAppProvider.isAutomated() has been deprecated, use CorePlatformService.isAutomated() instead.
- Due to a breaking change in cordova-plugin-file, avoid using FileEntry.toURL(). Use CoreFileProvider.getFileEntryURL instead.
=== 4.3.0 ===