katzer / cordova-plugin-email-composer

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

App getting crash as getEmailClientIds() return zero #382

Closed ncomo11 closed 1 year ago

ncomo11 commented 1 year ago

Hi! In android 13 app getting crash when called email plugin's open function. On debugging it is due to 'getEmailClientIds()' returning 0 and in turn 'targets.remove(0), header' gives exception as targets ha nothing to remove. This all happen inside 'getDraft' method of Impl.java files/class.

Thanks, Praveen image image

jfoclpf commented 1 year ago

I guess you mean here: https://github.com/katzer/cordova-plugin-email-composer/blob/master/src/android/Impl.java#L90

do you have any suggestion to solve it? Check other forks, this repo has 352 forks, maybe someone has found something.

Please share if you found the solution

jfoclpf commented 1 year ago

and BTW, I am using this plugin on Android 13 with no issues at all, it works nice, here where I call the open method https://github.com/jfoclpf/form-for-parking-violation/blob/master/www/js/main.js#L279

are you using in any particular context?

ncomo11 commented 1 year ago

@jfoclpf I am using in same way but its crashing for me consistently. Tested on android 13 device and android 12 emulator its crashing on both.

ncomo11 commented 1 year ago

@jfoclpf Thanks with the latest version issue is fixed. Thanks,

jfoclpf commented 1 year ago

@jfoclpf Thanks with the latest version issue is fixed. Thanks,

what do you mean? We did not change anything