• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    Navigator.share not working on Opera for Android

    Opera for Android
    1
    1
    739
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ariverof
      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

      Reply Quote 0
        1 Reply Last reply
      • Locked by  leocg leocg 
      • First post
        Last post

      Computer browsers

      • Opera for Windows
      • Opera for Mac
      • Opera for Linux
      • Opera beta version
      • Opera USB

      Mobile browsers

      • Opera for Android
      • Opera Mini
      • Opera Touch
      • Opera for basic phones

      • Add-ons
      • Opera account
      • Wallpapers
      • Opera Ads

      • Help & support
      • Opera blogs
      • Opera forums
      • Dev.Opera

      • Security
      • Privacy
      • Cookies Policy
      • EULA
      • Terms of Service

      • About Opera
      • Press info
      • Jobs
      • Investors
      • Become a partner
      • Contact us

      Follow Opera

      • Opera - Facebook
      • Opera - Twitter
      • Opera - YouTube
      • Opera - LinkedIn
      • Opera - Instagram

      © Opera Software 1995-