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

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -