Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [Tier 1] How to use SetOrientationAllowed() for Android phones?

Author
Message
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 21st Dec 2017 09:11
So far, I use this, which seem to work on my Android phone, but not in Windows:



Does anyone has any experience with how to deal with those wierd rotating Android screens?

I also tried SetOrientationAllowed( 1, 1, 0, 0 ) which I assumed would allow me to rotate the phone upside down and the app would magically rotate, but no dice.
puzzler2018
User Banned
Posted: 21st Dec 2017 09:26
Remove the while commands and to see what its doing and showing you

puzzler2018
User Banned
Posted: 21st Dec 2017 09:31
would help if i had the virtual screen resolution the right way

SetVirtualResolution( DeviceWidth,DeviceHeight )

D
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 21st Dec 2017 14:35
Quote: "SetOrientationAllowed( 1, 1, 0, 0 )"
works for me. Make sure you have "Auto Rotate Screen" enabled in your Android display settings.

puzzler2018
User Banned
Posted: 21st Dec 2017 14:42
I dont think we can rely on customers having to enable the rotation

so, maybe force the app to go into landscape mode (0,0,1,1) or portrait (1,1,0,0)
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 21st Dec 2017 18:29
by default apps should rotate as expected - are you using some other widget or app to lock your rotation perhaps?
(note, you don't need to change or set auto-rotate, it will rotate regardless).
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu

Login to post a reply

Server time is: 2024-11-24 06:13:49
Your offset time is: 2024-11-24 06:13:49