Navigator.share not working on Opera for Android
-
ariverof last edited by
I'm working with the navigator.share function to share pdf documents generated with jsPDF. It's working fine on Opera for iOS and other browsers that also support this method, but not on Opera for Android.
As per CanIUse and MDN the feature is supported on Opera Android since v54, and I'm using v74.
Here's a snippet of the code I'm using:
var pdf = new File([doc.output('blob')], doc_name + ".pdf", { type: "application/pdf" }); //Blob generated with jspdf var filesToShare = [pdf]; if (navigator.canShare && navigator.canShare({ files: filesToShare })) { try { if (filesToShare != null) navigator.share({ title: doc_name + ".pdf", files: filesToShare }); } catch (error) { console.error(error.message); } }
I also asked about this on StackOverflow, but I think it's a browser's bug so there's not much I can get from there.
I'm using Opera for Android v74.1.3922.71199 on a Xiaomi POCO X3 Pro with Android 12
-