Two connected aspects here: how you represent your 2D image and therefore how you intend to extrude it to 3D and then, how you plan to write out your 3D model for the 3D printer. The latter I presume you will want as an STL file.
There doesn't seem to be a lot around in terms of writing STL files direct from Android/Java but http://www.printingin3d.eu/javascad looks promising. I've not used the library or done any 3d printing to be honest but I understand there may be some rules around how you structure your object on ensure it can be 'sliced' properly when printing. This might therefore influence how you structure your 2D object.
So back to the extruding - how do you hold your 2D object; is it a series of (x,y) points? If so, then one approach is to split your polygon in triangles (ie. create a mesh) and then convert these into 3D objects by elongating the z axis to get a series of prisms. You can then add all these objects to a set and write these out as an STL file using javascad.