I have an ionic angular app and need to share a .gpx file via gmail or whatsapp. It works smoothly via gmail. Also via wechat, but not via whatsapp.
I tried with capacitor share, where I can select gmail, whatsapp, wechat, ...
await Share.share({
title: this.translate.instant('ARCHIVE.TITLE'),
text: this.translate.instant('ARCHIVE.TEXT'),
files: [uri.uri], // public file path
dialogTitle: this.translate.instant('ARCHIVE.DIALOG_TITLE'),
});
and works with gmail and wechat, but not with whatsapp. I moved to cordova socialsharing without any success. In principle, I allocated my file in cache directory, but also tested other options of external storage.
I managed to send images: 1) I save the images on the external cache folder using capacitor/filesystem, 2) I get the files uri with the same plugin and 3) I share the files using cordova social-sharing. Nevertheless, the method does not work for .gpx (xml) files