Android Orientation Woes

Dan Friedman dan at clearvisiontech.com
Fri Aug 31 17:00:28 EDT 2012


Hi!

In an iOS project I have a button on the screen that when you tilt the device, it slides left or right.  Using the accelerationChanged message, this is easy.  However, now that I am trying to replicate this on Android, it's not working.  The "x" value retuned by accelerationChanged is all wrong!  I see a discussion in the Android Release Notes about this but I can't make any sense of what they are talking about:

"In order to correct orientation handling for this device, you must include a file named lc_device_config.txt in your APK bundle. Do this by adding the file in the Copy Files pane of the Standalone Builder. This file is used to map a device's to orientation to accelerometer value and is parsed by the Android engine on startup. If the current device matches an entry in the file, the orientation settings in that entry will be used."

Does anyone know what this means?  How to implement it? Or another way to deal with different devices having different 0 degree settings?

Thanks in advance,
-Dan




More information about the use-livecode mailing list