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
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone
Accepted Solution

New APIs ???

Are there any new APIs in the new SDK and build

 

We were (sort of) expecting a way to force landscape programattically (my apps look dreadful in Portrait)

 

The other highly anticipated one would be the Advertizing Service

 

I know we tend to want rather want things before you're readly to let us have them so we'll (or at least I will) be understanding as we know you have the launch today in the USA




Click the like button if you find my posts useful!
Please use plain text.
BlackBerry Development Advisor (Retired)
dmateescu
Posts: 3
Registered: ‎03-25-2011
My Device: BlackBerry 9800
My Carrier: Rogers

Re: New APIs ???

[ Edited ]

Hi peardox. Thanks for your post.

In this new version of the WebWorks SDK for PlayBook we do support screen orientation. All you have to do is to use the new  <rim: orientation> element in config.xml, and the WebWorks SDK takes care of everything.

You may want to try adding the following element in config.xml:  

<rim: orientation mode="auto" />

The mode can be portait, landscape or auto (the default mode).

Hope this helps!

Please use plain text.
Developer
peardox
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: New APIs ???

Thanks

 

You have little idea how many of us have been waiting for this facility

 

That is great news!




Click the like button if you find my posts useful!
Please use plain text.
Developer
peardox
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: New APIs ???

Not quite right

 

[INFO]                  Parsing command line options
[INFO]                  Parsing bbwp.properties
[INFO]                  Validating WebWorks archive
[INFO]                  Parsing config.xml
[ERROR]                 Failed to parse config.xml - bad XML structure

 

This is understandable as the line you give us is not properly formatted XML

 

The config.xml is for a friend (he draws - exceedingly well) I code

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.3.5.23">
  <name>Anecdotes</name>
  <description>Ancient Egyptian Papyri translations, edited for the modern reader.\n\nIts the Ancient Egyptians in their own words supported with background text and full colour illustrations.</description>
  <author rim:copyright="(c) Eyelid Productions 2010" email="EgyptianAnecdotes@markmillmore.com" href="http://www.eyelidproductions.co.uk">Mark Millmore</author>
  <license>All rights reserved. No part of the publication may be reproduced,  without the prior written permission of the copyright owner.</license>
  <rim: orientation mode="landscape" />
  <access subdomains="false" uri="http://www.discoveringegypt.com">
    <feature id="blackberry.app" required="true" version="1.0.0.0"/>
    <feature id="blackberry.identity" required="true" version="1.0.0.0"/>
    <feature id="blackberry.invoke" required="true" version="1.0.0.0"/>
    <feature id="blackberry.invoke.BrowserArguments" required="true" version="1.0.0.0"/>
  </access>
  <icon rim:hover="false" src="icon.png"/>
  <content src="index.html"/>
</widget>

 




Click the like button if you find my posts useful!
Please use plain text.
BlackBerry Development Advisor (Retired)
dmateescu
Posts: 3
Registered: ‎03-25-2011
My Device: BlackBerry 9800
My Carrier: Rogers

Re: New APIs ???

Hi peardox.

Indeed, the line was not properly formatted for avoiding the happy faces to show on the tag.

You can find a sample config.xml (including the orientation tag) in the Developer Guide at http://docs.blackberry.com/en/developers/deliverables/27280/

 

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns=" http://www.w3.org/ns/widgets"
        xmlns:rim="http://www.blackberry.com/ns/widgets"
        version="2.0.0.0">

  <name> The example application</name>

  <description>
    A sample application to demonstrate some of the possibilities.
  </description>

		<rim:orientation mode="auto"/>

  <rim:loadingScreen backgroundImage="background.png"
                     foregroundImage="foreground.gif"
                     onLocalPageLoad="true">
        <rim:transitionEffect type="zoomIn"/>
  </rim:loadingScreen>

  <icon src="icons/example.png"/>

  <content src="index.html"/>

  <feature id="blackberry.ui.dialog"/>
  <access uri="http://www.somedomain.com" subdomains="true">
    <feature id="blackberry.app.event"/>
    <feature id="blackberry.invoke"/>
  </access>

</widget>
Please use plain text.
BlackBerry Development Advisor (Retired)
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: New APIs ???

[ Edited ]

Hi there,

 

Make sure not to include a space between "rim:" and "orientation".  The following are valid entries:

 

 

<rim:orientation mode="auto" />

<rim:orientation mode="landscape" />

<rim:orientation mode="portrait" />

 

Note if you do not explicitly define this element in your config, then "auto" is assumed.

 

 

Cheers,

Adam

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
peardox
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: New APIs ???

Thanks for the complete skinny on this

 

We can now lock the orientaion everyone!




Click the like button if you find my posts useful!
Please use plain text.
Developer
peardox
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: New APIs ???

Sorry to moan

 

I just noticed another line of XML

 

From the XML NS 2.0.0.0 is the phone distro

 

Well - that is not the NameSpace for the new WebWorks for Playbook

 

Apologies - answering it at this stage will stop more on this subject I would guess

 

I'll try a build




Click the like button if you find my posts useful!
Please use plain text.
Developer
peardox
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: New APIs ???

I've tried (very hard) to break it

 

The solution presented above does indeed work

 

Thank you everyone @ BB - you just made a lot of us very happy!

 

If someone manages to break it - PLEASE don't tell me - long day trying to sort this out :smileyhappy: = OK Do tell me, just not tonight :smileyhappy:




Click the like button if you find my posts useful!
Please use plain text.