-1

I have developed an application that runs images and videos (with a default application to display them) for a certain time period.

However I want to run all these images and videos only in a landscape view. I want to lock this, irrespective of rotation settings. If possible, I would also like make it to only portrait view in future. Please advise.

Minzkraut
  • 2,149
  • 25
  • 31
Archana Sarang
  • 101
  • 1
  • 9
  • 2
    possible duplicate of [Force an android activity to always use landscape mode](http://stackoverflow.com/questions/2150287/force-an-android-activity-to-always-use-landscape-mode) – Zarwan Sep 03 '15 at 07:06
  • you will find many answers for this question. This is a duplicate question. – Kaveesh Kanwal Sep 03 '15 at 07:12
  • I know, I found most of the answer regarding this.. And I have done changes in the Android manifest.xml file (i.e screenOrientation="landscape").. But This app also launch the album app (i.e. android built in app) . I also want that app running in landscap.. but when I change the orientation its play the image in portrait mode..that I want to fix... that whether it's an image or video.. or whtever app is display , that should be fix in landscape .. if I change the orientation it should fix/lock to the landscape.. – Archana Sarang Sep 03 '15 at 07:18

1 Answers1

2

It is not possible to change device orientation programmatically, you can redirect user to those setting but not possible to change from app side. e.g you can redirect user to GPS setting screen but not set it from app. Same concept apply for rotation as well.

chetan mekha
  • 665
  • 6
  • 18