Estoy tratando de usar html2canvas para generar una instantánea de una tarjeta html (que, por cierto, funciona correctamente y la imagen también se descarga correctamente cuando la pruebo en la PC), pero necesito pasar esta imagen a la función shareViaWhatsapp. No estoy seguro de qué variable almacena la imagen generada, así que puedo pasarla directamente como el tercer parámetro en this.socialSharing.shareViaWhatsApp("Únete a ABCD conmigo","Asunto", imageURL ) en lugar de imageURL .
Cuando ejecuto la aplicación en el teléfono, aparece el error "URL_NOT_SUPPORTED". Por favor ayuda.
html2canvas(this.screen.nativeElement, { imageTimeout: 15000, //newline scale:3, //newline useCORS: true }).then(canvas => { imageURL = canvas.toDataURL("image/jpg"); let a = document.createElement("a"); a.href = imageURL; a.download = "letter.jpg"; a.click(); this.socialSharing.shareViaWhatsApp("Come join ABCD Community with me","Subject", imageURL) .then((entries) => { console.log('success ' + JSON.stringify(entries)); }) .catch((error) => { alert('error 1' + JSON.stringify(error)); });