tablet related accelerometer question

ok… so a phone’s default orientation is portrait but a tablet’s default orientation is horizontal.

How can i easily tell if a device is a tablet so that I can handle accelerometer appropriately?

currently my game works fone on phones but a user contacted me stating that the accelerometer controls dont work properly. meaning that if they hold the device in portrait orientation the accelerometer controls work properly but not while holding the tablet in landscape which is the way the game is meant to be played.

[import]uid: 27671 topic_id: 9876 reply_id: 309876[/import]

The default orientation in honeycomb is landscape which is throwing off my tilt code.

Is there a way to tell if the device runs honeycomb (Android 3.x)?

if not is there anything else i can do so that tilt controls always work in my game? my game is set always to be in landscape.
Thanks!
[import]uid: 27671 topic_id: 9876 reply_id: 36163[/import]

can anyone from anscamobile shed some light on this?

is it a bug?
is there a known work around?
[import]uid: 27671 topic_id: 9876 reply_id: 36449[/import]

Have you tried this in your accel code?

[code]
if system.orientation == “landscapeLeft” then
– Accel code

elseif
if system.orientation == “landscapeRight” then
– Accel code

elseif
if system.orientation == “portrait” then
– Accel code

elseif
if system.orientation == “portraitUpsideDown” then
– Accel code

elseif
if system.orientation == “faceUp” then
– Accel code

elseif
if system.orientation == “faceDown” then
– Accel code

end
[/code] [import]uid: 13560 topic_id: 9876 reply_id: 36596[/import]

I have not tried that but i will.

The game only allows landscape left.

So not sure if this will do anything but ill give it a shot. [import]uid: 27671 topic_id: 9876 reply_id: 36603[/import]

So it’s the accel controls that are wrong?

If you use the

system.orientation == "landscapeLeft" then

and add parameters to obtain platform specific info with

 system.getInfo(" ") 

then I think you should be set.

Also, how did you configure the build.settings?
Did you set up for autorotation there or did you define it to only use landscapeLeft?

I’ve been testing the accelerometer a lot lately in various configurations and I noticed it’s a bit buggy when you use autorotation, it’s like it can’t handle changes very well and laggs or sometimes hangs?

Maybe there’s a way to write a filter for the accelerometer like there is with Obj-C? [import]uid: 13560 topic_id: 9876 reply_id: 36605[/import]