rodrigograca31 / Canvas2ImagePlugin

PhoneGap / Cordova plugin for iOS to save the contents of an HTML canvas to the device's Photo Library
19 stars 13 forks source link

Saves to wrong folder on Android 10 #4

Closed ataylor32 closed 5 years ago

ataylor32 commented 5 years ago

Canvas2ImagePlugin.java compares the device's Android version (a string) with the string "2.3.3". On Android 10, this doesn't work as expected. I think the version check should either be updated to work with Android 10 or it should be removed entirely (I doubt there are many users still on Android 2 at this point).

rodrigograca31 commented 5 years ago

I totally agree! Saw that years ago. I personally only support 4.4+ and even 4.4 Kitkat is dying....

rodrigograca31 commented 5 years ago

What's the normal output of deviceVersion.compareTo("2.3.3"); ??? and what does Android 10 outputs?

ataylor32 commented 5 years ago

I don't know what the normal output is, but on Android 10, check has a value of -1

rodrigograca31 commented 5 years ago

Ok, give me 10 minutes to change it and commit a new minor version. or you want to do a PR?

ataylor32 commented 5 years ago

I can give it a try.

rodrigograca31 commented 5 years ago

ok. go ahead.

ataylor32 commented 5 years ago

Fixed by #6