Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
Ionic EmailComposer Android Image attachments Base64 not funkcionary

I read my photos from the device, which I then display on the screen and send as an attachment in the email. The problem is when I add an attachment it throws me out of android.

Attached to me. show me shows thanks to base64 but it doesn't attach itself as an attachment and completely throws me out of android.

My code is

captureImage= () =>{
    const options: CameraOptions = {
      quality: 70,
      destinationType: this.camera.DestinationType.DATA_URL,
      encodingType: this.camera.EncodingType.JPEG,
      mediaType: this.camera.PictureSourceType.CAMERA,
    }
    this.camera.getPicture(options).then (imageData =>{
     
    this.base64Image  = 'data:image/jpeg;base64,' + imageData;
    }, err => {
      console.log ('Image error: ', err)
    });
  }


  
  sendEmail(){
    let email = {
      to: 'mnemeth83@gmail.com',
      cc:'office@webshopassist.sk',
      attachments: [
        this.base64Image 
      ],
      subject: 'Moja fotka',
      body:'Poprosím pozrite sa nato!<br><br>',
      isHtml: true
    };
    this.emailComposer.open(email);
  }
}

In Android manifest have i this

 <queries>
    <intent>

      <action android:name="android.intent.action.SENDTO" />
      <data android:scheme="*" />
    </intent>
  </queries>

Whats the problem? Please help my.Thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I had a similar problem with email composer, due to newer Android versions.

Try this:

  • Install 6.1.1 gradle version and in Android Studio > Gradle Settings point the Gradle to installation folder.

  • Add distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip to gradle-wrapper.properties.

  • Keep your added query inside of AndroidManifest.xml

  • Finally set targetSdkVersion = 30 in variables.gradle.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda