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
New Contributor
Posts: 8
Registered: ‎06-28-2013
My Device: Blackberry Z10 developer
My Carrier: none

Orientation not working anymore

Hi everyone,

I am developing an application that invokes the native mediaplayer and I have trouble handling the phone orientation.
Here's the thing : my application is blocked in portrait mode but I want the phone to switch and block to landscape mode when he's playing a video and then go back to portrait mode when he's done.
This is what I did so far :

- when the user invokes the mediaplayer

 

support->setSupportedDisplayOrientation(SupportedDisplayOrientation::DisplayLandscape);
InvokeRequest request;
	request.setTarget("sys.mediaplayer.previewer");
	request.setAction("bb.action.open");

 


- when the user go back to the app

 

support->resetSupportedDisplayOrientation();

 I blocked the orientation to portrait in the bar-descriptor.xml file.


This works when I build my app but when I uploaded it on the store in sandbox mode it stopped working.
Do you know what could cause this ? Is there a difference between the app we build and the one we put on the store ?

Also it used to work when the device had the 10.1 version even on the store, the problem appeared when I updated my device in 10.2.

 

Thanks

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Orientation not working anymore

[ Edited ]

Have you seen the current problems being reported with sensors and rotation for 10.2.

 

It could be this...

 

http://crackberry.com/having-issues-sensors-your-device-youre-not-alone

 

I've found when helping other users that a hard reboot (i.e. hold down power button for 10 seconds) fixes the problem.

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Orientation not working anymore

... and in fact that is what CrackBerry is now reporting to.

 

Annoying, perhaps if I'd have answered the problems on CrackBerry rather than these forums, I would have been mentioned instead (some free advertising). :smileyhappy:


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.