Android Question Stopping app from changing orientation

james_sgp

Active Member
Licensed User
Longtime User
Hi, I have an app that is only designed to be used in portrait mode; but how do I stop it from recreating when the device is turned?
I have set Project Attributes, '#SupportedOrientations: portrait'; I have tried the 'phone1.SetScreenOrientation(1)' but the screen still rotates and kills my apps activity (i assume) and the screen goes white and the app sits there. Even rotating back to portrait the screen is not re-appearing.

Appreciate any advice...James
 

james_sgp

Active Member
Licensed User
Longtime User
Installed the new SDK, but app still does the same thing, so I suppose that means this is something that can`t be done on my particular Samsung tablet ?
 
Upvote 0

Derek Johnson

Active Member
Licensed User
Longtime User
I also have a Galaxy Tab S2 with Android 7.0 with last Android Patch on 1 July 2019.

I was also unable to reproduce the problem in Debug or Release mode using your example code. It stays firmly in Portrait mode even if I start it in Landscape Mode.
 
Upvote 0

james_sgp

Active Member
Licensed User
Longtime User
I`ve not tried on three different Samsung models:

Tab S (SM-T800) running Android 6.0.1 - rotates
Tab A (SM-T580) running Android 8.1 - fixed
Galaxy S9+ (SM-G965F) running Android 9.0 - fixed

So seems to be earlier Android versions it's not working on...
 
Upvote 0
Top