<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>BlackBerry Developer Blog &#187; apis</title>
	<atom:link href="http://devblog.blackberry.com/tag/apis/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.blackberry.com</link>
	<description></description>
	<lastBuildDate>Fri, 17 May 2013 17:47:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='devblog.blackberry.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/9ef0a66c09615fa946c4179662398878?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>BlackBerry Developer Blog &#187; apis</title>
		<link>http://devblog.blackberry.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://devblog.blackberry.com/osd.xml" title="BlackBerry Developer Blog" />
	<atom:link rel='hub' href='http://devblog.blackberry.com/?pushpress=hub'/>
		<item>
		<title>Top 10 Developer Posts on BlackBerry 10</title>
		<link>http://devblog.blackberry.com/2012/10/top-10-developer-posts-on-blackberry-10/</link>
		<comments>http://devblog.blackberry.com/2012/10/top-10-developer-posts-on-blackberry-10/#comments</comments>
		<pubDate>Wed, 10 Oct 2012 18:36:10 +0000</pubDate>
		<dc:creator>Veronica O</dc:creator>
				<category><![CDATA[Adobe AIR Development]]></category>
		<category><![CDATA[Android Development]]></category>
		<category><![CDATA[BlackBerry Jam]]></category>
		<category><![CDATA[BlackBerry World]]></category>
		<category><![CDATA[Cascades]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Native SDK Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[native]]></category>
		<category><![CDATA[SDKs]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=11525</guid>
		<description><![CDATA[In honor of 10/10 and the opening of BlackBerry App World™ for BlackBerry 10 app submissions, we’ve put together a list of the 10 most viewed blog posts in the developer blog about BlackBerry 10. It’s been an eventful couple of months! Check out how far we’ve come: BlackBerry 10 Cascades™ is here! Introducing Built [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11525&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:left;"><a href="http://us.blackberry.com/campaigns/blackberry-10.html"><img class="aligncenter" title="BlackBerry Jam Americas" src="http://farm9.staticflickr.com/8460/8027758052_43d89ff120.jpg" alt="TITLE_IMAGE" width="500" height="333" /></a></p>
<p style="text-align:left;">In honor of 10/10 and the opening of BlackBerry App World™ for BlackBerry 10 app submissions, we’ve put together a list of the 10 most viewed blog posts in the developer blog about BlackBerry 10. It’s been an eventful couple of months! Check out how far we’ve come:</p>
<ol>
<li><a href="http://devblog.blackberry.com/2012/05/blackberry-10-cascades-available-now/" target="_blank">BlackBerry 10 Cascades™ is here!</a></li>
<li><a href="http://devblog.blackberry.com/2012/09/built-for-blackberry-10k-developer-commitment/" target="_blank">Introducing Built for BlackBerry and the $10K Developer Commitment</a></li>
<li><a href="http://devblog.blackberry.com/2012/08/blackberry-10-screen-resolutions/" target="_blank">Standardizing on Screen Resolutions for BlackBerry 10 devices</a></li>
<li><a href="http://devblog.blackberry.com/2012/05/blackberry-10-native-sdk/" target="_blank">The BlackBerry 10 Native SDK Experience</a></li>
<li><a href="http://devblog.blackberry.com/2012/05/blackberry-10-webworks-sdk/" target="_blank">BlackBerry 10 WebWorks™ SDK Released!</a></li>
<li><a href="http://devblog.blackberry.com/2012/06/blackberry-10-sdks-download-now/" target="_blank">BlackBerry 10 – The Evolution from Beta to Gold</a></li>
<li><a href="http://devblog.blackberry.com/2012/08/flight-arrival-boards/" target="_blank">Flight Arrival Boards have been posted!</a></li>
<li><a href="http://devblog.blackberry.com/2012/08/blackberry-10-user-agent-string/" target="_blank">The BlackBerry 10 User Agent String Has Arrived!</a></li>
<li><a href="http://devblog.blackberry.com/2012/05/blackberry-10-samples/" target="_blank">BlackBerry 10 Samples Galore</a></li>
<li><a href="http://devblog.blackberry.com/2012/06/bbui-js-community-tutorial/" target="_blank">Creating Outstanding Apps with bbUI.js – Community Tutorial</a></li>
</ol>
<p><a href="http://devblog.blackberry.com/2012/10/submit-apps-blackberry-10/" target="_blank">Now, you can submit your app to the BlackBerry App World for BlackBerry 10.</a></p>
<p>What was your favorite BlackBerry 10 related blog post? Share with us in the comments below!</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='640' height='390' src='http://www.youtube.com/embed/UiDJwIgdKmM?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/11525/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/11525/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11525&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/10/top-10-developer-posts-on-blackberry-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b375d2578c668cc015d7452d495c9ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">veronchiquita</media:title>
		</media:content>

		<media:content url="http://farm9.staticflickr.com/8460/8027758052_43d89ff120.jpg" medium="image">
			<media:title type="html">BlackBerry Jam Americas</media:title>
		</media:content>
	</item>
		<item>
		<title>Ripple Emulator Refreshed</title>
		<link>http://devblog.blackberry.com/2012/08/ripple-emulator-refreshed/</link>
		<comments>http://devblog.blackberry.com/2012/08/ripple-emulator-refreshed/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 19:30:35 +0000</pubDate>
		<dc:creator>Ken W</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Apache Cordova]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[blackberry webworks]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[emulator]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[refresh]]></category>
		<category><![CDATA[ripple]]></category>
		<category><![CDATA[Ripple Emulator]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=10754</guid>
		<description><![CDATA[Many great APIs and features have been delivered to our BlackBerry® WebWorks™ developer community with the recent updates to the BlackBerry WebWorks SDK. The Ripple Emulator is a key part of our tooling story for our web developers, and Ripple just got richer. Today we have released Ripple 0.9.8 with some excellent new features. If [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10754&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-10755" title="" src="http://rimdevblog.files.wordpress.com/2012/08/ripple-refresh.jpg?w=285&#038;h=547" alt="TITLE_IMAGE" width="285" height="547" /></p>
<p>Many great APIs and features have been delivered to our BlackBerry® WebWorks™ developer community with the recent updates to the BlackBerry WebWorks SDK. The Ripple Emulator is a key part of our tooling story for our web developers, and Ripple just got richer. Today we have released Ripple 0.9.8 with some excellent new features. If you already have our Ripple Emulator installed, then you should be updated automatically the next time you start Google Chrome. If you haven’t yet installed Ripple, then don’t hesitate &#8212; get on your (virtual) scooter and head over to the <a href="http://developer.blackberry.com/html5/download/ripple" target="_new">Ripple download page</a> to get the latest version. Please pay careful attention to the <a href="http://developer.blackberry.com/html5/documentation/installing_the_ripple_emulator.html" target="_new">install instructions</a>, as with the latest versions of Chrome, you can only install the Extension by dragging it right into the chrome://extensions page.</p>
<p><span id="more-10754"></span></p>
<p>In this update to Ripple, you will find a new area in the Chrome Extension panel for Ripple that will allow you to start and stop the build and deploy services from within the tool itself. You will no longer need to start and stop the services manually. You can even set the services to start and stop each time your start Chrome if you like. This should be welcome relief compared to previous versions where you needed to start the services from the command line.</p>
<p>Also in this release is emulation for a number of APIs delivered in recent BlackBerry WebWorks SDK releases:</p>
<ul>
<li>Blackberry.app.exit</li>
<li>Software version and hardwareId</li>
<li>Support for the swipedown event</li>
<li>Support for the Invoke framework, both invoking other applications and being invoked</li>
</ul>
<p>Further, enhanced support for Apache Cordova emulation is included. A bunch of work has been done here, including:</p>
<ul>
<li>Navigator.camera</li>
<li>The media APIs</li>
<li>The File APIs</li>
<li>Events</li>
<li>Navigator.contacts</li>
<li>Partial support for the navigator.device.capture API</li>
</ul>
<p>We are really excited about how Ripple is evolving, and look forward to hearing your feedback on the latest additions. Fire up Google Chrome if you already have Ripple installed and start playing with the new features. Otherwise, head over to the <a href="http://developer.blackberry.com/html5/download/ripple" target="_new">Ripple download page</a> to get the latest version and get started!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/10754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/10754/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10754&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/08/ripple-emulator-refreshed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3b422c1a037b89d4ddf5bef834dbdeef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kjwallis</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/08/ripple-refresh.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>
	</item>
		<item>
		<title>Choose your own adventure with BlackBerry WebWorks</title>
		<link>http://devblog.blackberry.com/2012/08/blackberry-10-webworks-sdk-update/</link>
		<comments>http://devblog.blackberry.com/2012/08/blackberry-10-webworks-sdk-update/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 18:28:46 +0000</pubDate>
		<dc:creator>Ken W</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[.BAR]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[BlackBerry 10 WebWorks SDK]]></category>
		<category><![CDATA[blackberry webworks]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[platform]]></category>
		<category><![CDATA[refresh]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=10741</guid>
		<description><![CDATA[We’ve just posted a new release to the BlackBerry 10 WebWorks SDK.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10741&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h3><strong>BlackBerry 10 WebWorks SDK Refreshed</strong></h3>
<p><a href="http://rimdevblog.files.wordpress.com/2012/08/download-splash-copy.png"><img class="aligncenter size-full wp-image-10761" title="download-splash copy" src="http://rimdevblog.files.wordpress.com/2012/08/download-splash-copy.png?w=526&#038;h=262" alt="TITLE_IMAGE" width="526" height="262" /></a></p>
<p>Hopefully you aren’t getting tired of me yet, and I’m sure you are not tired of the updates to the BlackBerry® WebWorks™ SDK. We’ve just posted a new release, and it squarely falls in the high-value realm. While incremental, it empowers a significant feature of the BlackBerry WebWorks platform: custom API extensions. That’s right, like previous BlackBerry WebWorks platforms, you can now write your own extensions to enable native capabilities not yet exposed by the pre-packaged BlackBerry WebWorks APIs!</p>
<p>First, let’s quickly mention the other major item in this release: Now, when you build your application, you can pass a configuration file to bbwp.exe &#8211; the main command line tool for BlackBerry WebWorks &#8211; which will pass parameters on to the other downstream command line tools that bbwp.exe leverages. bbwp.exe is your main command line tool to create your applications for BlackBerry WebWorks: it will give you your .BAR file and even sign it for you. However, under the covers, it uses a couple of other command line tools that are part of the BlackBerry tool chain to perform these actions such as creating the .BAR and signing it. These other tools sometimes have parameters that are not exposed by bbwp.exe. With this release, we have provided a parameter (-p or &#8211;param) on bbwp.exe to provide a file on the bbwp.exe command line that you can use to pass on to the downstream tools any additional parameters you choose. It is a simple json structure that you can mark up. The main use case we hear quite often is providing the signing tool with proxy settings. Check out the params-example.json file in the root of your BlackBerry® 10 WebWorks SDK installation for an example. It contains the framework for providing parameters to the other two tools, the native packager that creates the .BAR, and the signing tool which signs the .BAR.</p>
<p><span id="more-10741"></span></p>
<p>OK, now back to custom extensions. As a quick recap, BlackBerry WebWorks APIs are conceptually comprised of two different things: an API or service in the native platform, and a JavaScript® front-end to this native service. All of the APIs that are part of the official BlackBerry WebWorks SDK take advantage of this architecture and a system called jNext. jNext is what binds the JavaScript layer to the native layer. You can now build your own API extensions in exactly the same way we do.</p>
<p>To get started, you will first need to download our BlackBerry 10 Native SDK and configure it. This will give you access to all that the native environment offers. <a href="https://developer.blackberry.com/native/beta/download/" target="_new">Go do that now</a> and come back here for the next step.</p>
<p>All right, you’re back. Next step is to visit our <a href="http://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10" target="_new">GitHub Community API repo</a> and download the sample BlackBerry 10 Native SDK project we have provided. This sample project is a working example of an extension that monitors memory usage on the device. Everything you need to create your own extension is modeled here. A full walk-through of the project and its components can be found in the README associated with the project in the GitHub repository, so check that out next, and get working on your extension.</p>
<p>Once you are done, I highly recommend that you check out our <a href="https://github.com/blackberry/WebWorks-Community-APIs" target="_new">Community API repository</a>, and seriously consider contributing your extension to the repository so that others can take advantage of your awesome work. To contribute the extension you will need to apply the ASL 2.0 license, and complete a few other administrative things, but then the whole BlackBerry WebWorks community can benefit.</p>
<p>One thing to bear in mind with your extension: we really didn’t want to hold back on releasing this feature to our community, but we do know that one thing will change in our next BlackBerry WebWorks SDK release. When you completed your extension, you would have had to create/modify a file called manifest.json. This file provided metadata regarding your extension. Moving forward, we will very likely model the format of this file after the <a href="http://wiki.commonjs.org/wiki/Packages/1.1" target="_new">CommonJS package.json file format</a> (used by npm modules). This should not constitute very much refactoring, as the current file format is very concise, and the community alignment is valuable in itself.</p>
<p>OK, that’s it for this release. As always the team is working on some exciting stuff for the next release. I can’t wait for the next release! Until then, head over to our <a href="http://developer.blackberry.com/html5/download/sdk" target="_new">download page</a> and our <a href="http://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10" target="_new">GitHub repo</a> to start working on your custom extensions!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/10741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/10741/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10741&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/08/blackberry-10-webworks-sdk-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3b422c1a037b89d4ddf5bef834dbdeef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kjwallis</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/08/download-splash-copy.png" medium="image">
			<media:title type="html">download-splash copy</media:title>
		</media:content>
	</item>
		<item>
		<title>Bringing your BlackBerry PlayBook apps to BlackBerry 10</title>
		<link>http://devblog.blackberry.com/2012/05/blackberry-playbook-apps-on-blackberry-10/</link>
		<comments>http://devblog.blackberry.com/2012/05/blackberry-playbook-apps-on-blackberry-10/#comments</comments>
		<pubDate>Wed, 09 May 2012 17:32:51 +0000</pubDate>
		<dc:creator>russellandrade</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Native SDK Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[blackberry playbook]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[native]]></category>
		<category><![CDATA[native apps]]></category>
		<category><![CDATA[Native Development Kit]]></category>
		<category><![CDATA[native sdk]]></category>
		<category><![CDATA[orientation]]></category>
		<category><![CDATA[porting]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=9160</guid>
		<description><![CDATA[Going over two important upcoming changes to the BlackBerry 10 Native SDK in order to help developers prepare for upcoming releases, and examining how developers can easily port their BlackBerry PlayBook tablet apps to BlackBerry 10.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9160&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>While all the SDKs for <a href="http://blogs.blackberry.com/2012/05/blackberry-10-world-keynote/" target="_new">BlackBerry®</a> 10 are amazing, our pride and joy is the BlackBerry 10 Native SDK. If you’ve built native apps for the <a href="http://www.blackberry.com/playbook" target="_new">BlackBerry® PlayBook™</a> tablet, then you’ve used our BlackBerry Native SDK for Tablet OS. The new BlackBerry 10 Native SDK has the same underlying framework as the NDK platform and exposes many new APIs and tooling that will make your development experience even better. If you haven’t had a chance to download and write apps for the BlackBerry PlayBook tablet yet, now is a great time to start building some apps.</p>
<p>One of our priorities is to make sure that apps written with the BlackBerry Native SDK for Tablet OS will transition with minimal hassle to our BlackBerry 10 platform. We don’t want you, our <a href="http://www.blackberry.com/developer" target="_new">developer community</a>, to have to reinvent the wheel or tweak significant amounts of code. We also want to make sure that our developers are aware of changes coming to the platform that may impact them so they can prepare accordingly. With that in mind, I want to talk about two important upcoming changes to the BlackBerry 10 Native SDK in order to help developers prepare for upcoming releases. The motivation for both changes is to help developers scale their apps from tablets to phones.</p>
<p><span id="more-9160"></span></p>
<p>The first change has to do with multi-icon support. We want to create a seamless way for developers to port their BlackBerry PlayBook tablet applications to the BlackBerry 10 smartphone. As we support two device screen sizes, applications may need to provide more than one icon size depending on the device they are being installed on. Developers will now be able to specify a list of icons and splash screens per locale and per resolution in the bar descriptor. These would be of various sizes to suit the different target displays. The runtime will then choose the icon and splash screen that matches the given display. We will be maintaining backwards compatibility, so existing apps written for the BlackBerry PlayBook tablet should not have to modify anything. However, if you are moving your app to a BlackBerry 10 device, you will have to specify icons and splash screens with alternate sizes.</p>
<p>The second important change is with respect to orientation. On BlackBerry 10, native applications will not be able to get the width and height values that they need for sizing their windows and determining orientation by querying the ‘WIDTH’ and ‘HEIGHT’ environment variables. If the width is greater than the height, the application will know it is running in landscape mode and vice versa. This behaviour has changed from BlackBerry PlayBook OS 2.0. On BlackBerry PlayBook OS 2.0, an application would query the screen APIs to get its width and height. For applications running on BlackBerry PlayBook OS 2.0, they can continue to rely on this behaviour as this is now going to change. On BlackBerry 10, however, applications are discouraged from querying for their width and height using the screen APIs. The following code snippet illustrates how an app can query for its width and height:</p>
<p><code>int screen_resolution[2];<br />
screen_resolution[0] = atoi(getenv("WIDTH")); //get width<br />
screen_resolution[1] = atoi(getenv("HEIGHT")); //get height</code></p>
<p>Once the application gets these values (which it can and should do at startup), the application can proceed to create and set up its window.</p>
<p><code>screen_create_window(&amp;window, context);<br />
rc = screen_set_window_property_iv(window,<br />
SCREEN_PROPERTY_SIZE, screen_resolution);<br />
if (rc) {<br />
//handle error …<br />
}</code></p>
<p>rc = screen_set_window_property_iv(screen_win,<br />
SCREEN_PROPERTY_BUFFER_SIZE, screen_resolution);<br />
if (rc) {<br />
//handle error …<br />
}</p>
<p>Applications written for BlackBerry 10 should not set the SCREEN_PROPERTY_ROTATION value, as Navigator will set this for the application automatically when it posts its window.</p>
<p>Furthermore, if you were writing native apps on BlackBerry PlayBook OS 2.0, you would have had to write extra logic to rotate your window based on what you read out from the “ORIENTATION” environment variable. The box below shows an example of how orientation was set up in the BlackBerry PlayBook OS 2.0 setup. This code can now be removed, thereby simplifying your setup logic.</p>
<p><code>//THIS CODE CAN NOW BE DELETED</code></p>
<p>int angle = atoi(getenv(&#8220;ORIENTATION&#8221;));<br />
int buffer_size[2] = {screen_resolution[0], screen_resolution[1]};<br />
int flip = false;</p>
<p>if ((orientation == LANDSCAPE) &amp;&amp; (buffer_size[0] &lt;<br />
buffer_size[1])) {<br />
//In landscape, rotate to portrait<br />
buffer_size[0] = screen_resolution[1];<br />
buffer_size[1] = screen_resolution[0];</p>
<p>if ((angle == 0) || (angle == 180)) {<br />
//Landscape device in landscape mode<br />
angle = 90;<br />
} else if ((angle == 90) || (angle == 270)) {<br />
//Portrait device in landscape mode<br />
angle = 0;<br />
}</p>
<p>flip = true;<br />
}</p>
<p>if (flip) {<br />
rc = screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_ROTATION,<br />
&amp;angle);<br />
if (rc) {<br />
//handle error …<br />
}</p>
<p>rc = screen_set_window_property_iv(screen_win,<br />
SCREEN_PROPERTY_BUFFER_SIZE, buffer_size);<br />
if (rc) {<br />
//handle error …<br />
}<br />
}</p>
<p>When it comes to determining current orientation, applications should always rely on the navigator to present current orientation. You should never use the accelerometer to determine orientation. The navigator will also inform the application when it needs to rotate and will initiate the rotation sequence by sending the application a rotate (PORTRAIT or LANDSCAPE) message. These new “rotate” messages are replacing the “orientation” messages on the current 2.0 Navigator. It is to be noted as well that the old orientation messages used to specify rotation in angles, while rotation will be specified as Landscape or Portrait in the new messages. These new units are much more intuitive in my opinion and map more closely with how we think of orientation on the device.</p>
<p>As a native app developer, there are several things you need to consider:</p>
<ul>
<li>Continuing to support your application on BlackBerry PlayBook OS 2.0 won’t require any change – things will continue to work as before.</li>
<li>If you are developing a native app only for BlackBerry 10, you should make sure to use the new method of getting width and height parameters from navigator as well as using the new rotate messages.</li>
<li>If you already have an app on BlackBerry PlayBook OS 2.0 and want to move it to BlackBerry 10, you will have some minor changes to make to port your app over. Your code on BlackBerry PlayBook OS 2.0 will not be able to get the width/height parameters via environment variables, so you will continue to use the old methods. On BlackBerry 10, you should use the parameters you receive from navigator for this.</li>
</ul>
<p>These changes are not drastic, and our hope is that you will be able to migrate from BlackBerry PlayBook OS 2.0 to BlackBerry 10 with minimal fuss. In passing, I should also point out that these changes target developers who are writing applications right on top of our low-level windowing framework, so these changes mainly impact game developers. If you are writing a Cascades™-based application, you should also be abstracted from most of these changes and should consult your Cascades documentation.</p>
<p>I am personally excited about these changes as they will enhance the development capabilities of the BlackBerry 10 Native SDK when it comes to supporting multiple resolutions and orientation. When the time comes for you to start developing or moving your app or game over to the BlackBerry 10 platform, you should definitely consult the developer documentation for more details on these two features and how they will impact your application.</p>
<p>Happy developing!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/9160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/9160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9160&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/05/blackberry-playbook-apps-on-blackberry-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/aacfb04e6b02273d991e7bb0c519fdec?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">russellandrade</media:title>
		</media:content>
	</item>
		<item>
		<title>Lightweight Maps for Mobile, Part 1: Introduction to Map APIs and Libraries</title>
		<link>http://devblog.blackberry.com/2012/05/lightweight-maps-for-mobile-part-1/</link>
		<comments>http://devblog.blackberry.com/2012/05/lightweight-maps-for-mobile-part-1/#comments</comments>
		<pubDate>Tue, 08 May 2012 13:18:17 +0000</pubDate>
		<dc:creator>Jim Ing</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[Bing]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[MapQuest]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[mobile web apps]]></category>
		<category><![CDATA[tile naming conventions]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=9328</guid>
		<description><![CDATA[Discussing the creation of lightweight maps for mobile web apps.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9328&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>When it comes to building interactive maps for desktop web, most of us are quite comfortable using APIs like Google Maps or Bing Maps. But when we need to port or build something for mobile, it often feels like we&#8217;re crumpling a clean sheet of paper into a paper ball. Certainly, dealing with a smaller screen size, slower processor, and less memory can feel like a frustrating step backwards. But if you consider that mobile devices have touch screens, cameras, microphones, accelerometers, wireless and GPS capabilities on top of being portable, mobile devices are in a way better place than desktop PCs. So if we take the time to understand their limitations and features, we can build lightweight applications that are more like origami — compact, elegant, and functional — instead of like a crumpled paper ball that you&#8217;re ready to throw in the trash can.</p>
<table style="border:1px solid #DDD;border-radius:10px;">
<tbody>
<tr>
<td style="padding:10px;text-align:center;font-weight:bold;">Desktop web development is like this&#8230;</td>
<td style="padding:10px;text-align:center;font-weight:bold;">Mobile web can feel like this&#8230;</td>
<td style="padding:10px;text-align:center;font-weight:bold;">But mobile should and can be like this&#8230;</td>
</tr>
<tr>
<td style="padding:10px;text-align:center;"><a href="http://rimdevblog.files.wordpress.com/2012/05/sheet_sm.png"><img class="aligncenter size-full wp-image-9341" title="sheet_sm" src="http://rimdevblog.files.wordpress.com/2012/05/sheet_sm.png?w=140&#038;h=151" alt="" width="140" height="151" /></a></td>
<td style="padding:10px;text-align:center;"><a href="http://rimdevblog.files.wordpress.com/2012/05/crumpled_sm.png"><img class="aligncenter size-full wp-image-9342" title="crumpled_sm" src="http://rimdevblog.files.wordpress.com/2012/05/crumpled_sm.png?w=90&#038;h=90" alt="" width="90" height="90" /></a></td>
<td style="padding:10px;text-align:center;"><a href="http://rimdevblog.files.wordpress.com/2012/05/origami_sm.png"><img class="aligncenter size-full wp-image-9343" title="origami_sm" src="http://rimdevblog.files.wordpress.com/2012/05/origami_sm.png?w=140&#038;h=80" alt="" width="140" height="80" /></a></td>
</tr>
<tr>
<td style="padding:10px;text-align:center;">fairly standard</td>
<td style="padding:10px;text-align:center;">frustrating</td>
<td style="padding:10px;text-align:center;">compact, elegant, and functional</td>
</tr>
</tbody>
</table>
<p><span id="more-9328"></span></p>
<p>So where do we start? Well, when it comes to mobile web apps, file and transfer size matters — the smaller, the better. So the first thing I wanted to do was survey the landscape and compare the size of some of the different APIs that are available. (If I missed some that are lightweight, please let me know.) Although <a href="http://maps.google.com/" target="_blank">Google Maps</a> is the most popular API out there (and deservedly so), it&#8217;s JavaScript API and tile images are quite large. In my tests below, I created basic map pages for a 1024×768 screen using each of the APIs, and I found that Google Maps transfers about <span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">950 KB</span> of data! This can be a problem for smartphones since they have limited memory. Besides causing an application to crash, a memory-intensive app can also chew up precious kilobytes from a user&#8217;s data plan, and it can drain their battery faster than they want. Thankfully, we have some choices&#8230;</p>
<table style="border:1px solid #DDD;border-radius:10px;">
<tbody>
<tr style="background-color:#000;color:#fff;">
<td style="padding:10px;text-align:center;">API Provider</td>
<td style="padding:10px;text-align:center;">Requests</td>
<td style="padding:10px;text-align:center;">Transferred<br />
(KB)</td>
<td style="padding:10px;text-align:center;">Images<br />
(KB)</td>
<td style="padding:10px;text-align:center;">Scripts<br />
(KB)</td>
</tr>
<tr>
<td style="padding:10px;"><a href="http://msdn.microsoft.com/en-us/library/bb429619.aspx" target="_blank">Bing 6.3</a></td>
<td style="padding:10px;">43</td>
<td style="padding:10px;">596.07</td>
<td style="padding:10px;">358.06 (35)</td>
<td style="padding:10px;">228.92 (4)</td>
</tr>
<tr style="background-color:#eee;">
<td style="padding:10px;"><a href="http://msdn.microsoft.com/en-us/library/ff710049.aspx" target="_blank">Bing 6.3c (Core)</a></td>
<td style="padding:10px;">43</td>
<td style="padding:10px;">423.53</td>
<td style="padding:10px;">371.28 (34)</td>
<td style="padding:10px;">46.72 (5)</td>
</tr>
<tr>
<td style="padding:10px;"><a href="http://msdn.microsoft.com/en-us/library/gg427610.aspx" target="_blank">Bing 7.0</a></td>
<td style="padding:10px;">40</td>
<td style="padding:10px;"><span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">431.45</span></td>
<td style="padding:10px;"><span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">339.49 (30)</span></td>
<td style="padding:10px;">86.67 (6)</td>
</tr>
<tr style="background-color:#eee;">
<td style="padding:10px;"><a href="https://developers.google.com/maps/documentation/javascript/tutorial" target="_blank">Google v3</a></td>
<td style="padding:10px;"><span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">66</span></td>
<td style="padding:10px;"><span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">949.65</span></td>
<td style="padding:10px;"><span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">842.93 (54)</span></td>
<td style="padding:10px;"><span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">105.88 (12)</span></td>
</tr>
<tr>
<td style="padding:10px;"><a href="http://leaflet.cloudmade.com/reference.html" target="_blank">Leaflet 0.3.1 (Cloudmade)</a></td>
<td style="padding:10px;"><span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">30</span></td>
<td style="padding:10px;">603.23</td>
<td style="padding:10px;">513.56 (26)</td>
<td style="padding:10px;">81.52 (1)</td>
</tr>
<tr style="background-color:#eee;">
<td style="padding:10px;"><a href="http://developer.mapquest.com/web/documentation/sdk/javascript/v7.0" target="_blank">MapQuest 7.0</a></td>
<td style="padding:10px;">60</td>
<td style="padding:10px;">900.30</td>
<td style="padding:10px;"><span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">851.82 (53)</span></td>
<td style="padding:10px;"><span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">46.81 (4)</span></td>
</tr>
<tr>
<td style="padding:10px;"><a href="https://github.com/stamen/modestmaps-js/wiki" target="_blank">Modest Maps 1.0.0 beta (MapBox)</a></td>
<td style="padding:10px;">38</td>
<td style="padding:10px;">901.48</td>
<td style="padding:10px;"><span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">859.96 (35)</span></td>
<td style="padding:10px;"><span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">39.62 (1)</span></td>
</tr>
<tr style="background-color:#eee;">
<td style="padding:10px;"><a href="http://api.maps.ovi.com/devguide/overview.html" target="_blank">Nokia Ovi</a></td>
<td style="padding:10px;">48</td>
<td style="padding:10px;">523.87</td>
<td style="padding:10px;"><span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">372.47 (36)</span></td>
<td style="padding:10px;"><span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">150.16 (10)</span></td>
</tr>
<tr>
<td style="padding:10px;"><a href="http://docs.openlayers.org/" target="_blank">OpenLayers 2.11 Mobile</a></td>
<td style="padding:10px;">52</td>
<td style="padding:10px;">595.28</td>
<td style="padding:10px;">508.70 (48)</td>
<td style="padding:10px;">83.35 (1)</td>
</tr>
<tr>
<td style="padding:10px;font-size:8pt;" colspan="5">* Note:</p>
<ul>
<li>These pages were tested at 1024×768.</li>
<li>The KBs for documents and stylesheets were excluded.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<h2>Bing</h2>
<p>As we can see from the results, Microsoft&#8217;s <a href="http://www.bing.com/maps/" target="_blank">Bing Maps</a> is a good alternative that has improved a lot since version 6.3. In version 6.3, Bing quietly introduced a &#8220;core&#8221; version for mobile that stripped out features like drawing lines and polygons. This reduced their JavaScript library from 230 KB to 47 KB! Unfortunately, if you needed some of those features, you were out of luck. But in version 7.0, they cleaned up their API and reduced it to 87 KB (without stripping features). So when you combine that savings with Bing&#8217;s smaller tile size, the Bing test map transferred <span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">432 KB</span> — that&#8217;s less than half of Google Maps! So I could stop here and just tell you to use Bing instead, but (as you&#8217;ll see) it&#8217;s always good to look at other options&#8230;</p>
<h2>Modest Maps</h2>
<p>Especially if we look at the API with the smallest library, <a href="http://modestmaps.com/" target="_blank">Modest Maps</a>, is a new library that weighs in at only <span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">40 KB</span>! It was designed to be simple, extensible, and it even works in older browsers like IE7. However, it&#8217;s tile size was the largest at <span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">861 KB</span>!</p>
<h2>MapQuest</h2>
<p><a href="http://www.mapquest.com/" target="_blank">MapQuest</a> is a provider that has been around for a while. Their version 7.0 is the second-smallest library at only <span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">47 KB</span>, but their tile size is the third largest at <span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">852 KB</span>.</p>
<h2>Nokia Ovi</h2>
<p>So if we&#8217;re also looking for an API that has the smallest tile size, Bing looks like the best choice. <a href="http://maps.nokia.com/" target="_blank">Nokia&#8217;s Ovi</a> tiles are also lightweight at <span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">373 KB</span>, but their JavaScript library is the largest at <span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">151 KB</span>! It&#8217;s too bad we couldn&#8217;t use Modest Map&#8217;s compact library with Bing&#8217;s lightweight tiles&#8230;or can we? Well, in a way we can&#8230;</p>
<h2>OpenLayers</h2>
<p><a href="http://openlayers.org/" target="_blank">OpenLayers</a>, as the name suggests, is a completely free and Open Source library that allows you to switch between different base layers like Google Maps, Virtual Earth (Bing), Yahoo, etc. From a business model, this approach makes a lot of sense because it means you&#8217;re not tied to one mapping provider and you&#8217;re not as restricted by licensing or forced-API changes. With this approach, you can switch providers without having to completely change your code.</p>
<p>However, OpenLayers supports other maps by creating their own API layer <strong>on top</strong> of the other mapping APIs. So to use OpenLayers with Google or Bing, you&#8217;d have to include their libraries as well! This approach is fine for desktop, but it doesn&#8217;t make sense for mobile. Also, OpenLayers is not as well-documented as some of the others, and its API can be harder to learn. But, if you&#8217;re doing some serious GIS work, this is an API you&#8217;ll want to consider.</p>
<h2>Leaflet</h2>
<p>Fortunately, a new lightweight library called <a href="http://leaflet.cloudmade.com/index.html" target="_blank">Leaflet</a> has been gaining popularity because it is a modern Open Source library that uses HTML5 and CSS3. It was designed from the ground up to work in modern and mobile browsers. Since CSS3 is hardware-accelerated on many mobile devices, visuals like zooming and fading will be much faster than JavaScript-based animations.</p>
<p>Also, Leaflet has an easy-to-use API. So just how easy is it to add a map? First, we include the CSS and JavaScript:</p>
<pre class="prettyprint">                <code class="language-html"> &lt;link rel="stylesheet" href="leaflet.css"&gt; &lt;script type="text/javascript" src="leaflet.js"&gt;&lt;/script&gt; </code></pre>
<p>Then we create a new tile layer specifying the format of the tile URL with some options like maximum zoom level:</p>
<pre class="prettyprint">                <code class="language-js"> var tileUrl = "http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png", tileAttr = "Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade", tileLayer = new L.TileLayer(tileUrl, { maxZoom: 18, attribution: tileAttr }); </code></pre>
<p>Then we create the map and add the tile layer to it:</p>
<pre class="prettyprint">                <code class="language-js"> var map = new L.Map("map", { center: new L.LatLng(43.6425778753, -79.3870621920), // Toronto zoom: 14 }); map.addLayer(tileLayer); </code></pre>
<p>That&#8217;s it! Like OpenLayers, Leaflet allows you to easily switch between tile providers, but it does this in a much cleaner way — all you have to do is change the tile URL. So you don&#8217;t even need to include a vendor&#8217;s API to use their tiles. Of course, if you do use another tile provider, make sure you contact them about licensing and include the proper attribution.</p>
<pre class="prettyprint">                <code class="language-js"> var tileUrl = "http://{s}.googleapis.com/vt?lyrs=m@174225136&amp;src=apiv3&amp;hl=en-US&amp;x={x}&amp;y={y}&amp;z={z}&amp;s=Galile&amp;style=api%7Csmartmaps", tileAttr = "Map data © 2012 Google", tileLayer = new L.TileLayer(tileUrl, { maxZoom: 22, subdomains: ['mt0', 'mt1'], attribution: tileAttr }); </code></pre>
<p>So with this simple approach, you can change the base tile layer to almost any provider as long as they are using OpenStreetMap&#8217;s <a href="http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames" target="_blank">&#8220;Slippy&#8221;</a> tile naming convention, which is pretty much every provider, except for Bing because Microsoft uses a different <a href="http://msdn.microsoft.com/en-us/library/bb259689.aspx" target="_blank">&#8220;Quadkey&#8221;</a> convention.</p>
<h2>Tile Naming Conventions</h2>
<p>Basically, Slippy uses a straight-forward naming convention that looks like this (&#8220;mustache-style&#8221; URL template):</p>
<pre>http://<span style="background-color:#ff0;">{s}</span>.tile.cloudmade.com/YOUR-API-KEY/997/256/<span style="background-color:#ff0;">{z}</span>/<span style="background-color:#ff0;">{x}</span>/<span style="background-color:#ff0;">{y}</span>.png</pre>
<p>where,</p>
<ul>
<li>{s} = subdomain</li>
<li>{x} = x-coordinate</li>
<li>{y} = y-coordinate</li>
<li>{z} = zoom level</li>
</ul>
<p>Here&#8217;s an example of an actual tile (near the CN Tower):</p>
<pre>http://<span style="background-color:#ff0;">b</span>.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/<span style="background-color:#ff0;">14</span>/<span style="background-color:#ff0;">4578</span>/<span style="background-color:#ff0;">5980</span>.png</pre>
<p>But if we compare Slippy to the Quadkey format, you&#8217;ll notice it&#8217;s different enough that we can&#8217;t easily use it (at least not with Leaflet — we can with Modest Maps):</p>
<pre>http://ecn.<span style="background-color:#ff0;">{s}</span>.tiles.virtualearth.net/tiles/<span style="background-color:#ff0;">{style}</span><span style="background-color:#ff0;">{quadkey}</span>?g=914&amp;mkt=en-us&amp;lbl=l1&amp;stl=h&amp;shading=hill&amp;n=z

http://ecn.<span style="background-color:#ff0;">t0</span>.tiles.virtualearth.net/tiles/<span style="background-color:#ff0;">r</span><span style="background-color:#ff0;">03022313122210</span>?g=914&amp;mkt=en-us&amp;lbl=l1&amp;stl=h&amp;shading=hill&amp;n=z</pre>
<p>because the Quadkey format works like this:</p>
<ul>
<li>At zoom level 1 (of the entire world), there are only 4 tiles (or quadrants) numbered from 0 to 3. At the next zoom level, each tile is sub-divided into &#8220;quads&#8221;, and so on.</li>
<li>So the length of the quadkey represents the number of zoom levels.</li>
<li>The quadkey of any tile starts with the quadkey of its parent tile.</li>
<li>The first letter (which is not really part of the quadkey) specifies the base map style (r = Road, a = Aerial (Satellite), h = Hybrid (Aerial + Labels)</li>
</ul>
<p><a href="http://rimdevblog.files.wordpress.com/2012/05/ic962381.jpg"><img class="aligncenter size-full wp-image-9345" title="IC96238" src="http://rimdevblog.files.wordpress.com/2012/05/ic962381.jpg?w=623&#038;h=365" alt="TITLE_IMAGE" width="623" height="365" /></a></p>
<figure>
<figcaption><a href="http://msdn.microsoft.com/en-us/library/bb259689.aspx" target="_blank">&#8220;Bing Maps Tile System&#8221;</a></figcaption>
</figure>
<p>Although it might be tempting to complain about Microsoft being different, from a database perspective, quadkeys makes indexing and storage really efficient.</p>
<h2>Hybrid Approach</h2>
<p>Hopefully, that gives you a better understanding of tile structures. Do you see the possibilities? This is AWESOME! This means we can easily interchange libraries and tiles to suit our needs. Essentially, we can build our own &#8220;hybrid&#8221; API or &#8220;mashup&#8221; from the best pieces available. So now we can have an API that uses Bing&#8217;s tiles, but is even <strong>lighter</strong> than Bing itself (which was already light to begin with at 432 KB)!</p>
<p>Here are some other combinations that are under 450 KB that you may want to consider:</p>
<table style="border:1px solid #DDD;border-radius:10px;">
<tbody>
<tr style="background-color:#000;color:#fff;">
<td style="padding:10px;text-align:center;">API Provider</td>
<td style="padding:10px;text-align:center;">Requests</td>
<td style="padding:10px;text-align:center;">Transferred<br />
(KB)</td>
<td style="padding:10px;text-align:center;">Images<br />
(KB)</td>
<td style="padding:10px;text-align:center;">Scripts<br />
(KB)</td>
</tr>
<tr>
<td style="padding:10px;">Modest Maps 1.0.0 beta + Bing Tiles</td>
<td style="padding:10px;">38</td>
<td style="padding:10px;"><span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">380.51</span></td>
<td style="padding:10px;">338.97 (35)</td>
<td style="padding:10px;">39.62 (1)</td>
</tr>
<tr style="background-color:#eee;">
<td style="padding:10px;">Modest Maps 1.0.0 beta + Nokia Tiles</td>
<td style="padding:10px;">38</td>
<td style="padding:10px;"><span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">412.41</span></td>
<td style="padding:10px;">370.93 (35)</td>
<td style="padding:10px;">39.62 (1)</td>
</tr>
<tr>
<td style="padding:10px;">Leaflet 0.3.1 + Nokia Tiles</td>
<td style="padding:10px;">30</td>
<td style="padding:10px;"><span style="background-color:#468847;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">431.78</span></td>
<td style="padding:10px;">342.09 (26)</td>
<td style="padding:10px;">81.52 (1)</td>
</tr>
</tbody>
</table>
<p>Since we were able to make Bing lighter, I was curious to see if we could do the same with Google, and the result really surprised me! As you may recall, Google Maps transferred <strong>950 KB</strong>, but when I combined Leaflet with Google&#8217;s tiles, it only transferred <strong>498 KB</strong>! That&#8217;s half the size, which is great! But why such a difference?! Well, if we look at the number of requests, it gives us a big clue — Google&#8217;s API is loading <strong>twice</strong> the number of tiles!</p>
<table style="border:1px solid #DDD;border-radius:10px;">
<tbody>
<tr style="background-color:#000;color:#fff;">
<td style="padding:10px;text-align:center;">API Provider</td>
<td style="padding:10px;text-align:center;">Requests</td>
<td style="padding:10px;text-align:center;">Transferred<br />
(KB)</td>
<td style="padding:10px;text-align:center;">Images<br />
(KB)</td>
<td style="padding:10px;text-align:center;">Scripts<br />
(KB)</td>
</tr>
<tr>
<td style="padding:10px;">Google v3</td>
<td style="padding:10px;">66</td>
<td style="padding:10px;">949.65</td>
<td style="padding:10px;">842.93 (54)</td>
<td style="padding:10px;">105.88 (12)</td>
</tr>
<tr style="background-color:#eee;">
<td style="padding:10px;">Leaflet 0.3.1 + Google Tiles</td>
<td style="padding:10px;">30</td>
<td style="padding:10px;">497.71</td>
<td style="padding:10px;">408.01 (26)</td>
<td style="padding:10px;">81.52 (1)</td>
</tr>
<tr>
<td style="padding:10px;"><strong>Difference:</strong></td>
<td style="border-top:2px solid #000;"><span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">36</span></td>
<td style="border-top:2px solid #000;"><span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">451.94</span></td>
<td style="border-top:2px solid #000;"><span style="background-color:#b94a48;color:#fff;font-weight:bold;padding-left:10px;padding-right:10px;border-radius:15px;">434.92</span></td>
<td style="border-top:2px solid #000;">24.36</td>
</tr>
</tbody>
</table>
<p>At first, I thought it might be pre-fetching or &#8220;lazy loading&#8221; tiles for areas outside the bounding box in case a user pans or zooms. But when I inspected the extra tiles, I found it&#8217;s actually loading another set of tiles for the <strong>same area</strong>, which I haven&#8217;t been able to figure out why — the extra tiles don&#8217;t seem to be displayed anywhere. It&#8217;s still a map view tile, but it has slightly different labels. Notice the one on the right has &#8220;Corktown&#8221; and the other one doesn&#8217;t?</p>
<table style="border:1px solid #DDD;border-radius:10px;">
<tbody>
<tr>
<td style="padding:10px;text-align:center;font-weight:bold;">Tile Set 1 (displayed)</td>
<td style="padding:10px;text-align:center;font-weight:bold;">Tile Set 2 (not displayed)</td>
</tr>
<tr>
<td style="padding:10px;font-size:8pt;"><span style="background-color:#ff0;"><a href="http://rimdevblog.files.wordpress.com/2012/05/vt_dvp_gardiner1_circle.png"><img class="aligncenter size-full wp-image-9347" title="vt_dvp_gardiner1_circle" src="http://rimdevblog.files.wordpress.com/2012/05/vt_dvp_gardiner1_circle.png?w=256&#038;h=256" alt="" width="256" height="256" /></a>m@174232040</span>&amp;src=apiv3&amp;hl=en-US&amp;x=4580&amp;y=5979</p>
<p>&amp;z=14</p>
<p>&amp;s=Galileo</p>
<p>&amp;style=api%7Csmartmaps</td>
<td style="padding:10px;font-size:8pt;"><span style="background-color:#ff0;"><a href="http://rimdevblog.files.wordpress.com/2012/05/vt_dvp_gardiner2_circle.png"><img class="aligncenter size-full wp-image-9348" title="vt_dvp_gardiner2_circle" src="http://rimdevblog.files.wordpress.com/2012/05/vt_dvp_gardiner2_circle.png?w=256&#038;h=256" alt="" width="256" height="256" /></a>m@174000000</span>&amp;src=apiv3&amp;hl=en-US&amp;x=4580&amp;y=5979</p>
<p>&amp;z=14</p>
<p>&amp;s=Galileo</p>
<p>&amp;style=api%7Csmartmaps</td>
</tr>
</tbody>
</table>
<p>I&#8217;m sure there&#8217;s a good reason for this, but I&#8217;d be curious if there&#8217;s an option to disable that? Either way, the good news is Google&#8217;s tiles are not as heavy as I first thought so we can use them with Modest Maps or Leaflet to build familiar-looking mapping applications that will be more lightweight especially for mobile.</p>
<p>Besides being able to switch between providers, this hybrid approach has other advantages:</p>
<ol>
<li>For packaged applications like <a href="https://bdsc.webapps.blackberry.com/html5/" target="_blank">BlackBerry® WebWorks™</a>, you can locally include the required API files (JavaScript, CSS, and images) with your application so you don&#8217;t need to fetch them from a remote server. This makes loading an app faster and reduces bandwidth charges.</li>
<li>Another advantage of having local files is you don&#8217;t have to worry as much about a provider forcing an API change that can break your customizations. Although, you can usually reference an older API, sometimes a provider will force an upgrade even if you try to reference an older version.</li>
<li>In the case of Yahoo! Maps, which discontinued its map service in September 2011, a local version means your app can still work. For example, Leaflet provides a layer control so you can select from different base layers.</li>
</ol>
<p>These advantages are important especially for enterprise or mission-critical applications that need to minimize risk and downtime. So in the next post, I&#8217;ll cover some techniques for adding offline capabilities to your map. Hopefully, with this &#8220;best of breed&#8221; approach, you&#8217;ll be ready to build a map-based app that will feel more like a paper airplane than a paper ball.</p>
<div style="text-align:center;"><a href="http://rimdevblog.files.wordpress.com/2012/05/origami_sm1.png"><img class="aligncenter size-full wp-image-9349" title="origami_sm" src="http://rimdevblog.files.wordpress.com/2012/05/origami_sm1.png?w=140&#038;h=80" alt="" width="140" height="80" /></a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/9328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/9328/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9328&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/05/lightweight-maps-for-mobile-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/01266d01d1ae9a95d889f5143acd2a49?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">myjing</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/sheet_sm.png" medium="image">
			<media:title type="html">sheet_sm</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/crumpled_sm.png" medium="image">
			<media:title type="html">crumpled_sm</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/origami_sm.png" medium="image">
			<media:title type="html">origami_sm</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/ic962381.jpg" medium="image">
			<media:title type="html">IC96238</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/vt_dvp_gardiner1_circle.png" medium="image">
			<media:title type="html">vt_dvp_gardiner1_circle</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/vt_dvp_gardiner2_circle.png" medium="image">
			<media:title type="html">vt_dvp_gardiner2_circle</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/origami_sm1.png" medium="image">
			<media:title type="html">origami_sm</media:title>
		</media:content>
	</item>
		<item>
		<title>BlackBerry 10 WebWorks SDK Released!</title>
		<link>http://devblog.blackberry.com/2012/05/blackberry-10-webworks-sdk/</link>
		<comments>http://devblog.blackberry.com/2012/05/blackberry-10-webworks-sdk/#comments</comments>
		<pubDate>Tue, 01 May 2012 13:41:28 +0000</pubDate>
		<dc:creator>Ken W</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Platform Services]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[adobe air]]></category>
		<category><![CDATA[Apache Cordova]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 10 WebWorks SDK]]></category>
		<category><![CDATA[blackberry webworks]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Cascades]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[tablet os]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=9131</guid>
		<description><![CDATA[The BlackBerry 10 WebWorks SDK is now available for download!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9131&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>We are super excited to announce that the BlackBerry® 10 WebWorks™ SDK is now <a href="http://developer.blackberry.com/html5/download/sdk" target="_new">available for download</a>! This is the first of many Beta releases to come over the summer as we head towards the official release of the BlackBerry 10 WebWorks SDK. Eager web application developers should head right to the <a href="http://developer.blackberry.com/html5/download/sdk" target="_new">developer site</a>, download the SDK, and see how we are continuing to provide a best-in-class web developer platform for BlackBerry 10.</p>
<p>The BlackBerry 10 WebWorks SDK allows web developers to create first class BlackBerry applications using familiar web technologies such as HTML5, CSS, and JavaScript®, and extend their application with deep integration into the full device platform. It is the evolution of the BlackBerry WebWorks SDK, built on the foundations of the BlackBerry WebWorks SDK for smartphones and the BlackBerry WebWorks SDK for Tablet OS.</p>
<p>First introduced on the BlackBerry® 5 OS and supported on all OS versions and devices since, BlackBerry WebWorks allows a developer to package their web content into the native application format, leveraging all the benefits of the BlackBerry platform including security and distribution through the BlackBerry App World™ storefront. With the WebKit-based HTML5 browser environment provided by the platform, BlackBerry WebWorks developers have full access to many powerful HTML5 APIs and CSS3. Further, BlackBerry WebWorks provides a set of JavaScript APIs that allow the developer to extend their web content out of the browser with platform functionality such as <a href="http://us.blackberry.com/developers/blackberrymessenger/" target="_new">BlackBerry® Messenger SDK</a>, <a href="http://us.blackberry.com/developers/platform/paymentservice.jsp" target="_new">Payment Service</a>, PIM (email, contacts, and calendars), file access, and so on.</p>
<p>For the BlackBerry smartphone, the BlackBerry WebWorks APIs were built on the native Java platform, and for Tablet OS, on top of the Adobe® AIR® SDK. With BlackBerry 10, it was obvious that BlackBerry WebWorks needed to leverage the full power of the new BlackBerry 10 Native platform built on C/C++ and Cascades™. This gave us an opportunity to look at BlackBerry WebWorks with fresh eyes and determine the best route forward. Let’s take a look at the different pieces that make up BlackBerry WebWorks and how we have been able to improve on the platform with the power of BlackBerry 10.</p>
<p><span id="more-9131"></span></p>
<h3><strong>The Packager</strong></h3>
<p>This is the piece of the SDK that takes you application content and packages it up into a .BAR file for distribution in BlackBerry App World™, and is the file that is installed onto the device. For BlackBerry OS and Tablet OS, the packager was implemented in Java, which required the developer to have the JDK installed on their machine. For BlackBerry 10 WebWorks SDK, we have re-implemented the packager in pure JavaScript, which runs in an instance of Node.js included with the SDK. BlackBerry WebWorks developers have minimal external dependencies required to get their development environment setup.</p>
<p>One thing to note is that the packager now creates two binary outputs, one for the device and one to be used in the BlackBerry 10 simulator. This is because the BlackBerry WebWorks runtime is now backed by the native platform, and there are different instruction sets for the OS on desktop environments versus the device platform.</p>
<h3><strong>The Framework</strong></h3>
<p>The framework is the code that wraps around your web content, and is run on the device in order to orchestrate the platform and provide your runtime environment. For BlackBerry OS, the framework was in Java, and for Tablet OS it was Adobe AIR. Similar to the packager, and enabled by the underlying platform providing in essence a JavaScript runtime environment, we have re-written the framework in JavaScript.</p>
<p>Since the framework is in JavaScript, <strong>developers will need to include this JavaScript code into their web content for their application.</strong> Just add a very simple script tag to all your pages:</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;webworks.js&#8221;&gt;&lt;/script&gt;</p>
<p>Webworks.js is the framework code that handles all of the BlackBerry WebWorks whitelisting logic and injection of allowed APIs for the current domain into the current page. The webworks.js file is included in the BlackBerry WebWorks SDK in the framework\clientfiles directory and should be copied into your application content.</p>
<p>Since script loading can occur asynchronously, <strong>we have provided an event that you must listen to before accessing any BlackBerry WebWorks APIs.</strong> The framework will trigger this event once it is done initializing the BlackBerry WebWorks framework and APIs. Here is an example of the webworks script file definition and <em>webworksready</em> event in action:</p>
<p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;script type=”text/javascript” src=”webworks.js”&gt;&lt;/script&gt;<br />
&lt;script type=”text/javascript”&gt;</p>
<p>window.addEventListener(&#8220;load&#8221;,<br />
function() {<br />
document.addEventListener(&#8220;webworksready&#8221;, start);<br />
}, false);</p>
<p>function start() {…}</p>
<p>While the webworks.js file did not exist and is not required for BlackBerry OS or Tablet OS WebWorks SDKs, you can leave the script inclusion line in your application even on these platforms. If your application is not running on the BlackBerry 10 platform, the <em>webworksready</em> event will fire almost right away, and none of the rest of the BlackBerry 10 framework logic will execute; your app will run in the context of the standard BlackBerry OS and Tablet OS WebWorks frameworks.</p>
<h3><strong>Config.xml</strong></h3>
<p>For this first Beta of the BlackBerry 10 WebWorks SDK, we have implemented most of the existing elements of the configuration document. There are a few elements that will come in the future along with some new additions required to support some new BlackBerry 10 features. Not to worry if you use new elements or have elements that are not yet supported in BlackBerry 10 WebWorks, as the packagers for all platforms will ignore elements they don’t recognize. <a href="http://developer.blackberry.com/html5/documentation/ww_developing/working_with_config_xml_file_1866970_11.html" target="_new">Please check the documentation</a> for details on the config document.</p>
<h3><strong>APIs</strong></h3>
<p>APIs for BlackBerry WebWorks have two components to them: JavaScript that runs in the browser environment, and a “native” component that interfaces with the rest of the platform, allowing for the deep integration that provides the full power of BlackBerry WebWorks. Again: Java for smartphones, Adobe AIR for BlackBerry® PlayBook™ tablets. For BlackBerry 10, of course, native is C/C++. So we have to re-implement all the APIs, and will be delivering them incrementally with Beta refreshes over the summer.</p>
<p>In this initial Beta release, we have been able to provide a core sub-set of the full WebWorks API, which is documented on the <a href="http://developer.blackberry.com/html5" target="_new">BlackBerry HTML 5 site</a>, including Identity, Application and App events, System and system events. On a monthly cadence, we will be releasing new Beta bundles of BlackBerry WebWorks with net new APIs, such as Push, File and File Transfer, Audio/Video Capture, etc.</p>
<p><img class="aligncenter size-full wp-image-9133" title="" src="http://rimdevblog.files.wordpress.com/2012/04/cordova.jpg?w=211&#038;h=237" alt="" width="211" height="237" /></p>
<h3><strong>Apache Cordova</strong></h3>
<p>The nature of HTML5 is that it is prevalent on most platforms and devices. Apache Cordova (which is the basis of the well-known PhoneGap) is an industry-leading cross-platform framework very similar to BlackBerry WebWorks. We are striving to bring BlackBerry WebWorks and Cordova closer together, and are actively part of the Cordova open source project providing contributions. To begin down this road, we are aligning some of our BlackBerry 10 WebWorks API signatures with Cordova API signatures. Existing WebWorks applications may require some refactoring to target BlackBerry 10, but Cordova/PhoneGap is supported on BlackBerry OS and Tablet OS, so you can take advantage of these APIs on older operating systems.</p>
<p>For example, event APIs have changed. For BlackBerry smartphones or Tablet OS, if you wanted to listen for battery level changes, you would do something like this:</p>
<p><code>function onBatteryLevelChange(level) {<br />
alert("Battery Level: " + level);<br />
}<br />
blackberry.system.event.deviceBatteryLevelChange(<br />
onBatteryLevelChange);</code></p>
<p>For BlackBerry 10 WebWorks SDK, we have introduced an Event API with a signature like your typical add/removeEventListener:</p>
<p><code>function onBatteryStatus(status) {<br />
alert("Battery Level: " + status.level +<br />
“ isPlugged: “ + status.isPlugged);<br />
}<br />
blackberry.event.addEventListener(“batterystatus”, onBatteryStatus);</code></p>
<p>The “blackberry.event” feature id would be used in your config.xml file for whitelisting purposes. You will notice that, if you replaced “blackberry.event” with “document” or “window”, you have the Cordova/PhoneGap API signature.</p>
<p>Please check out the <a href="http://developer.blackberry.com/html5" target="_new">BlackBerry WebWorks development site</a> to learn more about how you can be part of the first wave of applications for the BlackBerry 10 OS by leveraging your web technology skills, while continuing to target our over 75 million smartphone subscribers and BlackBerry PlayBook tablet users.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/9131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/9131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9131&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/05/blackberry-10-webworks-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3b422c1a037b89d4ddf5bef834dbdeef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kjwallis</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/04/cordova.jpg" medium="image" />
	</item>
		<item>
		<title>New BBM Hackathon Events Announced! Come Hack With Us</title>
		<link>http://devblog.blackberry.com/2011/09/bbm-hackathon-events/</link>
		<comments>http://devblog.blackberry.com/2011/09/bbm-hackathon-events/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 13:22:53 +0000</pubDate>
		<dc:creator>Luke Reimer</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Amsterdam]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[Bangkok]]></category>
		<category><![CDATA[bbm]]></category>
		<category><![CDATA[bbm 6]]></category>
		<category><![CDATA[BBM connected]]></category>
		<category><![CDATA[bbm social platform]]></category>
		<category><![CDATA[Boston]]></category>
		<category><![CDATA[Chicago]]></category>
		<category><![CDATA[jakarta]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[San Francisco]]></category>
		<category><![CDATA[Toronto]]></category>
		<category><![CDATA[Waterloo]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=7142</guid>
		<description><![CDATA[A number of BBM Hackathon events will be taking place across the globe throughout September, October and November.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=7142&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img src="http://rimdevblog.files.wordpress.com/2011/09/hackathon-nyc1.jpg?w=600&#038;h=400" alt="BBM Hackathon in NYC" title="BBM Hackathon in NYC" width="600" height="400" class="aligncenter size-full wp-image-7145" /></p>
<p>The Research In Motion® (RIM®) Developer Relations team recently hosted a <a href="http://devblog.blackberry.com/2011/09/bbm-apps-hackathon-recap/">BBM™ Hackathon event in NYC</a>. Developers were invited to apply for a chance to participate in the event, getting one-on-one time with BlackBerry® platform experts and network with other developers while working on integrating social elements into apps using the <a href="http://devblog.blackberry.com/2011/06/bbm-sdk-for-java/">BlackBerry® Messenger (BBM) APIs</a>.</p>
<p>Attendees told us that they found the direct contact with our social platform experts to be invaluable – and we liked hearing that so much that we’ve decided to host more of these hackathon events across the globe in the coming weeks. </p>
<p>The first of these events happened yesterday in our company hometown of Waterloo, Ontario, Canada, with the second event happening today, September 29th. Following this, we’ll be hosting BBM Apps Hackathons in Toronto, Chicago, San Francisco, Boston, Jakarta, Amsterdam, London and more. Here are the scheduled dates:</p>
<p><strong>Updated Dates!</strong></p>
<ul>
<li><strong>Toronto:</strong> October 6th and 7th</li>
<li><strong>Chicago:</strong> October 10th and 11th</li>
<li><strong>San Francisco:</strong> October 16th and 17th (just in time for <a href="http://www.blackberrydevcon.com/americas/registration" target="_new">BlackBerry DevCon Americas 2011</a>!)</li>
<li><strong>Boston:</strong> November 3rd and 4th</li>
<li><strong>Jakarta:</strong> November 14th and 15th</li>
<li><strong>Bangkok:</strong> November 17th and 18th </li>
<li><strong>Amsterdam:</strong> November 24th and 25th <strong>(updated)</strong></li>
<li><strong>London, England:</strong> November 28th and 29th <strong>(updated)</strong></li>
</ul>
<p>To enter for your chance to attend one of the BBM Apps Hackathon events, follow this simple process to apply: Visit the site <a href="http://bbmappshackathon.com" target="_new">bbmappshackathon.com</a> and fill out an application, outlining among other things (i) why you feel social platform integration adds value to mobile applications; and (ii) give an example of previous mobile apps you have developed.</p>
<p>Developers who are selected to attend a BBM Apps Hackathon event will also receive a BlackBerry gift bag, which includes a BlackBerry® 7 OS device.  In addition, those selected to attend the Toronto, Chicago and San Francisco Hackathon events will also receive a pass to attend BlackBerry DevCon Americas 2011 and three night accommodation at the San Francisco Marriott Marquis for the duration of the conference.</p>
<p>We definitely recommend that developers of any level apply to attend these collaborative events. The <a href="http://devblog.blackberry.com/2011/06/bbm-sdk-for-java/">BlackBerry Social Platform</a> gives developers a way to tie existing apps to BBM, or to build social apps from the ground up.  One of the benefits to these social aspects is the added viral buzz that an app can gain from integrating with BBM.  At these hackathons, developers will discover valuable strategies that will help them add social aspects to their apps. </p>
<p>Would you be interested in this type of event? Let us know which hackathons you’ll be applying to attend!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/7142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/7142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=7142&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2011/09/bbm-hackathon-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/02798908b6c8de45a0e4aa8531a6d869?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lukereim1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2011/09/hackathon-nyc1.jpg" medium="image">
			<media:title type="html">BBM Hackathon in NYC</media:title>
		</media:content>
	</item>
		<item>
		<title>Webinar: Enrich your Super Apps with BlackBerry 6 features and BlueVia Network APIs</title>
		<link>http://devblog.blackberry.com/2011/03/telefonica-webinar/</link>
		<comments>http://devblog.blackberry.com/2011/03/telefonica-webinar/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 20:06:37 +0000</pubDate>
		<dc:creator>Ian M.</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[blackberry 6]]></category>
		<category><![CDATA[bluevia]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[emea]]></category>
		<category><![CDATA[super apps]]></category>
		<category><![CDATA[telefonica]]></category>
		<category><![CDATA[webinar]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=3415</guid>
		<description><![CDATA[Announcing a developer webinar taking place on Thursday March 17, focusing on utilizing new features introduced in the BlackBerry® 6 platform and BlueVia network APIs to build Super Apps.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=4809&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:center;"><img class="aligncenter" src="http://rimdevblog.files.wordpress.com/2011/03/developer-webcast.jpg" alt="" /></p>
<p>Research In Motion® (RIM®) and Telefonica have teamed up to host a webcast happening on Thursday, March 17, 2011.  This webcast is for developers to learn how to take advantage of new features introduced in the BlackBerry® 6 platform and BlueVia network APIs to build Super Apps.</p>
<p><strong>Date:</strong> Thursday, March 17, 2011<br />
<strong>Event Start Time:</strong> 4:00 PM GMT<br />
<strong>Duration:</strong> 1 hour<br />
<strong>Presenters:</strong><br />
Sanyu Kiruluta, Team Lead, Developer Relations EMEA (RIM)<br />
Andres-Leonardo Martinez-Ortiz, BlueVia Developer Programs Engineer (Telefonica)</p>
<p>Topics that will be covered include:</p>
<ul>
<li>BlackBerry 6 overview – learn about improvements to the UI and new APIs that you can take advantage of when creating your applications</li>
<li>Learn about BlackBerry® platform commercialization services</li>
<li>Learn how to use BlueVia SMS APIs</li>
</ul>
<p><a href="https://www3.gotomeeting.com/register/344294334" target="_new">Register for this event and find out more information</a> today!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/4809/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/4809/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=4809&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2011/03/telefonica-webinar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/af2e30bbfb2ff3164aaa9cc7f05dc2b4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ianmcd1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2011/03/developer-webcast.jpg" medium="image" />
	</item>
		<item>
		<title>Super Apps Series (Java): Running in the Background Part Four</title>
		<link>http://devblog.blackberry.com/2010/09/running-in-the-background-part-4/</link>
		<comments>http://devblog.blackberry.com/2010/09/running-in-the-background-part-4/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 10:42:20 +0000</pubDate>
		<dc:creator>Tim W.</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Java Development]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[super apps]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=2122</guid>
		<description><![CDATA[BlackBerry Development Super Apps (Java) Series part four. “Dos and don’ts” of running applications in the background.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=2122&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img src="http://rimdevblog.files.wordpress.com/2010/09/backgroundpart4-browser1.jpg?w=480&#038;h=360" alt="" title="Running in the Background Part 4" width="480" height="360" class="aligncenter size-full wp-image-2123" /></p>
<p>In the course of this series on running in the background, we’ve covered how to run a process in the background (<a href="http://rimdevblog.files.wordpress.com/2010/09/backgroundpart4-list1.jpg2010/06/super-apps-java-series-running-in-the-background-part-1/">Part One</a>), how to move your application from foreground to background and vice versa (<a href="http://rimdevblog.files.wordpress.com/2010/09/backgroundpart4-list1.jpg2010/06/running-in-the-background-part-2/">Part Two</a>), and some of the reasons why you would want to (<a href="http://rimdevblog.files.wordpress.com/2010/09/backgroundpart4-list1.jpg2010/07/running-in-the-background-part-three/" target="_new">Part Three</a>). The previous articles have shown Super App features that enable both the “Always-on Experience” and “Tight Integration with the Native Apps”, as well as a “Proactive and Notification-driven Application”. Today, the focus will be on “Designing for Efficiency”.</p>
<p>In some ways, the mobile environment is constrained much more significantly than the desktop environment, with limits to battery life, wireless bandwidth, memory, and CPU cycles, among others. These constraints become even more important when running processes in the background. The last thing the user wants is a massive data bill, or a dead device due to a poorly behaved background application that they weren’t even aware of. With that said, let’s look at the “dos and don’ts” of running in the background.</p>
<p><span id="more-2122"></span></p>
<h2>Stop Painting</h2>
<p></p>
<p>If you have any looped painting, animations, or other UI processes on your screen, stop them when your application moves to the background. Verify that you don’t have UI threads running needlessly by using the Profiler view in the BlackBerry® Java® Plug-in for Eclipse®.</p>
<p><img src="http://rimdevblog.files.wordpress.com/2010/09/backgroundpart4-list1.jpg?w=600&#038;h=267" alt="" title="BlackBerry background processes" width="600" height="267" class="aligncenter size-full wp-image-2126" /></p>
<p></p>
<h2>Minimize Processing</h2>
<p></p>
<p>As in checking for painting threads, use the Profiler to ensure that you don’t have threads running that aren’t actually necessary. A careful balance must be maintained here; if you perform an action in your application that may take some time, the application will expect it to continue even if you go to another application in the meantime. Similarly, if your application is expected to do tasks in the background &#8211; such as downloading music or tracking GPS coordinates &#8211; then processing can’t be avoided. However, battery life will be greatly enhanced if your application does this processing all at once, with periods of full idleness in between processing blocks. Ensure that your processing is not spread out over a long period of time, and the device will be able to go to a low-power sleep mode.</p>
<h2>Be Aware of the Device Context</h2>
<p></p>
<p>Before your application runs a background process, check the status of the device to determine if it is an appropriate time, or to optimize the task itself. Check the Idle Time using DeviceInfo.getIdleTime() and Backlight.isEnabled() to determine if you are currently using the device. Heavy processing should be done when the device is idle in order to avoid an impact to the user.</p>
<p>If the task your application intends to do is lengthy, ensure that there is adequate battery power available, or wait until the device is connected to a charging source. The DeviceInfo.getBatteryLevel() API will return the percentage of remaining battery, while DeviceInfo.getBatteryStatus() &amp; DeviceInfo.BSTAT_CHARGING &gt;0 will determine if the battery is currently charging. Applications should not keep the backlight on unless the device is connected to a charger, or if the screen display is critical to the application. For example, navigation apps should shut off the backlight when not powered by a car charger, while a video player should enable the backlight while the video is playing but not when it finishes.</p>
<p>Finally, check the network coverage available if you need to make a network connection, or the GPS satellite coverage if you intend to use GPS. If coverage is poor, then it will take more power to use the radio, or it may be more effective to wait until coverage is better. In the case of network communication, it may be more effective to download a smaller, lower quality set of data immediately and wait until WiFi® coverage is available, or to sideload large data through USB. For GPS, cell site location will provide approximate location with very low power use almost instantaneously while waiting for a more accurate GPS satellite fix to occur. The BlackBerry location object can provide information on the number of satellites visible to determine the effectiveness of getting a satellite fix. Likewise, the RadioInfo.getSignalLevel() API will tell you how strong the signal is, and the CoverageInfo.isCoverageSufficient() or TransportInfo.hasSufficientCoverage() methods will tell you if a connection is possible through the transport that you require.</p>
<h2>Free Memory</h2>
<p></p>
<p>Dropping references to stale objects is important when your application is long-lived. Objects should be released when no longer needed, but not too aggressively. Since object creation is costly, you don’t want to churn through objects if you will need them again, so there is a balance to find here. For example, your application should not usually release screens it has on the stack immediately upon going to the background. If you switch back to your application, you do not want to wait for the screen to be recreated. However, if the screen contains information from an external source, that data structure could be released when it’s no longer current and refreshed when you return.</p>
<p>Running in the background is a pillar of the Super Apps concept, and with so many Super App features enabled by background processing, it’s critical to remember to “Design for Efficiency”. You’ll earn the gratitude of your users – and they will enthusiastically recommend your app to their friends and colleagues!</p>
<p>Have you tried integrating any of these tips into your Super Apps designs?  Let us know in the comments.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/2122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/2122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=2122&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2010/09/running-in-the-background-part-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d4af90af66399bef37f445ec81aba64a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timwin1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2010/09/backgroundpart4-browser1.jpg" medium="image">
			<media:title type="html">Running in the Background Part 4</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2010/09/backgroundpart4-list1.jpg" medium="image">
			<media:title type="html">BlackBerry background processes</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing BlackBerry 6 to Developers</title>
		<link>http://devblog.blackberry.com/2010/07/blackberry-6-developers/</link>
		<comments>http://devblog.blackberry.com/2010/07/blackberry-6-developers/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 16:26:53 +0000</pubDate>
		<dc:creator>Mike Kirkup</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[blackberry 6]]></category>
		<category><![CDATA[blackberry partner fund]]></category>
		<category><![CDATA[developer challenge]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[html 5]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[super apps]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=1915</guid>
		<description><![CDATA[Get ready for upcoming Inside BlackBerry Developer's Blog posts featuring BlackBerry 6 from Java® and Web development perspectives.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=1915&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img src="http://rimdevblog.files.wordpress.com/2010/07/statusbarhighlighted.jpg?w=360&#038;h=480" alt="" title="BlackBerry 6" width="360" height="480" class="aligncenter size-full wp-image-1920" /></p>
<p>There’s been no shortage of excitement about BlackBerry® 6 lately &#8211; I am thrilled by the response to our latest<a href="http://blogs.blackberry.com/2010/07/blackberry-6-another-sneak-peek/" title="BlackBerry 6: Another Sneak Peek">BlackBerry 6 video</a> and <a href="http://blogs.blackberry.com/tag/blackberry-6/">Inside BlackBerry blog posts</a>. We wanted to find a way to outline for you, our developer community, some of the opportunities that BlackBerry 6 will bring.</p>
<p>One thing we want to do is differentiate the way BlackBerry 6 will affect Java® development versus Web development. Over the coming weeks, we will share tips, tricks and more information about developing for BlackBerry 6 through two separate paths. For our Java developers, we’ll work to highlight the new APIs being introduced, including a new powerful set of new User Interface controls, Universal Search integration, and a Barcode Capture API. For our web developers, we’ll start to redefine BlackBerry® Widgets and talk about the completely revamped BlackBerry Browser powered by a Webkit engine. We will cover HTML5, CSS3, and concrete steps for how you can bring your mobile site to BlackBerry® smartphones.</p>
<p>On top of that, we are going to continue our series covering Super Apps and how you can create an amazing user experience on the BlackBerry platform. We are now less than eight weeks away from the final deadline for the <a href="http://www.blackberrypartnersfund.com/2010challenge" target="_new">BlackBerry Partners Fund Super Apps Developer Challenge</a>. With over $1.5 million in prizing, this is a challenge you don&#8217;t want to watch from the sidelines.</p>
<p>So bookmark the Inside BlackBerry Developer’s Blog (if you haven’t already!) and be sure to check back frequently for all the latest content! </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/1915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/1915/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=1915&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2010/07/blackberry-6-developers/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/df3fbb85b0186198b2f85e7cd3f0bf1a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mikekir1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2010/07/statusbarhighlighted.jpg" medium="image">
			<media:title type="html">BlackBerry 6</media:title>
		</media:content>
	</item>
	</channel>
</rss>
