Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

320
Views
Comparta una vcard (archivo .vcf) usando la API para compartir en la web

Estoy tratando de agregar un contacto a un teléfono compartiendo una vcard (archivo .vcf) usando la API para compartir en la web, pero no funciona en Android. Funciona solo en mi iPhone. ¿Alguna idea de por qué no funciona en Android?

 <html> <title> Web Share API </title> <body> <div> <div> <button onclick="shareVcard" id="shareFilesButton">Share Files</button> </div> </div> </body> <script> document.getElementById('shareFilesButton').addEventListener("click", () => shareVcard()) function shareVcard() { fetch("sample.vcf") .then(function(response) { return response.text() }) .then(function(text) { var file = new File([text], "sample.vcf", {type: 'text/vcard'}); var filesArray = [file]; var shareData = { files: filesArray }; if (navigator.canShare && navigator.canShare(shareData)) { // Adding title afterwards as navigator.canShare just // takes files as input shareData.title = "vcard"; navigator.share(shareData) .then(() => console.log('Share was successful.')) .catch((error) => console.log('Sharing failed', error)); } else { console.log("Your system doesn't support sharing files."); } }); } </script> </html>

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!