On 8/31/12 4:00 PM, Dan Friedman wrote:
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?

I've tried to figure that out too. My interpretation is that you need to provide a list of all supported devices and somehow indicate how each one is to be oriented. It almost sounds like we need to figure out in advance the name and type of every possible Android device, but that can't be right. The instructions aren't clear, and the format for the text file isn't described.

The problem isn't just LiveCode though, it seems to be universal. My Android tablet has three compass apps installed, and each one thinks "north" is a different direction. None of them are right, though one comes close. I also have two different bubble-level apps and neither one can figure out which way is "up", they are both upside down.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to