i am able to open gallery for choose image and selected image set as attachment now when i open gallery if my device in portrait mode then my image is attaching and at the time of picking image if my device in landscape mode then image attachment failed...so i want to open gallery always in portrait mode even i round the device to landscape mode ...so how to achive this restriction...
my code for open gallery is
Button gallerybtn = (Button) findViewById(R.id.button1);
gallerybtn.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v) {
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent,
"Select Picture"), SELECT_PICTURE);
}});