android force camera to take photo in landscape mode -


i want force default android camera take photo in landscape mode only. have tried following:

         intent cameraintent=new intent("android.media.action.image_capture");          file photo = new file(environment.getexternalstoragedirectory().getabsolutepath(), "pic.jpg");          cameraintent.putextra(mediastore.extra_output, uri.fromfile(photo));          cameraintent.putextra(mediastore.extra_screen_orientation, activityinfo.screen_orientation_landscape);          startactivity(cameraintent); 

but works in 2.1 not later. want have photo image saved in landscape mode. don't want use image processing such matrix or custom camera.

note: calling intent activity has orientation fixed "portrait"

in androidmanifest.xml

<activity android:name="activity_name" android:screenorientation="landscape" /> 

this activity image capturing activity.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -