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 / forcing SET Orientation in real time, is it possibble ?

Author
Message
haliop
User Banned
Posted: 11th Apr 2013 20:52
well is it?

i want in one menu for say , making the app forcing the mobile or any other rotatable device to rotate from portrait to landscape mode and backwards when needed...
i tried to find maybe force Orientation command.. but haven't found it maybe AppGameKit already supports what im after but i haven't found it.

can you help? it will be much appreciated.

ty ,
haliop.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 11th Apr 2013 21:11
SetOrientationAllowed will do this on Android, but I couldn't find a way of making iOS do an orientation change in code, the user must initiate the change.
haliop
User Banned
Posted: 11th Apr 2013 21:14
so if
and if the device is in portrait mode it will automaticly rotate the device to landscape in android but not in Ios ?

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 11th Apr 2013 21:25
Correct. On iOS once the user has rotated the device into landscape mode AppGameKit can keep it there, but it can't force a change.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 11th Apr 2013 21:39
I have had great success with iOS forcing the orientation to Landscape for quite a while. At least in Tier 2, it is easy.


I used the same basic Tier 1 commands, except for the OrientationChanged one, and it worked fine.

One of the keys is to remember to have the landscape orientation(s) as the only ones allowed in the Xcode project.

And, it doesn't hurt to manually edit the <projname>-Info.plist file to contain the following (if it doesn't already), the first one is the one that will force the orientation to where you want it:

and


Of course, if you are allowing both landscape orientations, put the 'Left' version in the supported interface orientations section. And if you prefer the left landscape (the home button on the left) as the initial orientation, change 'Right' to 'Left' in the <string> field under <key>UIInterfaceOrientation</key>.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
haliop
User Banned
Posted: 12th Apr 2013 10:59
ty Ancient Lady...
im using Tier 1
and still havent got to the part with Xcode
im checking everything with AppGameKit Player on my Iphone.

however also i dont use virtual resolution so i can use the screen precentage values correct...

do i need to use SetVirtualResolution in order to change orientation?

also im not fammiliar with the command GetOriantation(4) ...

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 12th Apr 2013 17:01
The GetOrientation command only tells you which orientation the device thinks it is in. If you mean the OrientationChanged command, that is only available in Tier 2 and it triggers things in AppGameKit to notify it that the orientation has changed (forcing it, since it didn't necessarily happen).

You don't use SetVirtualResolution at all if you are using the percentage system.

I don't know what combination of commands will work in the Percentage system to force an orientation. Or if it can be done.

But you would still use the SetOrientationAllowed command to specify that only landscape is used.

And the Player does not usually respond to code that forces an orientation to landscape, so testing on an iOS device with a Player won't let you know if your code does what you want for orientation.

Do you have a Mac type computer for working with Xcode? If you want to publish in iOS you will need one.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
haliop
User Banned
Posted: 13th Apr 2013 18:37 Edited at: 13th Apr 2013 18:38
when publishing do i need to wait for Apple to decide if its ok for their market or can i test it first?

Edit: ty for your comment.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th Apr 2013 18:51
You can set up what they call Ad Hoc testing, but it won't be posted in the App Store.

But, before you can even do that (or actually test on your own devices) you need to sign up with Apple for there iOS Developer's Program at $99/year (which must be maintained as long as you want your app out there in the world).

Once you have signed up (and it takes a bit of time because they want to validate who you are), then you can add test devices and create the appropriate provisioning certificates and things.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
haliop
User Banned
Posted: 13th Apr 2013 19:12
i see ok ... i think i'll start using Android Devices since there is no money involved... and in israel 99$ is about 370 Israeli Shekels which is not much for a year long registration.. ok , thank you for the info i'll try my best.. i'll wait to test it on some Android Devices and see whats going on .. then i'll go ahead and move onto Apple Dev , cause i do need a Mac also ... btw.. can i just use Apple PC OS to use XCode? or do i need a Real Mac machine? cause i can install only the OS i think... dont really know.. but it would save me some money.. since when i'm buying a comp... i usually buy something good even if its only for Xcode it will be nice to have a Mac to work with..

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th Apr 2013 20:38
I believe you need a real Mac. Apple doesn't allow you to run any of their OS's on anything but a Mac device. That includes virtualization.

Several of us work with Mac Minis and they are just fine (4GB or better RAM is suggested). A Mac Mini costs a lot less than the other Mac alternatives, especially if you have a monitor, keyboard and mouse that you can use with it.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 13th Apr 2013 22:32
Apple don't like apps that changes the orientation without user consent, I think any app doing it will fail app evaluation.

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th Apr 2013 23:39
I have several apps on my iOS devices that force a single orientation.

I think for generic apps, Apple might have an issue. But for games they don't seem to care. My current WIP is going to be one that only works in Landscape.

So, as long as it is a game (and the orientation is important to game play), Apple should accept it.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 14th Apr 2013 00:08
Limiting the orientation to landscape is fine but making the app change orientation dynamically without user input isn't, which is what I think the original post was about
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 14th Apr 2013 00:14
As I said, I have several Apple apps that force landscape.

I haven't tried swapping orientations after the initial setting. I suspect that is not doable in Tier 1 (without the OrientationChanged command).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
haliop
User Banned
Posted: 14th Apr 2013 09:28
aha! im glad i gave you guys some ideas about dynamicly change the Orientation in game

hmm... ok found a way around it , ty for your help and i hope i gave you some fresh ideas to think about

ty all for answering me , this was ,still is and will be a Great Forum and Members. thank you.

Login to post a reply

Server time is: 2024-05-04 16:28:33
Your offset time is: 2024-05-04 16:28:33