android - Why native camera rotating after saving captured image -
i launch native android camera , save image @ specified location. problem after click capture photo, preview comes options save/discard. after click save, native camera rotates in landscape , image captured not displayed.
intent intent = new intent(mediastore.action_image_capture); intent.setpackage(defaultcamera); file f = new file(android.os.environment.getexternalstoragedirectory(), "temp.jpg"); intent.putextra(mediastore.extra_output, uri.fromfile(f)); startactivityforresult(intent, 1);
it because activity recreated therefore data not there anymore. cannot control whether happen or not. capture picture onactivityresult? if so, try saving path in retained fragment.
Comments
Post a Comment