katzer / cordova-plugin-email-composer

Edit and send email messages
Apache License 2.0
343 stars 333 forks source link

issues for 0.8.3 on Android #236

Closed mrwrighty closed 7 years ago

mrwrighty commented 8 years ago

I use Intel XDK to create apps and have used version 0.8.3 of your plugin to create emails.

On certain devices (Sony Experia for one), no email option appears when cordova.plugins.email.open is instigated, switch back to version 0.8.2 fixed the issue. All test devices I have are running Android 4.4.4.

On another issue with Android using 0.8.2, when I try to send an html link it is getting changed for example:-

They are standard html Pic1. When looking at the returned email body in the XDK everything is good, but when I install the app on an Android device the image URL has changed, even though the text says http://my image UTL/25991-day1_11-2-2016_1731/pic1.jpg which is correct and I pasted the URL from the email to here (Actual URL changed for security) but when I click the link it tries to load applewebdata://B39FE8CC-2ECB-483A-BD86-D270D1B3F87F/%3Ca%20href=

The image is not viewable.

This only seems to affect Android devices, HTML links in the iOS emails are fine.

mrwrighty commented 8 years ago

Fixed the issue regarding the email client not loading using code here

https://github.com/katzer/cordova-plugin-email-composer/pull/227/commits/babebdd6fa4ba790380e8ce0155dea6a1d4630da

but when emails are sent the URL to images etc changes to applewebdata://4B3F91DC-4B66-45BE-997A-07C21B95F232/%3Ca%20href= and do not work.

nwocykra commented 8 years ago

I second this issue. Please fix

barkatdhillon commented 8 years ago

I second this issue as well, it is working fine in Android 5.0.2, but not in others like 5 and 6.1. My code snippet: EmailComposer.isAvailable().then((available: boolean) =>{ if(available) { console.log("EmailComposer available: ", available); //Now we know we can send } }).catch((error) => { console.log('EmailComposer.isAvailable error', error); }); and its output is EmailComposer.isAvailable error undefined

Any ETA for this fix?

seopei commented 8 years ago

PR #245 will fix this sdk's >= 23 need runtime permissions

wwoods commented 8 years ago

On Android 7 anyway, @seopei's pull request did NOT fix the issue. It does not seem like Android needs permissions to open an e-mail client. Reverting to 0.8.2 did solve the issue.

For whoever wants it, you can install the 0.8.2 commit directly via:

cordova plugin add https://github.com/katzer/cordova-plugin-email-composer.git#cab303daada1d86579b6c76354b8333ae5d1aefe --save
WuglyakBolgoink commented 7 years ago

tested on android v4.4.2 + android v7.1 -> service is always not available.

On my android v7.1 Plugin need Contact-Permissions, but don't ask any permissions...

katzer commented 7 years ago

@WuglyakBolgoink The latest commits have added supported for Android permissions and other fixes. There no absolute warranty that isAvailable returns correct values. I've added the method forceOpen to skip such tests done in open