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

117
Views
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 answers
Answer question

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 Report
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!