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

Web and WebWorks Development

Reply
New Contributor
Posts: 4
Registered: ‎03-01-2010
My Device: Curve 8530
My Carrier: Sprint
Accepted Solution

BlackBerry 10 Alpha orientation lock

Is it possible in BB10 Alpha?  

 

so far, I tried:

 

config.xml:

<feature id="blackberry.app.orientation">
<param name="mode" value="portrait" />
</feature>

 

config.xml:

 <feature id="blackberry.app">

<param name="mode" value="portrait" />
</feature>

 

config.xml:

<feature id="blackberry.app">
<param name="orientation" value="portrait" />
</feature>

 

 config.xml:

 <rimSmiley Surprisedrientation mode="string"/>

   

 

first line of js:

blackberry.app.lockOrientation("portrait-primary");

 

 

Is it possible in BB10 Dev Alpha?  

 

Thanks,

 

 

Retired
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: BlackBerry 10 Alpha orientation lock

[ Edited ]

It should be possible for sure. Looks like you have covered all the cases. When I gave it a try things seemed to work well for me. If I use this:

 

<feature id="blackberry.app">
    <param name="orientation" value="portrait" />
</feature>

or this:

<feature id="blackberry.app">
    <param name="orientation" value="landscape" />
</feature>

It does not rotate and will start up in portrait or landscape. Did I understand your issue correctly?

@erikjohnzon
erjohnson@blackberry.com
New Contributor
Posts: 4
Registered: ‎03-01-2010
My Device: Curve 8530
My Carrier: Sprint

Re: BlackBerry 10 Alpha orientation lock

this is what I have for my config.xml:

 

<?xmlversion="1.0"encoding="UTF-8"?>

 

<widgetxmlns="http://www.w3.org/ns/widgets"xmlns:rim="http://www.blackberry.com/ns/widgets"version="1.1.0.522"id="xxxxx">

 

  <name>RemoteLink</name>

  <authorhref="http://www.xxxxx.com">xxxxx, LLC</author>

 

  <featureid="blackberry.identity"required="true"version="1.0.0.0"/>

  <featureid="blackberry.app">

<paramname="orientation"value="portrait"/>

  </feature>

 

  <accesssubdomains="true"uri="*"/>

  <accesssubdomains="true"uri="http://xxx.xxx.xxx.xxx/"/>

  <accesssubdomains="true"uri="http://*/"/>

 

 

  <iconsrc="resources/app_icon_img.png"/>

 

  <rim:splashsrc="resources/img_launch_img.png"onLocalPageLoad="true"onFirstLaunch="true"/>

 

  <rim:connectiontimeout="30000">

    <id>TCP_CELLULAR</id>

    <id>TCP_WIFI</id>

    <id>MDS</id>

    <id>BIS-B</id>

    <id>WAP2</id>

    <id>WAP</id>

  </rim:connection>

 

  <rimSmiley Tongueermissions> 

    <rimSmiley Tongueermit>read_geolocation</rimSmiley Tongueermit> 

  </rimSmiley Tongueermissions>

 

  <contentsrc="index.html">

  </content>

  

</widget>

 

 

 

 

The orientation won't lock.  Did I do anything wrong?  

Retired
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: BlackBerry 10 Alpha orientation lock

<paramname="orientation"value="portrait"/>

 

should be:

 

<param name="orientation"value="portrait"/>

 

@erikjohnzon
erjohnson@blackberry.com
New Contributor
Posts: 4
Registered: ‎03-01-2010
My Device: Curve 8530
My Carrier: Sprint

Re: BlackBerry 10 Alpha orientation lock

Thanks for the quick reply.  

 

I was using param name... somehow the file concat when I copy and paste it.  Is it in the right place?  

 

Doubt that matter but the js also redirect the page to something other than index.html

Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: BlackBerry 10 Alpha orientation lock

At the moment I use this to lock Landscape...

 

The first line is for PlayBook and so optional, the rest is for BB10

 

    <rimSmiley Surprisedrientation mode="landscape"/>
    <feature id="blackberry.app">
        <param name="orientation" value="landscape" />
    </feature>

I find it easier to test on a PB owing to the larger screen-size so try keeping apps compatible on both when possible




Click the like button if you find my posts useful!