<?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; github</title>
	<atom:link href="http://devblog.blackberry.com/tag/github/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; github</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>Adding Gamepad Support to Your BlackBerry 10 Game</title>
		<link>http://devblog.blackberry.com/2013/02/blackberry-10-gamepad-support/</link>
		<comments>http://devblog.blackberry.com/2013/02/blackberry-10-gamepad-support/#comments</comments>
		<pubDate>Thu, 21 Feb 2013 17:22:02 +0000</pubDate>
		<dc:creator>SeanPaulT</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Native SDK Development]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Platform Services]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[gamepads]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[sample code]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=13882</guid>
		<description><![CDATA[I&#8217;ve heard a lot of people claim that the gamepad is dead &#8211; doomed to be replaced by touch screens. I disagree with this sentiment.  There’s nothing wrong with mobile games using cool new control schemes that make good use of touch screens – but if I’m playing a game that was designed with gamepads [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=13882&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://rimdevblog.files.wordpress.com/2013/02/blackberry10_gamepadsupport.jpg"><img class="aligncenter size-full wp-image-13896" alt="BlackBerry10_GamepadSupport" src="http://rimdevblog.files.wordpress.com/2013/02/blackberry10_gamepadsupport.jpg?w=598&#038;h=147" width="598" height="147" /></a></p>
<p>I&#8217;ve heard a lot of people claim that the <a href="http://en.wikipedia.org/wiki/Gamepad" target="_blank">gamepad</a> is dead &#8211; doomed to be replaced by touch screens. I disagree with this sentiment.  There’s nothing wrong with mobile games using cool new control schemes that make good use of touch screens – but if I’m playing a game that was designed with gamepads in mind, like <a href="http://appworld.blackberry.com/webstore/content/18561355" target="_blank">Shadowgun</a>, why can’t I just use a real controller?</p>
<p>Well, now I can &#8211; and so can you. Check out gamepad support now being added in upcoming <a href="http://unity3d.com/promo/unity4/?gclid=CPXA9bH0x7UCFUXf4AodJm0Aig" target="_blank">Unity 4</a> for BlackBerry 10:</p>
<p><span id="more-13882"></span></p>
<p style="text-align:center;"><a href="http://rimdevblog.files.wordpress.com/2013/02/blackberry10_gamepadsupport.jpg"><a href="http://rimdevblog.files.wordpress.com/2013/02/unity_gamepadsupport.jpg"><img class="aligncenter size-full wp-image-13898" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2013/02/unity_gamepadsupport.jpg?w=598&#038;h=219" width="598" height="219" /></a></a></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/d9SEYTlFsIM?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>
<p>&nbsp;</p>
<p>After years of being frustrated by touch screen gamepads, I’m excited about bringing physical gamepad support to the <a href="developer.blackberry.com/native/" target="_blank">Native SDK</a> for BlackBerry 10. By making use of the new Gamepad API features developers can make their games work with physical controllers, giving their players the tactile responsiveness they’re used to from consoles and desktop PCs. When this is combined with BlackBerry 10’s built-in HDMI connectivity, you end up with a console experience in your pocket!</p>
<p>Here is another video showcasing gamepad pairing instructions and a racer sample on <a href="http://gameplay3d.org/">GamePlay3D</a> that now supports not only desktop gamepad support but also BlackBerry 10:</p>
<p><a href="http://rimdevblog.files.wordpress.com/2013/02/gameplay3d_gamepadsupport.jpg"><img class="aligncenter size-full wp-image-13897" alt="GamePlay3D_GamepadSupport" src="http://rimdevblog.files.wordpress.com/2013/02/gameplay3d_gamepadsupport.jpg?w=433&#038;h=132" width="433" height="132" /></a></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/B4NGAp2O2sM?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>
<p>&nbsp;</p>
<p>Before you get started implementing this in your own game, I want to answer a few of the most common questions people ask me about the API.</p>
<ol start="1">
<li>What gamepads are supported right now?
<ol start="1">
<li>The <a href="http://steelseries.com/products/other/steelseries-free-mobile-wireless-controller">SteelSeries Free</a>.</li>
<li>The <a href="http://www.gametel.se/">Gametel</a>.</li>
<li>The Wii Remote.  Note that currently only the core buttons on the remote itself are supported – that means no attachments and no motion controls, just the D-Pad and other buttons.</li>
</ol>
</li>
<li>If new gamepads come out, do I have to update my game to support them?
<ol start="1">
<li>No, you don’t!  When new controllers become available, we’ll update the mappings in a system update and your game will start receiving gamepad inputs from the new hardware.  Because the Gamepad API is an abstraction above HID, and because we map each gamepad’s unique HID report format to the Gamepad API, you don’t need to write any code that’s specific to a single controller.</li>
</ol>
</li>
<li>Do users need to install anything to set up or configure their gamepads?
<ol start="1">
<li>No.  The Gamepad API is integrated into the Screen library, the same library you are already using to handle touch, keyboard, and other input events.  All users have to do is pair their device through the Bluetooth settings screen for it to start sending inputs to your game.</li>
</ol>
</li>
</ol>
<p>We realize there are other gamepads out there and continue to work towards supporting as many devices as possible. If you know of a Bluetooth, HID-compatible game controller that’s not supported yet, please let us know in the comments. Meanwhile, the fact that you won’t have to change your code when we add more devices to the list means you only help yourself (and your users) by starting to use this new feature right away.</p>
<p><a href="http://developer.blackberry.com/native/documentation/bb10/create_the_gamepad_app.html">Here’s a tutorial</a> that should get you up and running. It includes plenty of code snippets and is based on <a href="https://github.com/blackberry/NDK-Samples/tree/master/Gamepad">this open-source sample project</a>, which started as a little app I whipped up to test the new API. It eventually turned into a demo of two-player connectivity and a configuration screen.  I hope you find it useful.</p>
<p>Please, for the sake of everyone who’s ever been frustrated by touch controls, try this new feature and leave your feedback – I’m eager to do what I can to help if you have any trouble.  Most of all, I’m looking forward to playing your games with a real gamepad!</p>
<p>Links:</p>
<ul>
<li><a href="http://developer.blackberry.com/native/documentation/bb10/create_the_gamepad_app.html">Tutorial</a></li>
<li><a href="https://github.com/blackberry/NDK-Samples/tree/master/Gamepad">Sample code</a></li>
<li><a href="http://steelseries.com/products/other/steelseries-free-mobile-wireless-controller">SteelSeries Free</a></li>
<li><a href="http://www.gametel.se/">Gametel</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/13882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/13882/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=13882&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2013/02/blackberry-10-gamepad-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/588de8e9ded23b503ae5fb589bf35159?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">seanpaultaylor</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2013/02/blackberry10_gamepadsupport.jpg" medium="image">
			<media:title type="html">BlackBerry10_GamepadSupport</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2013/02/unity_gamepadsupport.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2013/02/gameplay3d_gamepadsupport.jpg" medium="image">
			<media:title type="html">GamePlay3D_GamepadSupport</media:title>
		</media:content>
	</item>
		<item>
		<title>bbUI.js version 0.9.5 signed, sealed and delivered</title>
		<link>http://devblog.blackberry.com/2012/12/bbui-js-version-0-9-5/</link>
		<comments>http://devblog.blackberry.com/2012/12/bbui-js-version-0-9-5/#comments</comments>
		<pubDate>Tue, 11 Dec 2012 20:15:11 +0000</pubDate>
		<dc:creator>Tim N.</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WebWorks]]></category>
		<category><![CDATA[bbUI]]></category>
		<category><![CDATA[bbui.js]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=12625</guid>
		<description><![CDATA[With bbUI v0.9.5, &#60;meme&#62;We Has JavaScript&#60;/meme&#62;. The focus in this release has really been another round of bug fixes, optimizations and additional JavaScript interfaces. The previous versions of bbUI have started to improve with the number of JavaScript interfaces, but still haven’t provided full dynamic functionality. This release gets us further towards our goal of [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12625&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-9170" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2012/05/bbui-1.jpg?w=500&#038;h=124" width="500" height="124" /></p>
<p>With <a href="https://github.com/blackberry/bbUI.js" target="_new">bbUI v0.9.5</a>, &lt;meme&gt;We Has JavaScript&lt;/meme&gt;. The focus in this release has really been another round of bug fixes, optimizations and additional JavaScript interfaces. The previous versions of bbUI have started to improve with the number of JavaScript interfaces, but still haven’t provided full dynamic functionality. This release gets us further towards our goal of creating more dynamic user interfaces via JavaScript. While we’ve made major steps forward in this department with v0.9.5, we’re not finished yet and have much more planned for <a href="https://github.com/blackberry/bbUI.js/issues?milestone=11&amp;page=1&amp;state=open" target="_new">v0.9.6</a>.</p>
<p>Be sure to <a href="https://github.com/blackberry/bbUI.js/blob/master/CHANGELOG.md" target="_new">check out the full change log</a> for this release to know what kind of adjustments you may need to make to your app in order to run v0.9.5. Also, <a href="https://github.com/blackberry/bbUI.js/issues?milestone=9&amp;page=1&amp;state=closed" target="_new">check out the closed issues</a> for details on bug fixes and new features. Any v0.9.5 compatibility changes are fairly minor and are meant to make your life easier as we continue to move forward.</p>
<p><span id="more-12625"></span></p>
<h3><strong>Notable Improvements</strong></h3>
<ul>
<li>Updated coloring/styling/sizing to better match Cascades</li>
<li>New <a href="https://github.com/blackberry/bbUI.js/wiki/Screens" target="_new">Title Bar</a> styling allows for optional coloring other than the default light or dark</li>
<li>Minified versions of the JavaScript and CSS files are now provided</li>
<li>Action Bar back button and “button actions” highlight when touched</li>
<li>Image Grids now allow for a specified number of columns in a row as well as horizontal carousel scrolling</li>
<li>Action and tab overflow menus now vertically scroll items when there are too many options to fit on the screen at one time</li>
<li><a href="https://github.com/blackberry/bbUI.js/wiki/Toggle-Buttons" target="_new">Toggle Buttons</a> now support a disabled state</li>
<li>Ability to refresh all the items in an image list at once</li>
<li>Many new JavaScript interfaces for controls with updated samples to show how to use them</li>
<li>Control bug fixes</li>
</ul>
<h3><strong>Compatibility Changes</strong></h3>
<p>I mentioned that there were a few changes that were made that will affect your applications, so let’s talk about those:</p>
<ul>
<li>Image Lists:</li>
<li>List items now only highlight if they have an associated onclick for the item or have a context menu assigned to the list.</li>
<li>Images for image lists are now 109 x 109 for BlackBerry 10 devices to match the new list item height adjustment.</li>
<li>You now simply include bbUI.js and bbUI.css in your application. There are no longer any version numbers as part of the source file names. Version numbers are now contained inside the files as code comments.</li>
<li>The samples now show how to use your initialization code in the “webworksready” event for all BlackBerry OS versions.</li>
</ul>
<h3><strong>More to Come</strong></h3>
<p>We’ve created an additional <a href="https://github.com/blackberry/bbUI.js/issues?milestone=11&amp;page=1&amp;state=open" target="_new">v0.9.6 milestone for bbUI</a> that contains additional BlackBerry 10 styling improvements, and also includes more JavaScript interfaces for dynamic screen creation and manipulation. If you’re interested in following the bbUI.js changes as they go, feel free to <a href="https://twitter.com/brcewane" target="_new">follow me on Twitter</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/12625/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/12625/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12625&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/12/bbui-js-version-0-9-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3939390650b170ba28e9bf3c53d397ad?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timneil1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/bbui-1.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>
	</item>
		<item>
		<title>Urban Airship and BlackBerry 10</title>
		<link>http://devblog.blackberry.com/2012/11/urban-airship-and-blackberry-10/</link>
		<comments>http://devblog.blackberry.com/2012/11/urban-airship-and-blackberry-10/#comments</comments>
		<pubDate>Fri, 30 Nov 2012 03:30:22 +0000</pubDate>
		<dc:creator>garett</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Platform Services]]></category>
		<category><![CDATA[Cascades]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[push]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=12464</guid>
		<description><![CDATA[If you have ever implemented Push across multiple platforms, then you have no doubt heard of Urban Airship, which offers a service to centralize and manage pushes to all devices. This greatly simplifies the process of managing and maintaining data delivery to a single application across a wide array of mobile environments. Urban Airship officially [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12464&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-12465" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2012/11/urban-airship-1.jpg?w=550&#038;h=188" height="188" width="550" /></p>
<p>If you have ever implemented Push across multiple platforms, then you have no doubt heard of Urban Airship, which offers a service to centralize and manage pushes to all devices. This greatly simplifies the process of managing and maintaining data delivery to a single application across a wide array of mobile environments.</p>
<p>Urban Airship officially supports iOS, Android, Helium for Windows, Windows 8, Windows Phone 8 and BlackBerry OS 7.1 and earlier. Every platform offers “push” in their own unique way, so traditionally you would need to tailor your server-side development uniquely for each platform being targeted. This can be a huge pain, especially when you need to do things like add new functionality, track currently-registered devices, determine the format for all the various push types and queries, and so on. With Urban Airship, you can have all devices from any of the supported platforms register against your online account; after that, all you need to do is interface with the Urban Airship server using relatively simple JSON-formatted commands to send data to any device that has your application installed. As if that wasn’t easy enough, there are also server libraries in a variety of flavors to speed up and simplify the <a href="https://docs.urbanairship.com/display/DOCS/Server%3A+Libraries" target="_new">process</a>.</p>
<p><span id="more-12464"></span></p>
<p>As you may have read in <a href="http://devblog.blackberry.com/2012/10/blackberry-push/" target="_new">my previous blog post</a>, from the server-side of things nothing has changed with respect to BlackBerry Push Services &#8212; if you have a server-side application that pushes to BlackBerry devices running OS 7.1 and earlier, the same application is fully capable of pushing to a BlackBerry 10 application. With that in mind, you may already realize that this means that the server portion of Urban Airship is already fully capable of pushing to BlackBerry 10; the only portion that is missing is the client-side. Today I am happy to announce that we have just published a BlackBerry 10 sample application using the Cascades framework to <a href="https://github.com/blackberry/Cascades-Community-Samples" target="_new">GitHub</a> which demonstrates registering the device with an Urban Airship account so that it can begin receiving data pushes.</p>
<p><img class="aligncenter size-full wp-image-12466" alt="" src="http://rimdevblog.files.wordpress.com/2012/11/urban-airship-2.jpg?w=333&#038;h=513" height="513" width="333" /></p>
<p>This sample handles the registration of the device with the device Push Notification Service, BlackBerry Push Services, and then finally with your specified Urban Airship account. Once completed, you can then log in to your Urban Airship control panel and begin sending test push messages to your newly registered BlackBerry 10 Dev Alpha testing device.</p>
<p>All account information is housed in one class to make modifying for your application as easy as possible &#8212; simply open UrbanAirshipAPI.cpp and modify the static string values here with those assigned for your application. After this is done, it should be as easy as compiling and running the application on a live device to begin testing out Urban Airship push notifications on BlackBerry 10.</p>
<p><strong>Note:</strong> You will need to ensure your code signing keys have <a href="http://devblog.blackberry.com/2012/11/push-permissions-changes/" target="_new">push permissions</a> applied.</p>
<p>The UrbanAirshipAPI cpp and hpp files can also be added to your own application to easily add Urban Airship registration support.</p>
<p>If you have an Urban Airship account already and would like to start targeting BlackBerry 10 applications with your existing services, you can request access to an evaluation BlackBerry Push Services account <a href="https://developer.blackberry.com/develop/platform_services/push_overview.html" target="_new">here</a>. On the flip side, should you already have a BlackBerry Push Services account and would like to explore the offerings of Urban Airship to either expand or consolidate your push offerings, you can request an account <a href="http://go.urbanairship.com/" target="_new">here</a>.</p>
<p>For more information, please refer to the following resources:</p>
<p><a href="https://github.com/blackberry/Cascades-Community-Samples/tree/master/UrbanAirshipClient" target="_new">GitHub Cascades-Community-Samples</a><br />
<a href="https://developer.blackberry.com/develop/platform_services/push_overview.html" target="_new">BlackBerry Push Services overview</a><br />
<a href="http://docs.blackberry.com/en/developers/subcategories/?userType=21&amp;category=Push+Service" target="_new">BlackBerry Push Services Documentation</a><br />
<a href="http://urbanairship.com" target="_new">Urban Airship home page</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/12464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/12464/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12464&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/11/urban-airship-and-blackberry-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75e7e69af37da351a3462a17576c2209?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gbeuk</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/11/urban-airship-1.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/11/urban-airship-2.jpg" medium="image" />
	</item>
		<item>
		<title>Integrating NFC into your BlackBerry 10 Application</title>
		<link>http://devblog.blackberry.com/2012/10/blackberry-10-app-nfc/</link>
		<comments>http://devblog.blackberry.com/2012/10/blackberry-10-app-nfc/#comments</comments>
		<pubDate>Thu, 25 Oct 2012 15:34:13 +0000</pubDate>
		<dc:creator>mdwrim</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[Near Field Communication]]></category>
		<category><![CDATA[nfc]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[use case]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=11782</guid>
		<description><![CDATA[Guest post from John Murray &#8211; Ed. You know, working in the Developer Relations team at Research In Motion® (RIM®), you get to get to play around with some fun stuff. Recently, Near Field Communication (NFC) has been exercising my brain cells. Some of you may be familiar with the NFC-related articles and code samples [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11782&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><i>Guest post from John Murray &#8211; Ed.</i></p>
<p>You know, working in the Developer Relations team at Research In Motion® (RIM®), you get to get to play around with some fun stuff. Recently, Near Field Communication (NFC) has been exercising my brain cells. Some of you may be familiar with the NFC-related articles and code samples that I’ve co-authored with my co-conspirator, Martin Woolley (<a href="http://twitter.com/mdwrim" target="_new">@mdwrim</a>), which you can find listed in our <a href="http://supportforums.blackberry.com/t5/Java-Development/NFC-Article-and-Code-Index/ta-p/1538775" target="_new">NFC Article and Code index</a>.</p>
<p>Now, whenever you mention NFC in a conversation, people invariably think of payments. Using NFC to make secure payments is perhaps the most obvious use case. However, when I think of NFC I tend to think of workflows as well. “Workflows,” you say? What do you mean?</p>
<p>OK, let’s think about it anecdotally. How many times have you had the challenge of transcribing some data from an external source to your handset whilst holding a bag and trying to hold a conversation at the same time? How many times have you tried to share information on your handset with someone else and had to struggle with inputting email addresses whilst doing three other things at the same time? These use cases are examples of Workflows, or Business Processes, that stumble on the point of having to accommodate more “human” interaction than is really necessary. NFC can be used to help streamline simple workflows that involve human interactions on mobile devices and ultimately help achieve efficiencies.</p>
<p><span id="more-11782"></span></p>
<p>So, having thought about this and how to demonstrate a simple but realistic use case (whilst also having some fun), we came up with the concept of the “Fun Run”.</p>
<p>Suppose you’re taking part in a charity “Fun Run” – not quite a marathon but something shorter for fun. The race organizers have developed a simple mobile application to allow you to register for the event and have placed NFC Tags in the starting and finishing areas. As you start you tap on one of the tags, your race timer is started as well as notifying the organizers that you have begun. When you pass the finish line, simply tap on one of the tags in the Finish area to stop your timer and notify the organizers of your finishing time!</p>
<p>In between the start and finish, there may be Way Points with NFC Reader devices that can be used to register intermediate times as the runner passes these points. Tap the handset to the NFC Reader and receive confirmation that the timing data has been transferred successfully.</p>
<p>OK, maybe it’s not 100% realistic, but as an example it is sufficient to demonstrate how a workflow process that involves having to record start and finish times and tracking progress can be made more efficient using NFC. The key learning point is to understand how integrating NFC technology into your application can be used to achieve efficiencies in similar processes.</p>
<h3><strong>The Applications</strong></h3>
<p>Let’s take a look at how we implemented this simple example using BlackBerry® 10 and BlackBerry® 7 NFC capable devices. There are really three use cases:</p>
<p>1. Tap your handset against an NFC tag at the start of the race to start your race timer.<br />
2. Tap your handset against NFC readers at intermediate waypoints during the race to transfer your current race timer data to an application that manages the reader.<br />
3. Tap your handset against an NFC tag at the end of the race to stop your race timer.</p>
<h3><strong>Acting on External Tag Events</strong></h3>
<p>To implement the first and last use case, we decided to provide two NFC tags that had specific NDEF messages as their content. There would be one tag that would start the timer at the start of the race and one tag that would stop the timer at the end of the race.</p>
<p>Specifically the data in the two tags is:</p>
<p><strong>1. Tag used to start the timer:</strong></p>
<p>NDEF TNF = External ( integer value 4 )<br />
Type = &#8220;my.rim.com:myrecordtype&#8221;<br />
Payload = &#8220;start&#8221;</p>
<p><strong>2. Tag used to stop the timer:</strong></p>
<p>NDEF TNF = External ( integer value 4 )<br />
Type = &#8220;my.rim.com:myrecordtype&#8221;<br />
Payload = &#8220;stop&#8221;</p>
<p>Why use this data? Well, firstly we choose an NDEF TNF (Type Name Format) for the NDEF Message because it allows us to define custom tag content that won’t clash with standard tag message types such as Smart Poster (“Sp”) or URL (“U”) or Text (“T”). We want to make sure that when one of these tags is presented, our application, and our application alone, is launched to process the tag.</p>
<p>Secondly, we choose a “Type” of &#8220;<strong>my.rim.com:myrecordtype</strong>&#8220;. Within the context of an External TNF record the Type can be arbitrary, but in order to prevent clashes with other organizations’ custom tag formats, we use the DNS naming scheme to set the namespace of the tag as “<strong>my.rim.com</strong>” to establish it as a RIM NDEF message. We further qualify it with a specific sub-type of “<strong>myrecordtype</strong>” since an organization may define a whole family of custom tag formats for its own use.</p>
<p>So, these settings ensure that these tags will only make sense to our application and not overlap with tags form elsewhere. The “Payload” of the two tags differs in that one has the string “<strong>start</strong>” and the other has the string “<strong>stop</strong>” to mark them as ones to be used to start and stop the timers respectively.</p>
<p>In the case of BlackBerry 10, our application registered with the Invocation Framework through the stanza in its “<strong>bar-descriptor.xml</strong>” file as shown in Figure 1. The “<strong>uris</strong>” attribute of the “<strong>&lt;property &#8230; /&gt;</strong>” tag has been set to the value “<strong>ndef://4/my.rim.com/myrecordtype</strong>” which a URI format specification of the two tags just described above.</p>
<pre>...
&lt;invoke-target id="com.example.NfcRaceTimeWay"&gt;
    &lt;type&gt;APPLICATION&lt;/type&gt;
    &lt;filter&gt;
        &lt;action&gt;bb.action.OPEN&lt;/action&gt;
        &lt;mime-type&gt;application/vnd.rim.nfc.ndef&lt;/mime-type&gt;
        &lt;property var="uris" value="ndef://4/my.rim.com/myrecordtype"/&gt;
    &lt;/filter&gt;
&lt;/invoke-target&gt;
...</pre>
<p style="text-align:center;">Figure 1 Registering for tag types in BlackBerry 10</p>
<p>When a “start” or “stop” tag is presented to the handset, then our application is launched if it’s not already running, and the tag contents are handled as shown in Figure 2 &#8212; where the payload of “start” or “stop” is extracted once we’ve verified that it’s of the correct type.</p>
<pre>...
void NfcListener::receivedInvokeRequest(const bb::system::InvokeRequest&amp; request) {

    QByteArray data = request.data();
    QtMobilitySubset::QNdefMessage ndefMessage = QtMobilitySubset::QNdefMessage::fromByteArray(data);

    handleNdefRequest(ndefMessage);
}

void NfcListener::handleNdefRequest(const QtMobilitySubset::QNdefMessage ndefMessage) {

    QList::const_iterator ndefRecord;

    for ( ndefRecord = ndefMessage.begin(); ndefRecord != ndefMessage.end(); ndefRecord++) {
        if (ndefRecord-&gt;typeNameFormat() == QtMobilitySubset::QNdefRecord::ExternalRtd) {
            if (QString(ndefRecord-&gt;type()).compare("my.rim.com:myrecordtype") == 0 ) {
                emit raceTagDetected(QString(ndefRecord-&gt;payload()));
            }
        }
    }
}
...</pre>
<p style="text-align:center;">Figure 2 Handling a Start or Stop tag in BlackBerry 10</p>
<p>In the case of BlackBerry 7, registration is achieved in Java® by registering a listener for the specific NDEF message type as shown in Figure 3.</p>
<pre>...
    nfcManager = ReaderWriterManager.getInstance();
    nfcManager.addNDEFMessageListener(listener, NDEFRecord.TNF_EXTERNAL, "my.rim.com:myrecordtype", true);
...</pre>
<p style="text-align:center;">Figure 3 Registering for tag types in BlackBerry 7</p>
<p>A similar behaviour is achieved for BlackBerry 7 through the implementation of the “<strong>onNDEFMessageDetected()</strong>” method of the “<strong>NDEFMessageListener</strong>” interface as shown in Figure 4.</p>
<pre>...
    public void onNDEFMessageDetected(NDEFMessage msg) {
        NDEFRecord[] records = msg.getRecords();
        int numRecords = records.length;
        if(numRecords &gt; 0) {
            byte[] payloadBytes = records[0].getPayload();
            try {
                String ascii_payload = new String(payloadBytes,"US-ASCII");
                Utilities.log("XXXX payload="+ascii_payload);
                if (ascii_payload.equals("start")) {
                    startTimer();
                }
                if (ascii_payload.equals("stop")) {
                    stopTimer();
                }
            } catch(UnsupportedEncodingException e) {
                Utilities.log("XXXX "+e.getClass().getName()+":"+e.getMessage());
            }
        }

    }

...</pre>
<p style="text-align:center;">Figure 4 Handling a Start or Stop tag in BlackBerry 7</p>
<p>So, what we’ve achieved here is the ability to use an external NFC tag to trigger a process in our application. In this case it’s simply the starting and stopping of a timer, but it could be extended quite easily to, say, call a web service and integrate the event into a larger workflow process.</p>
<p>What does this look like in practice? Well, here’s a short video of the BlackBerry 10 application in action:</p>
<p style="text-align:center;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='480' height='360' src='http://www.youtube.com/embed/QZ5nABZcFuo?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></p>
<p style="text-align:center;">[ <a href="http://www.youtube.com/watch?v=QZ5nABZcFuo&amp;feature=youtu.be" target="_new">YouTube link for mobile viewing</a> ]</p>
<h3><strong>Virtual Tag Emulation</strong></h3>
<p>Let’s get back to the original use cases. To implement the second one, we decided to have the BlackBerry handset emulate a virtual tag and allow the contents of the virtual tag to be read by an external NFC reader.<br />
What format of tag should be emulated by the handset? This is what we chose:</p>
<p><strong>1. Virtual tag emulated by the application</strong></p>
<p>NDEF TNF = External ( integer value 4 )<br />
Type = &#8220;my.rim.com:myrecordtype&#8221;<br />
Payload = &#8220;hh:mm:ss&#8221;</p>
<p>a. That is the time displayed on the handset in:<br />
Hours (hh)<br />
Minutes (mm)<br />
Seconds (ss)</p>
<p>The type of the virtual tag is exactly the same as for the “start” and “stop” physical tags for the very same reasons, except that the payload is a representation of the current race timer value (“hh:mm:ss”) as displayed by the application.</p>
<pre>...
void NfcListener::startTagEmulation(const QString &amp;tagData) {
    nfc_ndef_record_t *ndefRecord = makeCustomRecord(QString("my.rim.com"), QString("myrecordtype"), tagData);
    if (_emulateNdefMessage) {
        CHECK(nfc_delete_ndef_message(_emulateNdefMessage, true));
        _emulateNdefMessage = 0;
    }
    CHECK(nfc_create_ndef_message(&amp;_emulateNdefMessage));
    CHECK(nfc_add_ndef_record(_emulateNdefMessage, ndefRecord));
    CHECK(nfc_start_ndef_tag_emulation(_emulateNdefMessage));
...</pre>
<p style="text-align:center;">Figure 5 BlackBerry 10 &#8211; starting virtual tag emulation</p>
<p>As shown in Figure 5, starting tag emulation in BlackBerry 10 is quite simple. It just involves calling “<strong>nfc_start_ndef_tag_emulation()</strong>”. In addition we can use BPS (BlackBerry Platform Services) to determine when a read on the virtual tag has been successful, as shown here in Figure 6:</p>
<pre>...
void NfcListener::handleNfcEvent(bps_event_t *event) {
    uint16_t code = bps_event_get_code(event);
    if (NFC_VIRTUAL_TAG_SELECTION_EVENT == code) {
        emit tagEmulationSelectEvent();
    } else if (NFC_VIRTUAL_TAG_LEFT_EVENT == code) {
        emit tagEmulationLeftEvent();
    } else if (NFC_VIRTUAL_TAG_READ_EVENT == code) {
        emit tagEmulationReadEvent();
    }
}
...</pre>
<p style="text-align:center;">Figure 6 BlackBerry 10 &#8211; stopping virtual tag emulation</p>
<p>So, what we’ve achieved here is the ability to transmit live information from an application in the BlackBerry handset in real time to an external application via an NFC reader. The external application simply displays the time displayed by the BlackBerry application, but it could easily be extended to integrate with some larger workflow process.</p>
<p>Take a look at the video here for a demonstration of this on BlackBerry 10:</p>
<p style="text-align:center;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='480' height='360' src='http://www.youtube.com/embed/g58Xpnsqq4o?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></p>
<p style="text-align:center;">[ <a href="http://www.youtube.com/watch?v=g58Xpnsqq4o&amp;feature=youtu.be" target="_new">YouTube link for mobile viewing</a> ]</p>
<p>If you’re interested, the virtual tag emulation functionality was tested using an NFC Reader attached to a PC controlled by a Python application using the “PyScard” (Python for Smart Cards) library available from <a href="http://pyscard.sourceforge.net/" target="_new">SourceForge.net</a>. (Python and Ruby are my favorite programming languages!)</p>
<p>The two versions of our NFC-enabled “Fun Run” applications are available with full source code from our GitHub repositories here:</p>
<p><a href="https://github.com/blackberry/Cascades-Community-Samples/tree/master/NfcRaceTimeWay" target="_new">https://github.com/blackberry/Cascades-Community-Samples/tree/master/NfcRaceTimeWay</a><br />
<a href="https://github.com/blackberry/Samples-for-Java/tree/master/NFC/NfcRaceTime7" target="_new">https://github.com/blackberry/Samples-for-Java/tree/master/NFC/NfcRaceTime7</a></p>
<p>Just in closing, it’s worth making one or two comments about the relative ease of developing applications to the same set of end user specifications in BlackBerry 10 Cascades™ versus BlackBerry 7 Java. I’ve been developing code in C/C++ for more years than I care to remember and for a shorter time in Java (but still since the language first saw the light of day), so I feel I’m qualified to make comparisons. I’ll be honest: I’ve found it much easier to develop applications using C/C++ and Cascades. The user interface elements are particularly easy to use, and I’ve found it possible to get a user interface up and running in Cascades much faster than I would have done in Java. It’s much easier to modify and extend since Cascades elements map directly to Qt/Cascades C++ classes and the SIGNAL() / SLOT() model makes it so easy to connect events to handlers.</p>
<p>I’m definitely sold on Cascades, Qt and C/C++!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/11782/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/11782/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11782&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/10/blackberry-10-app-nfc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d86c7fdd0d15b754b2760af4536923b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mdwrim</media:title>
		</media:content>
	</item>
		<item>
		<title>Building the BlackBerry 10 WebWorks Open Source Framework on Your Own</title>
		<link>http://devblog.blackberry.com/2012/10/blackberry-10-webworks-framework/</link>
		<comments>http://devblog.blackberry.com/2012/10/blackberry-10-webworks-framework/#comments</comments>
		<pubDate>Wed, 24 Oct 2012 16:36:18 +0000</pubDate>
		<dc:creator>Tim W.</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[BlackBerry 10 WebWorks]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[web apps]]></category>
		<category><![CDATA[webworks]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=11795</guid>
		<description><![CDATA[Guest post from Nukul &#8211; Ed. We’ve received a lot of requests from developers to be able to build BlackBerry® 10 WebWorks™ directly from GitHub. Before I talk about how to take advantage of this, I would like to explain why it took us so long to get here and what it means for you. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11795&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-11796" title="" alt="" src="http://rimdevblog.files.wordpress.com/2012/10/bb10-framework.jpg?w=600&#038;h=425" height="425" width="600" /></p>
<p><i>Guest post from Nukul &#8211; Ed.</i></p>
<p>We’ve received a lot of requests from developers to be able to build BlackBerry® 10 WebWorks™ directly from GitHub. Before I talk about how to take advantage of this, I would like to explain why it took us so long to get here and what it means for you.</p>
<p>The main issue was that the latest BlackBerry 10 WebWorks SDK features were dependent on features in the BlackBerry 10 OS. Therefore, if you built BlackBerry 10 WebWorks in open source, it potentially would not work with latest BlackBerry 10 OS beta.</p>
<p>This has changed as we get closer and closer to launch. We are now starting to work on features that are not dependent on the latest BlackBerry 10 OS beta. Imagine this: You hear about an awesome new feature or extension we are working on. You can now go to our <a href="http://github.com/blackberry" target="_new">GitHub repositories</a>, look at pull requests, pull down the branch, and a few minutes later you have a BlackBerry 10 WebWorks build with the new extension or feature.</p>
<p><span id="more-11795"></span></p>
<p>Build time can be less than two to three minutes from a clean build. From the time you see someone’s tweet about an awesome new feature, it could take you less than five minutes to get a build of BlackBerry 10 WebWorks that has that feature.</p>
<p>The advantages to a BlackBerry 10 WebWorks app developer are infinite here. You should never need to wait for new features. You can even build with Linux! It’s all there. There will still be some features that you will need the next OS release for, but that will happen less frequently as we get closer to launch of BlackBerry 10.</p>
<p>Here are the two repos you need to build to get ready to take advantage of this:</p>
<p><a href="https://github.com/blackberry/BB10-WebWorks-Framework" target="_new">https://github.com/blackberry/BB10-WebWorks-Framework</a></p>
<p><a href="https://github.com/blackberry/BB10-Webworks-Packager" target="_new">https://github.com/blackberry/BB10-Webworks-Packager</a></p>
<p>The framework repo contains the Framework that is packaged with your app when you build a BlackBerry 10 WebWorks app. The Packager repo contains all the code for the packaging tool.</p>
<p>There are two main branches in each BlackBerry 10 WebWorks repo: master and next. The master branch will contain all the features that you can currently use with the current publicly-released OS &#8212; think of it as the features we wish we had time to get into the previous release. When a feature is completed, it’s merged into master if does not have any OS dependencies. The next branch will contain the new features that have OS dependencies.</p>
<p>To allow developers to easily build stable versions, each release is tagged using the version number of the release. This allows you to easily check out the source of a particular release. You can simply use the tags to check out the code from that release. For example, you can use “git checkout v1.0.2.9” to pull down the code for the last release. So, any pull request you see going into the master branch, you can grab and use right away. You will see none open today, but over the next couple of weeks you should start seeing many.</p>
<p>The README.md has been updated with all the updated instructions.<br />
Run the unit tests, automated tests, all the developer tools we use are all available to you.</p>
<p>We are doing everything we can to enable developers to take advantage of our latest and greatest work. Just open an issue on our repo when you find an issue with our BlackBerry 10 WebWorks SDK. If you fix a bug or build an awesome extension, contribute it back and help us make BlackBerry 10 WebWorks SDK even better. For details on how to contribute, check out <a href="http://blackberry.github.com/howToContribute.html" target="_new">http://blackberry.github.com/howToContribute.html</a></p>
<p>We recently had <a href="https://github.com/badtoyz" target="_new">Mark Robinson</a> contribute changes to make SDK work on Linux &#8212; contributions like that go a long way. Be sure to see our <a href="http://blackberry.github.com/approvedSignatories.html" target="_new">growing list of contributors</a>!</p>
<p>You can reach me any time on Twitter® <a href="https://twitter.com/nukulb" target="_new">@nukulb</a> or <a href="https://github.com/nukulb" target="_new">send me a message through GitHub</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/11795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/11795/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11795&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/10/blackberry-10-webworks-framework/feed/</wfw:commentRss>
		<slash:comments>0</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/2012/10/bb10-framework.jpg" medium="image" />
	</item>
		<item>
		<title>bbUI.js version 0.9.4 has landed</title>
		<link>http://devblog.blackberry.com/2012/10/bbui-js-update/</link>
		<comments>http://devblog.blackberry.com/2012/10/bbui-js-update/#comments</comments>
		<pubDate>Fri, 19 Oct 2012 15:34:14 +0000</pubDate>
		<dc:creator>Tim N.</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Java Development]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[bbui.js]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=11771</guid>
		<description><![CDATA[After a bunch of hard work, bbUI version 0.9.4 is finally here. The focus in this release has really been around bug fixes, optimizations and additional JavaScript® interfaces. The previous versions of bbUI have been VERY declarative and haven’t allowed for much manipulation after the fact via JavaScript. This release takes a step in the [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11771&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-9170" title="" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2012/05/bbui-1.jpg?w=500&#038;h=124" height="124" width="500" /></p>
<p>After a bunch of hard work, <a href="https://github.com/blackberry/bbUI.js" target="_new">bbUI version 0.9.4 is finally here</a>. The focus in this release has really been around bug fixes, optimizations and additional JavaScript® interfaces. The previous versions of bbUI have been VERY declarative and haven’t allowed for much manipulation after the fact via JavaScript. This release takes a step in the right direction to allow you to create more dynamic user interfaces via JavaScript. While there are some improvements in this department with v0.9.4, we’re not finished yet and have much more planned for <a href="https://github.com/blackberry/bbUI.js/issues?milestone=9&amp;page=1&amp;state=open" target="_new">v0.9.5</a>.</p>
<p>One of the best things I’ve seen lately is the number of people participating in the project. It’s absolutely fantastic to see members of the community grab items from the roadmap, implement them and send them back as pull requests. These pull requests are full on feature creation as well as bug fixes. A gigantic THANK YOU goes out to all those who are helping to improve bbUI!</p>
<p>Be sure to <a href="https://github.com/blackberry/bbUI.js/blob/master/CHANGELOG.md" target="_new">check out the full change log</a> for this release to know what kind of adjustments you may need to make to your JavaScript in order to run v0.9.4, and <a href="https://github.com/blackberry/bbUI.js/issues?milestone=6&amp;page=1&amp;state=closed" target="_new">check out the closed issues</a> for details on bugs that have been fixed and features that have been added. The v0.9.4 JavaScript changes are fairly minor and are meant to make your life easier as we continue to move forward.</p>
<p><span id="more-11771"></span></p>
<h3><strong>Notable Improvements</strong></h3>
<ul>
<li>Updated coloring/styling to better match Cascades™</li>
<li>New <a href="https://github.com/blackberry/bbUI.js/wiki/Screens" target="_new">Title Bar</a> styling which now allows images in the Title Bar</li>
<li>New BlackBerry® PlayBook™ tablet 2.x styling for Activity Indicators, Text Input, Image Lists and Buttons</li>
<li>Many new JavaScript interfaces to manipulate controls on-the-fly</li>
<li>Native <a href="http://www.youtube.com/watch?v=GgtsgVtB0yA&amp;feature=youtu.be" target="_new">scrolling speed increases</a></li>
<li>Screen stack bug fixes</li>
<li>Control bug fixes</li>
</ul>
<h3><strong>Changes to your code</strong></h3>
<p>I mentioned that there were a few changes that were made that will affect your applications JavaScript so let’s talk about those.</p>
<ul>
<li>bb.init()
<ul>
<li>bb10ActionBarDark renamed to actionBarDark</li>
<li>bb10ControlsDark renamed to controlsDark</li>
<li>bb10ListsDark renamed to listsDark</li>
<li>bb10HighlightColor renamed to highlightColor</li>
</ul>
</li>
<li>You no longer specify a viewport meta tag in your main index.htm. This is now supplied by the toolkit at runtime based on the OS version.</li>
<li>BlackBerry® 10 title bars now take on the control coloring.</li>
<li>You no longer need to specify a unique id for your script tags used with screens.</li>
<li><a href="https://github.com/blackberry/bbUI.js/wiki/Scroll-Panel" target="_new">Scroll Panel</a> JavaScript interfaces have been modified.</li>
<li>If you were calling bb.scroller.refresh() you will want to change your code to &#8220;if (bb.scroller) bb.scroller.refresh();&#8221;</li>
</ul>
<h3><strong>More to Come</strong></h3>
<p>We’ve now created an additional <a href="https://github.com/blackberry/bbUI.js/issues?milestone=9&amp;page=1&amp;state=open" target="_new">v0.9.5 milestone for bbUI</a> that contains additional BlackBerry 10 styling improvements, but also includes more JavaScript interfaces for dynamic screen creation and manipulation. If you’re interested in following the bbUI.js changes as they go, <a href="https://twitter.com/brcewane" target="_new">feel free to follow me on Twitter®</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/11771/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/11771/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11771&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/10/bbui-js-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3939390650b170ba28e9bf3c53d397ad?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timneil1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/bbui-1.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing Proximity Gaming with NFC</title>
		<link>http://devblog.blackberry.com/2012/10/proximity-gaming-nfc/</link>
		<comments>http://devblog.blackberry.com/2012/10/proximity-gaming-nfc/#comments</comments>
		<pubDate>Tue, 16 Oct 2012 17:06:03 +0000</pubDate>
		<dc:creator>mdwrim</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 7]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[Near Field Communications]]></category>
		<category><![CDATA[nfc]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Proximity Gaming]]></category>
		<category><![CDATA[sample code]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=10865</guid>
		<description><![CDATA[Amongst the many interesting things I’m lucky enough to get involved with in my role on the RIM® Developer Relations team, Near Field Communications (NFC) has become very much center stage for me over the last year. Some readers of this post may be familiar with the NFC-related articles and code samples that I’ve co-authored [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10865&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Amongst the many interesting things I’m lucky enough to get involved with in my role on the RIM® Developer Relations team, Near Field Communications (NFC) has become very much center stage for me over the last year. Some readers of this post may be familiar with the NFC-related articles and code samples that I’ve co-authored with my buddy John Murray (<a href="http://twitter.com/jcmrim" target="_new">@jcmrim</a>), which you can find listed in our <a href="http://supportforums.blackberry.com/t5/Java-Development/NFC-Article-and-Code-Index/ta-p/1538775" target="_new">NFC Article and Code Index</a>.</p>
<p>Now it has to be said that it wasn’t the best summer here in the UK (though fortunately the weather gave us a break just in time for the Olympics!) and so I occasionally found myself at the weekend with “fine weather-dependent plans” cancelled and time on my hands. One such weekend, I was thinking about NFC and my thoughts turned to discussions I’d had with John about whether NFC could enrich games and the gaming experience in some way.</p>
<p>The world of computer games has changed somewhat in the 30-something years I’ve been playing them! It’s gone from text-based adventure games (“go north!”) played on a PDP-11 with a teletype and no screen, through the block graphics of Lunar Lander on a Commodore Pet, and onwards through Space Quest, Civilisation I, the Monkey Island series and (many) more favourites.</p>
<p>In the beginning and for many years, games were single-player &#8212; or at least they were single machine games. More than one player could play, but you’d have to share the keyboard or take turns. Then came LAN games, and this evolved into Internet-based gaming with huge online gaming communities (without whom, I have no doubt, the world would now be over-run with zombies). The truly great thing about online gaming is that you need never know that “goreslayer765” who just destroyed you in your favourite game is actually a 9-year-old with far more knowledge of automatic weapons than can possibly be healthy. I mean, whose fragile ego could handle knowing that?</p>
<p>So, both extreme ends of the single player vs. multiplayer spectrum are well catered to these days. But in what way might NFC enrich the gaming experience, and in what kind of games? I had a quick brainstorm with John on IM and we came up with a few use cases:</p>
<p><span id="more-10865"></span></p>
<table border="5">
<tbody>
<tr>
<td><strong>Start Game</strong></td>
<td>Two-player games could be kicked off by the two players touching devices. This could trigger an NFC based interaction which your application drives, the outcome of which could be the decision as to which of the players is “Player 1” and which is “Player 2” for example.</td>
</tr>
<tr>
<td><strong>Your Turn</strong></td>
<td>Turn based games would work well with NFC being used to indicate “it’s your turn now,” with a player taking their turn and then touching the other player’s device with theirs.</td>
</tr>
<tr>
<td><strong>Pass it on</strong></td>
<td>It could be cool to create digital tokens of some sort that you could pass to other players by touching their device with yours. With a web component of your game, you could perhaps track your token as it moves from player to player and perhaps travels the world!</td>
</tr>
<tr>
<td><strong>Been there</strong></td>
<td>Games involving visiting physical locations could use NFC tags to allow players to “prove” they’ve been to a place and found the item with the tag. Each tag would contain unique content, including perhaps clues on how to find the next game location. Touching and reading the tag from your application would establish the “been there” credentials required.</td>
</tr>
</tbody>
</table>
<p>But why would you want to do this? After all, there are plenty of other ways to trigger “new game” or “it’s your turn now” and to share data across a network. Well, the appeal of using NFC is simply this: it adds a physical, tactile element to the game. You’re sitting right next to the person you’re playing with, and having to touch devices at intervals in the game could add a novel and fun element to the experience.</p>
<p>We then realized our most important task. We needed a name for the phenomenon of NFC-enabled games that we were now thinking about. In a flash, I had it! Please welcome “<strong>Proximity Gaming</strong>” to the world!</p>
<p>Armed with a few ideas, we decided to develop a game as a proof of concept and set about thinking about what the first game would be and how it would work. We decided we’d develop an NFC-enabled version of “tic tac toe” or “noughts and crosses” as it’s known in the UK.</p>
<p>We decided to use NFC in two places. Firstly, players would have to touch devices to start a game, and secondly, they’d touch devices to indicate “it’s your turn now”.</p>
<p>We had to consider a few issues regarding the implementation. It was immediately apparent that we’d have to pass some kind of message from device A to device B and that we’d probably need several message types. In other words, we’d need a simple protocol.</p>
<p>We could also see several technical ways of sending a message from one device to another. We could use virtual target emulation in theory, or maybe we could use one of the two NFC peer-to-peer APIs, SNEP (Simple NDEF Exchange Protocol) or LLCP (Logical Link Control Protocol).</p>
<p>We dismissed target emulation and focused on the peer-to-peer options, since this was clearly a peer-to-peer scenario. We concluded that either SNEP or LLCP could be used, but that SNEP would be a little easier to work with &#8212; LLCP being a lower-level connection-oriented protocol whereas SNEP is a higher-level message-oriented protocol. We’d worked with both in the past, so we had a pretty good feel for what the coding would be like.</p>
<p>In conclusion, we decided to invent a simple message-oriented protocol and use SNEP as the NFC protocol, which would transport game messages between devices. The UI design was to be basic: an initial screen that prompted players to touch devices to start a new game; a screen for “player 1” to choose either noughts or crosses; and the main game screen upon which to place noughts and crosses.</p>
<p>We also decided to implement the game for both BlackBerry® 7 OS using Java®, and our BlackBerry® 10 Dev Alpha devices using C++/Qt/Cascades. Being able to play the game between a BlackBerry 7 device and a BlackBerry 10 device would be a nice proof of the interoperability of NFC between generations of BlackBerry technology.</p>
<p>Here are some screen shots from the proof of concept game, first from the BlackBerry 7 version of the game:</p>
<p><img class="aligncenter size-full wp-image-10868" title="" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2012/08/proximity-gaming-1.jpg?w=507&#038;h=382" height="382" width="507" /></p>
<p style="text-align:center;"><i>Figure 1 &#8211; New game screen</i></p>
<p><img class="aligncenter size-full wp-image-10867" title="" alt="" src="http://rimdevblog.files.wordpress.com/2012/08/proximity-gaming-2.jpg?w=507&#038;h=382" height="382" width="507" /></p>
<p style="text-align:center;"><i>Figure 2 &#8211; Player 1, choose nought or cross</i></p>
<p><img class="aligncenter size-full wp-image-10866" title="" alt="" src="http://rimdevblog.files.wordpress.com/2012/08/proximity-gaming-3.jpg?w=507&#038;h=382" height="382" width="507" /></p>
<p style="text-align:center;"><i>Figure 3 &#8211; Main game screen</i></p>
<p>And here are some screen shots from the proof of concept game, from the BlackBerry 10 version of the game:</p>
<p style="text-align:center;"><img title="" alt="" src="http://rimdevblog.files.wordpress.com/2012/10/proximity-gaming-4.jpg?w=155" width="155" /> <img title="" alt="" src="http://rimdevblog.files.wordpress.com/2012/10/proximity-gaming-5.jpg?w=155" width="155" /> <img title="" alt="" src="http://rimdevblog.files.wordpress.com/2012/10/proximity-gaming-6.jpg?w=155" width="155" /><br />
<i>Figure 4 &#8211; New game screen; Figure 5 &#8211; In game; Figure 6 &#8211; Game over</i></p>
<p>Thoughts on the “game protocol” crystalized properly as we worked through prototyping the game and we found we needed the following message types in the simple protocol:</p>
<table border="5">
<tbody>
<tr>
<td><strong>Bid for player 1</strong></td>
<td>The act of requesting a new game by touching devices would also determine which of the two players would be Player 1 and get to choose which of noughts or crosses to play with. The “bid” message would be exchanged by both devices and contain a random number. The device that had produced the highest number would “win” the bid and become Player 1.</td>
</tr>
<tr>
<td><strong>End of turn</strong></td>
<td>After placing their nought or cross on the board, players would touch devices so that the other player’s game instance would be informed it could now let the player update the game screen. The protocol message to indicate “end of turn” would need to include information about the turn taken by the current player; specifically, which square on the board they had updated in their turn.</td>
</tr>
<tr>
<td><strong>Reset</strong></td>
<td>There would be occasions where the game state in a device would need to be reset and a suitable message type in the protocol would allow this.</td>
</tr>
</tbody>
</table>
<p>We’d like to tell you how we went about coding the game.</p>
<p>If you want to know how to use SNEP in general terms, we’ve written articles on the subject for both BlackBerry 7 and BlackBerry 10 and sample code too. You’ll find details here:</p>
<p><a href="http://supportforums.blackberry.com/t5/Java-Development/NFC-Peer-to-Peer-Communications-with-SNEP/ta-p/1532841" target="_new">BlackBerry 7 – Peer to Peer Communication with SNEP</a><br />
<a href="http://supportforums.blackberry.com/t5/Native-Development/NFC-on-BlackBerry-10-peer-to-peer-communication-using-SNEP/ta-p/1758859" target="_new">BlackBerry 10 – Peer to Peer Communication with SNEP</a></p>
<p>There’s a key point here: you could implement your Proximity Gaming ideas for either BlackBerry 7 or BlackBerry 10 because both have the specific types of NFC peer-to-peer capabilities that you will need.<br />
Harnessing NFC SNEP in the way we wanted for our game was easy. The APIs themselves are very straightforward to use. For BlackBerry 7 we designed some Java classes, which represent the various message types in the game protocol. This was standard stuff if you’re accustomed to working with protocols, and we ended up with an abstract class called ProtocolMessage and a series of concrete sub-classes, one for each message type. Each of these classes implemented a marshall and demarshall method so that we could easily swap between byte array representations, which would be exchanged over NFC SNEP and Java objects for internal use in the application.</p>
<p>Here&#8217;s an example of one of the protocol message classes:</p>
<pre>public class ProtocolMessageMasterBid extends ProtocolMessage {

    private int bid;

    public ProtocolMessageMasterBid() {
        message_id = Constants.PROTOCOL_MASTER_BID;
        Random rand = new Random(System.currentTimeMillis());
        bid = rand.nextInt(1000000);
    }

    public byte[] marshall() {
        byte [] bid_bytes = Utilities.toBytes(bid);
        byte [] bytes = new byte[1+bid_bytes.length];
        bytes [0] = message_id;
        System.arraycopy(bid_bytes, 0, bytes, 1, bid_bytes.length);
        return bytes;
    }

    public void demarshall(byte[] bytes) {
        if (bytes.length != 5) {
            Utilities.log("XXXX invalid parameter length passed to ProtocolMessageMasterBid demarshall:"+ bytes.length);
            return;
        }
        message_id = bytes[0];
        bid = Utilities.toInt(bytes,1);
    }

    public int getBid() {
        return bid;
    }

    public void setBid(int bid) {
        this.bid = bid;
    }

    public String toString() {
        String string = super.toString() + ",ProtocolMessageMasterBid" + ",bid="+bid;
        return string;
     }
}</pre>
<p>We also implemented classes called NfcReceiver and NfcSender, which implemented NDEFMessageListener and NDEFMessageBuilder respectively and provided the basic mechanism for sending and receiving my protocol messages.</p>
<p>For BlackBerry 10, life was actually simpler and we just needed to create message using the Qt QbyteArray class and then utilize the BlackBerry 10 native APIs for NFC, as shown below:</p>
<pre>void NfcWorker::sendTurnData(bps_event_t *bps_event) {
	nfc_event_t *nfc_event;
	nfc_target_t* target;
	nfc_ndef_record_t* myNdefRecord;
	nfc_ndef_message_t* myNdefMessage;
	// Obtain NFC target object from our BPS NFC event object
	//------------------------------------------------------------------------------
	CHECK(nfc_get_nfc_event(bps_event, &amp;nfc_event));
	CHECK(nfc_get_target(nfc_event, &amp;target));
	//------------------------------------------------------------------------------

	QByteArray ba;
	ba.resize(9);
	ba[0] = 2; // turn over message ID
	// tile changed
	ba[1] = 0;
	ba[2] = 0;
	ba[3] = 0;
	ba[4] = _state-&gt;lastSelection();
	int ls = _state-&gt;lastSelection();
	// symbol changed
	ba[5] = 0;
	ba[6] = 0;
	ba[7] = 0;
	ba[8] = _state-&gt;mySymbol();
	int ms = _state-&gt;mySymbol();
	_state-&gt;mySymbol();
	myNdefRecord = makeTurnOverRecord(ba.constData());
	//------------------------------------------------------------------------------
	CHECK(nfc_create_ndef_message(&amp;myNdefMessage));
	//------------------------------------------------------------------------------
	CHECK(nfc_add_ndef_record(myNdefMessage, myNdefRecord));
	qDebug() &lt;&lt; "XXXX Pushing NDEF message over SNEP";
	//------------------------------------------------------------------------------
	CHECK(nfc_push_ndef_message(target, myNdefMessage));
	//------------------------------------------------------------------------------
	CHECK(nfc_delete_ndef_message(myNdefMessage, true));
	CHECK(nfc_destroy_target(target));
}</pre>
<p>So, having designed and implemented a message-oriented protocol and coded classes which used NFC SNEP to transport those messages between devices, the rest of the effort that rainy weekend was spent on standard game development issues like creating the UI. The UI was really easy to create for the BlackBerry 10 version using Cascades™, and took a fraction of the time and effort we spent on the BlackBerry 7 Java version of the game. In both cases, the NFC part was also quite easy and took relatively little effort as a portion of the whole application.</p>
<p>The next step was to find some guinea pigs to test the application out. (Not real guinea pigs, of course &#8212; their paws are too small and they have claws that make working with a touch screen problematic. So instead, we decided to use humans &#8212; our respective friends and family to be precise. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
<p>Testing was informal. In my case, I explained I’d developed a two-player game that allowed you to take certain actions just by touching the two devices back to back. My guinea pigs generally looked a bit blank or even cynical at this point. “Just touch them together? Really?!” But with a little coaxing I got them started and watched them carefully.</p>
<p>At the very start of the game, the two players are instructed to touch devices to start the game. Looking a little unsure at first, the players touched devices and held them together for a second. The devices responded, vibrating to indicate an NFC message had been received, and the game moved on to the next screen to allow the selected Player 1 to choose noughts or crosses. At this point, the expressions on the players’ faces changed &#8212; from expressions that suggested they were being asked to participate in a black magic ritual to sheer delight with big smiles all around! And from that point, there was no stopping them. They were each playing on devices with touch screens – the BlackBerry® Bold™ 9900 and 9790 smartphones, to be precise – so selecting a place to put their mark on the game “board” was simply a case of touching the screen. And passing turns to the other player? They just touched the devices together, of course!</p>
<p>Here’s a video showing the game in use:</p>
<p style="text-align:center;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='560' height='315' src='http://www.youtube.com/embed/ApEO_WJWlZM?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></p>
<p style="text-align:center;">[ <a href="http://www.youtube.com/watch?v=ApEO_WJWlZM" target="_new">YouTube link for mobile viewing</a> ]</p>
<p>The verdict was very positive. Players liked the idea in general and enjoyed the tactile element of the game play. It seemed that Proximity Gaming was a big hit!</p>
<p>The two versions of our NFC-enabled tic tac toe games are available with full source code from our github repositories here:</p>
<p><a href="https://github.com/blackberry/Samples-for-Java/tree/master/NFC/TouchTicTacToe" target="_new">https://github.com/blackberry/Samples-for-Java/tree/master/NFC/TouchTicTacToe</a><br />
<a href="https://github.com/blackberry/Cascades-Community-Samples/tree/master/TouchTicTacTen" target="_new">https://github.com/blackberry/Cascades-Community-Samples/tree/master/TouchTicTacTen</a></p>
<p>So over to you, BlackBerry developers! How could you use NFC in your BlackBerry smartphone game?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/10865/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/10865/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10865&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/10/proximity-gaming-nfc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d86c7fdd0d15b754b2760af4536923b3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mdwrim</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/08/proximity-gaming-1.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/08/proximity-gaming-2.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2012/08/proximity-gaming-3.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2012/10/proximity-gaming-4.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2012/10/proximity-gaming-5.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2012/10/proximity-gaming-6.jpg" medium="image" />
	</item>
		<item>
		<title>Say It Aint S’OAuth</title>
		<link>http://devblog.blackberry.com/2012/10/say-it-aint-soauth/</link>
		<comments>http://devblog.blackberry.com/2012/10/say-it-aint-soauth/#comments</comments>
		<pubDate>Thu, 11 Oct 2012 14:10:55 +0000</pubDate>
		<dc:creator>chadtatro</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[foursquare]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[oAuth]]></category>
		<category><![CDATA[oAuth 1.0]]></category>
		<category><![CDATA[oAuth 2.0]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=11582</guid>
		<description><![CDATA[In today’s world we’re constantly sharing information via status updates, blog posts, and even checking-in at venues. Connecting with services like foursquare and Twitter is a great way to leverage the popularity of the network within your application. So how do you actually go about integrating features from these services into your application?  First the [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11582&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In today’s world we’re constantly sharing information via status updates, blog posts, and even checking-in at venues. Connecting with services like foursquare and Twitter is a great way to leverage the popularity of the network within your application.</p>
<p>So how do you actually go about integrating features from these services into your application?  First the needs to allow your application access to their profile, and this bring us to Open Authorization – better known as <a href="http://oauth.net/" target="_blank">OAuth</a>.</p>
<p>OAuth you say?!</p>
<p>OAuth is an open standard for authorization used by tons of popular services, foursquare, Twitter, and Tumblr, to name a few.  It allows applications to connect their users to these services without having to handle their username and password.</p>
<p>There are a couple versions of OAuth which we have created sample apps for.</p>
<p><span id="more-11582"></span></p>
<p><strong>OAuth 1</strong></p>
<p>Let’s be honest, OAuth 1 can be darn right nasty to work with out-of-the-box.  OAuth 1 and I are not really good friends, we’ve had many fights over the past year, and often I’ve been on the losing side.  In a nutshell, the way OAuth 1 works is by having an application perform a series of requests to a service, exchanging “tokens”, and ultimately granting the application access to the service on behalf of the user.  It requires several things to go just right, and if something doesn’t, access is denied.</p>
<p>Luckily there is a really awesome open-source JavaScript library written by Rob Griffiths (<a href="http://www.twitter.com/bytespider" target="_blank">@bytespider</a>) called <a href="https://github.com/bytespider/jsOAuth" target="_blank">jsOAuth</a>. JsOAuth takes the pain and extensive process of OAuth 1 away, and allows you to focus on connecting your app with a service such as Twitter rather than spend a ton of time working with the OAuth 1 protocol.</p>
<p><strong>OAuth 2</strong></p>
<p>While OAuth 1 is my adversary; OAuth 2 is my best friend.  This is the next evolution of the OAuth protocol and is used by services like foursquare, and Facebook.  OAuth 2 is much friendlier for developers to integrate into their apps, and provides much easier, and straight forward authorization “flows” to work with.  Though the standard is still evolving, it’s solid, and in contrast to OAuth 1, is amazingly easy to work with.</p>
<p><strong>The Sample Apps</strong></p>
<p style="text-align:center;"><a href="https://github.com/blackberry/BB10-WebWorks-Samples"><img class="aligncenter  wp-image-11584" title="oauth" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2012/10/oauth1.jpg?w=565&#038;h=364" height="364" width="565" /></a></p>
<p>Getting started with OAuth can be pretty intimidating to say the least.  As a former 3<sup>rd</sup> party developer, I’ve been there.  I’ve screamed at my console log, cried like a baby, and even begged the OAuth gods for it to “just work”.  Since joining the BlackBerry® Developer Relations team here at RIM®, I vowed to help make this process easier for fellow developers and I’m glad to finally say that we’ve released two sample apps on GitHub today to help guide you on your OAuth journey.</p>
<p>The first sample app shows how to integrate <a href="https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/Twitter-OAuth-1" target="_blank">Twitter into your application by using the OAuth 1</a> protocol.  You’ll learn how to quickly and painlessly authenticate with Twitter, and post a Tweet to a user’s timeline by taking advantage of the jsOAuth library.</p>
<p>The second sample shows integration with <a href="https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/Foursquare-OAuth-2" target="_blank">foursquare, and uses OAuth 2</a>.  It’ll show you how your application can authenticate a user with the service, search for near-by venues, and then check-in to a venue.</p>
<p>The third sample shows how to integrate <a href="https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/FaceBook-OAuth-2" target="_blank">Facebook and OAuth</a> 2 into your application.  You’ll learn how to authenticate a user with Facebook, and interact with their feed by posting, and reading content.</p>
<p>Each of these samples are completely Open Source, and available on GitHub.  If you find them useful, have any feedback, or need an extra helping hand along your way find me on the <a href="http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/bd-p/browser_dev" target="_blank">BlackBerry Developer Support Forums</a> or Twitter <a href="http://www.twitter.com/chadtatro" target="_blank">@chadtatro</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/11582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/11582/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11582&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/10/say-it-aint-soauth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb86e7b2b71616806266b535686102c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ctetreault1980</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/10/oauth1.jpg" medium="image">
			<media:title type="html">oauth</media:title>
		</media:content>
	</item>
		<item>
		<title>Developer Experience Review of BlackBerry WebWorks &#8211; Compiling the Feedback</title>
		<link>http://devblog.blackberry.com/2012/10/dev-review-webworks-feedback/</link>
		<comments>http://devblog.blackberry.com/2012/10/dev-review-webworks-feedback/#comments</comments>
		<pubDate>Thu, 04 Oct 2012 18:57:20 +0000</pubDate>
		<dc:creator>Adam S.</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[blackberry webworks]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[ripple]]></category>
		<category><![CDATA[Web Extensions]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=11452</guid>
		<description><![CDATA[Well, that was&#8230;refreshing! We just finished a very productive day yesterday, reviewing the end-to-end developer experience of the BlackBerry® WebWorks™ platform. There were some very vibrant conversations about what currently does and does not contribute to a positive experience for someone approaching BlackBerry Web development for the very first time. We found many examples of [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11452&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Well, that was&#8230;refreshing! We just finished a very productive day yesterday, reviewing the end-to-end developer experience of the BlackBerry® WebWorks™ platform. There were some very vibrant conversations about what currently does and does not contribute to a positive experience for someone approaching BlackBerry Web development for the very first time.</p>
<p>We found many examples of things we’re doing right (e.g. automatic updates in Ripple). However, as we hoped to find, we also discovered examples of sub-optimal experiences where new developers could possibly be road blocked in their ability to complete their BlackBerry application. It is these latter examples that proved why we ran this exercise, and we are committed to continuing this review and will re-evaluate the platform again on a regular schedule.</p>
<p>Our group first started by identifying who our development community was. How did they think? What was important to them? How would their potential backgrounds influence how they flow through the “getting started with BlackBerry” experience? Our focus was on the following 5 personalities:</p>
<p><span id="more-11452"></span></p>
<ul>
<li><strong>“The coder”</strong> – Lives in a text editor and can modify their own path variable. Comfortable troubleshooting advanced issues without assistance. Likely have built a mobile app already.</li>
<li><strong>“The beginner”</strong> – Just getting started with mobile development or are evaluating BlackBerry Web dev. May have strong development skills in another language or none at all.</li>
<li><strong>“The desktop web developer”</strong> – Have a very strong understanding of client-server web development. Have successfully built web sites and may have used frameworks like jQuery, Sencha or Dojo.</li>
<li><strong>“The enterprise developer”</strong> – Cross platform is a primary goal. Prefers to use IDEs and typically works under an IT enforced environment.</li>
<li><strong>“The PhoneGap developer”</strong> – Someone who has come to the BlackBerry developer site to learn how to port their PhoneGap application</li>
</ul>
<p>So what did we find? Lots! In fact, I’m still going through all the feedback. Everything from “would be nice” changes to “this is a gating bug and must be fixed” is being documented, and our intent is to file issues so the public can track them in the developer issue tracker . Here are just some of the results from the group:</p>
<ul>
<li><strong>Discovery process:</strong> Search engine optimization should be improved. Keywords that each developer persona would expect to search for did not always generate correct search results.<br />
[Michelle] Search term: “enterprise development for BlackBerry 10” on Google. First result is to register for an outdated/unrelated course; next search results are for BlackBerry® Enterprise Server development.</li>
<li><strong>Sample applications:</strong> A number of BlackBerry WebWorks sample applications are published in Github. We need to refine the flow of navigating a user between blackberry.com and github.com. Also, for new developers, Github is unfamiliar. Some preparation of what to expect and how to use it will be helpful:<br />
[Kevin]: Sample apps&#8230; I am not super familiar with Github. Didn’t like getting dumped into git for samples. I’d prefer to get a zip to download. Managed to figure it out then.<br />
[Brent] &#8211; Click the link for samples on Getting Started &#8211; Taken to Github – what is Github? And what are these samples for &#8211; what do they do?</li>
<li><strong>HelloWorld sample:</strong> More developers will successfully complete the “Creating HelloWorld for BlackBerry 10” tutorial if we provide a direct link to a ZIP file that contains the sample application assets.<br />
[Brent] HelloWorld sample &#8211; copying and Pasting seems like a waste. Possible to download the helloworld package? &#8211; Creating config.xml in notepad and pasting the copied xml text puts it all on one lovely line. #NotImpressed</li>
<li><strong>Ripple:</strong> The Ripple Mobile emulator is currently designed to build and sign a BlackBerry WebWorks application. It also provides an option to deploy to a target device, but only when the app is unsigned. For simulators this is ideal; however, not for live devices where a debug token would be required. Not all developers want / know how to use a debug token.<br />
[Ed] The build choices are confusing and missing the one option I want. I want &#8220;package and sign, or package sign and deploy&#8221; to a real device. Package and launch is confusing because I don&#8217;t want to package and launch to a simulator, but when I do want to for a real device, I want it to do so signed, not with debug tokens I don&#8217;t use. I suggest: &#8220;Package&#8221;, &#8220;Package &amp; Sign&#8221;, &#8220;Package &amp; Sign &amp; deploy&#8221; (to a real device&#8221; and &#8220;Package and launch&#8221; to simulator. the last one, the least likely to use.</li>
</ul>
<p>Here’s how you can send us feedback -</p>
<ol>
<li>Join the discussion in the <a href="http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/BlackBerry-HTML5-WebWorks-Experience-Review-your-feedback/td-p/1932445" target="_new">BlackBerry Web and BlackBerry WebWorks community forum</a>.</li>
<li>Log into the <a href="https://www.blackberry.com/jira/secure/Dashboard.jspa" target="_new">developer issue tracker</a> and file a bug report. Remember to provide as much detail as possible about how to reproduce the problem and what are the expected / actual results.</li>
<li>Let’s have a chat via <a href="https://twitter.com/BlackBerryDev" target="_new">@BlackBerryDev on Twitter®</a> or the <a href="https://www.facebook.com/BlackBerryDeveloperCommunity" target="_new">BlackBerryDevCommunity on Facebook®</a>.</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/11452/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/11452/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11452&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/10/dev-review-webworks-feedback/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/16f032fc46b780f6d9fa38b24a7f8ff2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adamstan1</media:title>
		</media:content>
	</item>
		<item>
		<title>BlackBerry Java Plug-in for Eclipse now available on Github!</title>
		<link>http://devblog.blackberry.com/2012/09/blackberry-java-eclipse-plugin-github/</link>
		<comments>http://devblog.blackberry.com/2012/09/blackberry-java-eclipse-plugin-github/#comments</comments>
		<pubDate>Wed, 26 Sep 2012 16:29:01 +0000</pubDate>
		<dc:creator>Matt W</dc:creator>
				<category><![CDATA[Java Development]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[BlackBerry Java Plug-in for Eclipse]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[plug-in]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=11221</guid>
		<description><![CDATA[Calling all Java® developers: We have some news regarding the BlackBerry® Java® Plug-in for Eclipse™! We are pleased to announce a new Open Source project for the BlackBerry development platform. While we have stopped SDK work on BlackBerry® 7 OS, we’ve decided to make the source code open for all those developers using the Java [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11221&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-11222" title="" src="http://rimdevblog.files.wordpress.com/2012/09/java-logo.jpg?w=230&#038;h=227" alt="" width="230" height="227" /></p>
<p>Calling all <a href="https://developer.blackberry.com/java/" target="_new">Java® developers</a>: We have some news regarding the BlackBerry® Java® Plug-in for Eclipse™!</p>
<p>We are pleased to announce a <a href="https://github.com/blackberry/Eclipse-JDE" target="_new">new Open Source project</a> for the BlackBerry development platform. While we have stopped SDK work on BlackBerry® 7 OS, we’ve decided to make the source code open for all those developers using the Java Plug-in for Eclipse. The BlackBerry Java Plug-in for Eclipse is now available as a repository provided under the Eclipse Public Licenses 1.0. The BlackBerry Java Plug-in for Eclipse lets you develop, test, and debug BlackBerry Java applications using the Eclipse IDE, in combination with the BlackBerry SDK appropriate for the BlackBerry OS your application is targeting.</p>
<p>The readme file on the project page details all the information you will need to build the source code for Windows or Mac, build your own update site for the plug-in or even build your own full installer. For all the details, jump to the <a href="https://github.com/blackberry/Eclipse-JDE" target="_new">project page</a>.</p>
<p>Additionally, the BlackBerry Java Plug-in for Eclipse 2.0 is now available for <a href="https://developer.blackberry.com/java/download/eclipse" target="_new">download</a> as a complete install for Windows and Mac, or as an update via our Eclipse update sites. For more BlackBerry Java related information, tool downloads, sample apps and documentations, please visit our <a href="https://developer.blackberry.com/java/download/eclipse" target="_new">Java development page</a> &#8212; and make sure to <a href="https://github.com/blackberry/Eclipse-JDE" target="_new">fork us on Github</a>!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/11221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/11221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11221&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/09/blackberry-java-eclipse-plugin-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/24f0db511856433f3357906c9dfd7476?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mwhiteman</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/09/java-logo.jpg" medium="image" />
	</item>
	</channel>
</rss>
