I am working with Ionic 5, using capacitor and I tried to use the PreviewAnyFile plugin. after installing the plugging as directed by (this)[PreviewAnyFile - Ionic Documentation]. I passed it to my constructor and called it by
this.documentViewer
.previewBase64(file, { name: filename, mimeType: fileMimeType })
.then((res: any) => console.log(res))
.catch((error: any) => console.error(error));
});
and I get :
Error: The old format of this exec call has been removed (deprecated since 2.1). Change to: cordova.exec(null, null, ‘Service’, ‘action’, [ arg1, arg2 ]);
at capacitorExec (capacitor-runtime.js:1978)
at execProxy (capacitor-runtime.js:2114)
at PreviewAnyFile.previewBase64 (capacitor-runtime.js:3088)
at callCordovaPlugin (/vendor-es2015.js:137148)
at /vendor-es2015.js:136961
at /vendor-es2015.js:136921
at new ZoneAwarePromise (/polyfills-es2015.js:3587)
at tryNativePromise (/vendor-es2015.js:136920)
at getPromise (/vendor-es2015.js:136939)
at wrapPromise (/vendor-es2015.js:136944)
Please any way out of this? I use other plugins in the app, like launch navigator and call number and they worked fine.
1 post - 1 participant