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 / Orientation Issue

Author
Message
RobPugh0829
8
Years of Service
User Offline
Joined: 7th Feb 2016
Location:
Posted: 16th Jun 2016 05:23
Hi Everybody,
I'm using AppGameKit 2 and I'm very happy with it. However, I ran into an issue, and I was hoping somebody could help me. I want to make it so when my app loads, it is automatically in landscape and stays there. I don't want it to be portrait at all. I want it to load in landscape and stay in landscape. Any help at all would be appreciated.

Thanks!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Jun 2016 08:25
You need SetOrientationAllowed()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 16th Jun 2016 09:46
Also, put more details into your subject. "I need help with something" doesn't help when people are using the search facility to find information in the forums.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Jun 2016 10:40
Thread subject changed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
RobPugh0829
8
Years of Service
User Offline
Joined: 7th Feb 2016
Location:
Posted: 17th Jun 2016 04:33
Thanks for the help. When I run my app over the agk app for testing. It still loads in portrait, even if I do setorientationallowed(0,0,1,0). What I want to have happen is when the app loads, I don't want it to load in portrait at all, I want it to load right into landscape. Any help would be appreciated. Thanks!
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 17th Jun 2016 07:47
The AppGameKit Player will have it's own orientation settings that will mess up your own. Try exporting an APK and install directly on the device. Should work fine.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 17th Jun 2016 09:04
The player will start in the orientation the device is in when the player is started. Hold the device in Landscape first, then start the player.
RobPugh0829
8
Years of Service
User Offline
Joined: 7th Feb 2016
Location:
Posted: 17th Jun 2016 14:33
Ok, so if I make an apk and put it on the device, it will automatically load in landscape when I have the setorientationallowed(0,0,1,0)? How about on IOS? Thanks! I appreciate all of your help!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Jun 2016 02:40
There are settings in both iOS (the <appname>.plist file) and Android (the AndroidManifest.xml file) to specify the initial orientation that an app should run in.

You can also specify the initial orientation and restrict the orientation somewhere in the iOS Xcode project.

I've attached the ones used for a demo project. They are about 2.5 years old, but I think the current files would be similar.
Cheers,
Ancient Lady

Attachments

Login to view attachments
RobPugh0829
8
Years of Service
User Offline
Joined: 7th Feb 2016
Location:
Posted: 20th Jun 2016 03:38
Thanks so much for posting that. I made the apk file landscape which you can do now with the export, or you can do with the setscreenorientation(0,0,1,0) like I did, but now it's showing up in landscape, but it looks like portrait, it is starting to drive me nuts now, lol. Any ideas?

Login to post a reply

Server time is: 2024-11-17 09:04:48
Your offset time is: 2024-11-17 09:04:48