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.

Android / WARNING to android developers using the andriod.manifest set landscape hack

Author
Message
westalke
12
Years of Service
User Offline
Joined: 8th Dec 2011
Location:
Posted: 28th Dec 2011 12:03
Hey all,

Just a quick heads up to anyone using the set landscape hack in the android.manifest to get the keyboard rotated to the correct position.

While this works perfectly fine for a single agk app installed on a device - if a second agk app gets installed that does NOT have the set landscape hack installed - in other words its a portrait based app.

Then things will start to get weird.

The reason for this is that when the first app is installed - the one with the set landscape hack - it creates a calibration.cfg file that is global to the device - as opposed to a specific calibration.cfg file to that individual app.

This is complicated further by the fact that the calibration data is created with respect to the hacked landscape orientation - as opposed to the unhacked portraint orientation.

When the second app runs - it tries to use this exact same calibration data - but it is NOT in the forced landscape orientation - so it will ALWAYS display in the wrong alignment.
Basically - the second app will show 90degrees out of alignment from what it should.

Not totally sure what the solution here is yet - but it is something the DEVS need to get sorted out asap.

As the problem is going to start to compound greatly as more and more agk apps get released - each with their own take on the android orientation / calibration issue.

Westa
paul5147
18
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 28th Dec 2011 13:31 Edited at: 28th Dec 2011 14:11
Did you not make the changes in core.cpp to remove the calibration settings first?
I have a couple of apps running in both portrait and landscape without issue now after changing that file and the manifest.
Edit:
Sorry Westa my method doesnt seem to work on another device ive just tried , i get the same problem as you,but it does on my asus transformer so its probably device specific.I simply told it not to read the config file if present and hard coded the values i needed for each app.
westalke
12
Years of Service
User Offline
Joined: 8th Dec 2011
Location:
Posted: 28th Dec 2011 23:22
There are issues on different devices if u don't calibrate ... especially tablets with hardware based orientation locks.

When I get a moment to spare will look at the core code some ... think safest option is to just rename calibration.cfg.

There are also some issues with using AGKsplash.PNG basically it shows in the wrong orientation

West a
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Dec 2011 03:22
Guess you meant Caution... not Warning... hope this gets resolved...

westalke
12
Years of Service
User Offline
Joined: 8th Dec 2011
Location:
Posted: 29th Dec 2011 08:01
Nah i'd say warning of you are using the landscape hack.

It really does mess things up - didn't discover it on one device till we were showing a client some demo stuff - hmmm doh.

Anyway - best solution for now is to build a custom version of the interpreter library using the NDK with the name of the config file changed to something unique to your app.

That way other agk games can coexist on the same device without issues.

Westa

Login to post a reply

Server time is: 2024-03-28 11:33:56
Your offset time is: 2024-03-28 11:33:56