Android "faceDown" orientation not firing

Is anyone able to get this to work on an Android device? I an unable to get the device to register the faceDown orientation, regardless of build settings. 

[lua]

local function introOrientation(event)

   local currentOrientation = event.type

   print (currentOrientation)

   if currentOrientation == “faceDown”  then 

      print (“UPSIDE DOWN”)

   end

end

Runtime:addEventListener( “orientation”, introOrientation )

[/lua]

I have no idea how this happens in the Corona docs, but searching for this info returns the below results:

1lXrwkS.png

Note the “Gotcha” in the description of the first link. Clicking on that first link, however, doesn’t present that information in the doc page. Very strange, but the fact remains that the event seems to only fire on iPads.

https://docs.coronalabs.com/api/event/orientation/type.html

Wow. Just built an entire application assuming the existing documentation reflected the expected behavior. I wonder if somebody from Corona could weigh in here with some insight - is this supposed to work on Android at all? Please say yes… :slight_smile:

Only a subset of iOS devices supports “faceDown” and “faceUp” orientations.  Typically iPads and new’ish iPhones.  This is a limitation on iOS since it’s the one providing these events.

No other platform supports these orientations.

If this is something you want on all platforms, then you’ll have to calculate it yourself via the gyroscope and accelerometer.

OK, thanks Josh. Just a heads up, this information does not appear in the documentation. I sure wish it had, but what are you gonna do?

https://docs.coronalabs.com/api/event/orientation/index.html

Anybody reading this who might have already done the gyro and accel calculations want to donate some code :slight_smile: ?

6ztme4H.gif

http://simon.fearby.com/blog/?p=2134

Sweet - much appreciated Alex.

I have no idea how this happens in the Corona docs, but searching for this info returns the below results:

1lXrwkS.png

Note the “Gotcha” in the description of the first link. Clicking on that first link, however, doesn’t present that information in the doc page. Very strange, but the fact remains that the event seems to only fire on iPads.

https://docs.coronalabs.com/api/event/orientation/type.html

Wow. Just built an entire application assuming the existing documentation reflected the expected behavior. I wonder if somebody from Corona could weigh in here with some insight - is this supposed to work on Android at all? Please say yes… :slight_smile:

Only a subset of iOS devices supports “faceDown” and “faceUp” orientations.  Typically iPads and new’ish iPhones.  This is a limitation on iOS since it’s the one providing these events.

No other platform supports these orientations.

If this is something you want on all platforms, then you’ll have to calculate it yourself via the gyroscope and accelerometer.

OK, thanks Josh. Just a heads up, this information does not appear in the documentation. I sure wish it had, but what are you gonna do?

https://docs.coronalabs.com/api/event/orientation/index.html

Anybody reading this who might have already done the gyro and accel calculations want to donate some code :slight_smile: ?

6ztme4H.gif

http://simon.fearby.com/blog/?p=2134

Sweet - much appreciated Alex.