Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

119
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda