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

Java Development

Reply
Developer
Posts: 1,006
Registered: ‎05-22-2009
My Device: Not Specified

9930 Simulator problem-App Moves to landscape mode when coming from browser field

Hi ,I am having the app which needs to be used on 7.0 OS,SO When i open the browserfield from my app and after opening  when i am closing the browserfield and when i am returning back to app,Screen is in Landscape automatically,Is this simulator problem?(9930 Simulator problem) or Will it happen in device or not.

 

Did anyone faced this sort of isssue?

 

Regards

Rakesh shankar.P

BlackBerry Development Advisor
Posts: 15,727
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: 9930 Simulator problem-App Moves to landscape mode when coming from browser field

When this happens, is the device oriented in portrait or landscape?  Can you post some sample code that triggers this?

 

Are you controlling the orientations available to your application.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Contributor
Posts: 19
Registered: ‎01-18-2011
My Device: Bold 9000
My Carrier: at&t

Re: 9930 Simulator problem-App Moves to landscape mode when coming from browser field

Hey, Mark Sohm

 

In My UIApplication's main method, I set this

 

public static void main(String[] args) {  

       UiAPplication ab = new XXUiApplication();

       Ui.getUiEngineInstance().setAcceptableDirections(Display.DIRECTION_PORTRAIT);  

       ab.enterEventDispatcher();   

}

 

and it is not in portrait, but landscape mode. (9930 simulator)

Developer
Posts: 1,006
Registered: ‎05-22-2009
My Device: Not Specified

Re: 9930 Simulator problem-App Moves to landscape mode when coming from browser field

As yincan pointed,it happens in simulator ,I dont have the device to check it ,out and if use it as Display.DIRECTION_LANDSCAPE it works properly(i.e) in portrait mode.

 

When the I am going to browser field within my app.in case if i switch back to the app screen,it goes to landscape mode,I think it might be been due to the orientation that i have set as Landscape.

 

Normally as yincan pointed,if i set it out as Portrait mode,it is always coming out in Lanscape mode,I teested in simulator 9900.

 

Sorry for the delayed response.

 

 

Regards

Rakesh Shankar.P

BlackBerry Development Advisor
Posts: 15,727
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: 9930 Simulator problem-App Moves to landscape mode when coming from browser field

I have been able to reproduce this.  You can use DIRECTION_NORTH instead of DIRECTION_PORTRAIT as a workaround.

 

Our development team is aware of this issue has been fixed internally.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Highlighted
New Developer
Posts: 4
Registered: ‎03-05-2012
My Device: Curve 8900
My Carrier: Vodafone

Re: 9930 Simulator problem-App Moves to landscape mode when coming from browser field

Hi Mark Sohm,

 

I am new to blackberry development.

My appication has to work in bold 9930.

I am testing my app in 9930 simulator.

When i click on application icon, the home screen by default coming in landscape mode.

I have changed the direction options to NORTH and LANDSCAPE also.

But still it is displaying in Landscape mode only.

Below is my code.

----------------------------------

                  if(Display.getWidth() == 640 && Display.getHeight() == 480)
                        direction = net.rim.device.api.system.Display.DIRECTION_NORTH;
                   else
                        direction = net.rim.device.api.system.Display.DIRECTION_PORTRAIT;
                  net.rim.device.api.ui.Ui.getUiEngineInstance().setAcceptableDirections(direction);

--------------------------------------

 I need replay as early as possible.

 

Thanks,

Suresh Basina.