Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Gp2mv3
Posts: 48
Registered: ‎02-19-2012
My Device: 2 Playbook's (16 and 32Go) + Waiting for the Dev Alpha C
My Carrier: Mobile Vikings

Rotation differences between Playbook and BB10 ?

Hi,

I've posted an app using the rotation sensors for BB10. I've no Dev Alpha so I tested my app using my Playbook (OS 2.1). My app runs fine on my Playbook but the guy who reviewed my app on the App World notified my that the rotation sensors doesn't works with his Dev Alpha.

 

So my questions are:

Is there a difference between the rotation sensor on the Playbook and on the Dev alpha ?

My app is in Landscape Mode, so, is it the same angle than on the Playbook ?

 

Thanks.

 

Gp2mv3

 

Please use plain text.
Trusted Contributor
taylor-tomt
Posts: 231
Registered: ‎11-19-2010
My Device: Z10, Playbook

Re: Rotation differences between Playbook and BB10 ?

Does your OS10 version of the app run on the simulator?

 

I also have an app that uses the gyro. It works fine on the PB and appears to work fine on the simulator. Still trying to get it onto a Dev alpha or beta device to be sure though.

 

The documentation indicates that it should work the same on OS10 as on OS2.1.

 

Are you sure its the sensor that is not working on the Dev alpha device or maybe something else in the code that is making it appear as though the sensor is not working?

Please use plain text.
Contributor
Gp2mv3
Posts: 48
Registered: ‎02-19-2012
My Device: 2 Playbook's (16 and 32Go) + Waiting for the Dev Alpha C
My Carrier: Mobile Vikings

Re: Rotation differences between Playbook and BB10 ?

On the Simulator it doesn't work, I tryed RPY and axis rotation but nothing's mobving.

But sometimes it moves right, I don't understand, like it's a bug with the simulator...

 

I'll try to output the sensors reading to know exactly what's going wrong...

 

Please use plain text.
Trusted Contributor
taylor-tomt
Posts: 231
Registered: ‎11-19-2010
My Device: Z10, Playbook

Re: Rotation differences between Playbook and BB10 ?

The 'controller' that connects to the simulator doesn't feed gyro inputs into the simulator very well at all.

 

Even the smallest movement of the controller rotation control (ie. the slider or the wheel) results in a huge gyro reading in the simulator, but at least it does verify that the program is reading gyro inputs.

 

I can only assume at this point, since I don't have a Dev alpha or beta device, that the real device will provide normal gyro readings.

Please use plain text.
Contributor
Gp2mv3
Posts: 48
Registered: ‎02-19-2012
My Device: 2 Playbook's (16 and 32Go) + Waiting for the Dev Alpha C
My Carrier: Mobile Vikings

Re: Rotation differences between Playbook and BB10 ?

[ Edited ]

I just tried to output the orientation readings and I think the problem comes from the simulator Controller...

On my Playbook it's still fine but with the simulator there is a delay between the modification with the controller and the response from the app.

 

Also the angles aren't the same in my app as the angles I putted on the controller...

 

It's realy borring because I can't do anything more with this simulator...

 

 

Can you show me your reading code ? I'm pretty lost with this issue.

Please use plain text.
Developer
step_jac
Posts: 89
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell

Re: Rotation differences between Playbook and BB10 ?

Hi Gp2mv3,

 

Rotation on the BB10 phone and Playbook are off by 90 degrees because 0 corresponds to the default device orientation which is Landscape on Playbook but Portrait on the Phone. If your implementaiton is on Playbook, Subtract 90 and wrap your angle conditionally if you are on a phone for the Orientation Check event but use the actual angle to set the screen orientation..

 

Best,

 

Stephane

Please use plain text.
Contributor
vidueirof
Posts: 25
Registered: ‎04-08-2011
My Device: Torch 9800
My Carrier: Movistar

Re: Rotation differences between Playbook and BB10 ?

Take Y axis reading as X, and X axis reading as Y. Z keep it with out changes.
Alpha device is "rotated" compared to playbook
Please use plain text.
Contributor
Gp2mv3
Posts: 48
Registered: ‎02-19-2012
My Device: 2 Playbook's (16 and 32Go) + Waiting for the Dev Alpha C
My Carrier: Mobile Vikings

Re: Rotation differences between Playbook and BB10 ?

I also figured out that the dev Alpha C is like the Playbook, in portrait mode.

Thanks for your answers.

 

Hope it can help someone. :smileywink:

Please use plain text.