cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bowser <>
Subject Camera does too many things!!!!
Date Thu, 23 Jan 2014 21:24:47 GMT

I've been trying the last couple of days to refactor the camera, and
I'm just getting bogged down in a ton of old, legacy code that was
added to fix various JIRA and GitHub issues.  I've come to the
conclusion that currently, our Camera plugin does TOO MANY things.

Right now, it seems that our camera does the following on Android:
* Launches an intent to get the Camera or the Gallery
* Does image manipulation on the image
* Corrects the Orientation of the image
* Calculates the Aspect Ratio of the image
* Saves the Image into the Gallery if taken from the Camera

Now, we're stuck doing ALL of these things, but I feel like on Android
we need to greenfield this plugin, since I'm finding it too difficult
to refactor it to work across all the multiple Android versions.  We
access the file system way too much, and the MediaProvider and
DocumentProvider code is turning out to be a nightmare.

What do people think about tossing this out and starting over? Or is
there some worth in trying to untangle all the spaghetti?


View raw message