<?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; Paul Bernhardt</title>
	<atom:link href="http://devblog.blackberry.com/author/paulbe1/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.blackberry.com</link>
	<description></description>
	<lastBuildDate>Thu, 23 May 2013 19:58:12 +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; Paul Bernhardt</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>BlackBerry Java to BlackBerry 10 Cascades Porting Series – Part 7: PIM</title>
		<link>http://devblog.blackberry.com/2013/04/blackberry-java-to-blackberry-10-cascades-porting-series-part-7-pim/</link>
		<comments>http://devblog.blackberry.com/2013/04/blackberry-java-to-blackberry-10-cascades-porting-series-part-7-pim/#comments</comments>
		<pubDate>Thu, 04 Apr 2013 15:28:35 +0000</pubDate>
		<dc:creator>Paul Bernhardt</dc:creator>
				<category><![CDATA[Native SDK Development]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry Java]]></category>
		<category><![CDATA[Personal Information Management]]></category>
		<category><![CDATA[PIM]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=14502</guid>
		<description><![CDATA[The PIM APIs in BlackBerry 10 are very similar to BlackBerry 7, as you still have the CRUD (create, read, update, delete) actions for Contacts, Calendar, and Messages. There is also the equivalent of “listeners” available using the Qt Signals and Slots method. This will let your app be notified of changes in the PIM [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=14502&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The <a href="https://developer.blackberry.com/cascades/documentation/device_platform/pim/index.html" target="_new">PIM APIs</a> in BlackBerry 10 are very similar to BlackBerry 7, as you still have the <strong>CRUD</strong> (create, read, update, delete) actions for <a href="https://developer.blackberry.com/cascades/documentation/device_platform/pim/contacts.html" target="_new">Contacts</a>, <a href="https://developer.blackberry.com/cascades/documentation/device_platform/pim/calendar.html" target="_new">Calendar</a>, and <a href="https://developer.blackberry.com/cascades/documentation/device_platform/pim/messages.html" target="_new">Messages</a>. There is also the equivalent of “listeners” available using the Qt <a href="https://developer.blackberry.com/cascades/documentation/dev/signals_slots/index.html" target="_new">Signals and Slots</a> method. This will let your app be notified of changes in the PIM databases, although your app needs to be running to receive them.</p>
<p>BlackBerry Hub integration currently consists of the <a href="https://developer.blackberry.com/cascades/documentation/device_comm/notifications/index.html" target="_new">Notification API</a>, which lets you add a notification to the Hub with a custom title, body, sound, and <a href="https://developer.blackberry.com/cascades/documentation/device_platform/invocation/index.html" target="_new">invoke target</a>. The ability to customize the icon will be available in a future OS update.</p>
<p>The concept of Application Menu Items has been broadly replaced by the Invocation framework, specifically the “Share” menu. You cannot add arbitrary menu items to the built in applications, but you can set your application up to handle Share (and other actions). This will make them available from those apps.</p>
<p>Rather than building your own UI to let the user pick or enter PIM data, you may want to use the <a href="https://developer.blackberry.com/cascades/documentation/device_platform/invocation/invoking_core_apps.html" target="_new">Cards</a> and <a href="https://developer.blackberry.com/cascades/reference/bb__cascades__pickers__contactpicker.html" target="_new">Pickers</a> when available.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/14502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/14502/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=14502&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2013/04/blackberry-java-to-blackberry-10-cascades-porting-series-part-7-pim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a3bf8c930434e9f401be449eb7ea556?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulbe1</media:title>
		</media:content>
	</item>
		<item>
		<title>BlackBerry Java to BlackBerry 10 Cascades Porting Series – Part 6: Camera</title>
		<link>http://devblog.blackberry.com/2013/04/blackberry-java-to-blackberry-10-cascades-porting-series-part-6-camera/</link>
		<comments>http://devblog.blackberry.com/2013/04/blackberry-java-to-blackberry-10-cascades-porting-series-part-6-camera/#comments</comments>
		<pubDate>Thu, 04 Apr 2013 14:02:56 +0000</pubDate>
		<dc:creator>Paul Bernhardt</dc:creator>
				<category><![CDATA[Native SDK Development]]></category>
		<category><![CDATA[BlackBerry Java]]></category>
		<category><![CDATA[Camera]]></category>
		<category><![CDATA[Legacy]]></category>
		<category><![CDATA[Port]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=14487</guid>
		<description><![CDATA[In BlackBerry OS 7 and 7.1, there were two ways to interact with the camera: Invoke the camera application and listen for the resulting file Use the javax.microedition.media API (and RIM extensions) to draw the camera inside your app, and capture images/videos there. With BlackBerry 10, you can accomplish the first by invoking the camera [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=14487&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In BlackBerry OS 7 and 7.1, there were two ways to interact with the camera:</p>
<ol>
<li>Invoke the camera application and listen for the resulting file</li>
<li>Use the javax.microedition.media API (and RIM extensions) to draw the camera inside your app, and capture images/videos there.</li>
</ol>
<p>With BlackBerry 10, you can accomplish the first by invoking the camera card, and the second by using the Cascades Camera API.</p>
<h3><strong>Invoke the Camera Card</strong></h3>
<p>This is similar to invoking the Camera App in Java, but more powerful. It is built using the <a href="https://developer.blackberry.com/cascades/documentation/device_platform/invocation/index.html" target="_new">Invocation Framework</a> and with the Camera card, it will seem as though it’s part of your app. You will also prevent the user from going further in your app until they are done with the camera. Use this if you did so before or just want to get a file handle to a photo or video and don’t want to worry about drawing the UI yourself.</p>
<p><span id="more-14487"></span></p>
<p><strong>Setup:</strong></p>
<pre>	_invokeManager = new InvokeManager(this);
	QObject::connect(_invokeManager,
			SIGNAL(childCardDone(const bb::system::CardDoneMessage&amp;)), this,
			SLOT(onChildCardDone(const bb::system::CardDoneMessage&amp;)));</pre>
<p><strong>Invoking:</strong></p>
<pre>	InvokeRequest invokeRequest;
	invokeRequest.setTarget("sys.camera.card");
	invokeRequest.setMimeType("image/jpeg");
	invokeRequest.setAction("bb.action.CAPTURE");
	invokeRequest.setData("photo");
	InvokeTargetReply *invokeReply = _invokeManager-&gt;invoke(invokeRequest);</pre>
<p><strong>Dealing with the result:</strong></p>
<pre>void CameraInvoker::onChildCardDone(const bb::system::CardDoneMessage
		&amp;message){
	qDebug() &lt;&lt; “File URI:” &lt;&lt; message.data() &lt;&lt; endl;
}</pre>
<h3><strong>Cascades Camera API</strong></h3>
<p>This is comparable to what was offered in Java, though it has extra capabilities and is not tied into the Media Player classes. You can easily build a camera viewfinder into your application in pure QML/JavaScript, or C++, or a combination of the two. You can control most functions like focus region, file quality, and viewfinder size/position.</p>
<ul>
<li><a href="https://developer.blackberry.com/cascades/documentation/design/camera/index.html" target="_new">Camera Documentation</a></li>
<li><a href="https://developer.blackberry.com/cascades/reference/bb__cascades__multimedia__camera.html" target="_new">Camera class</a></li>
<li><a href="https://developer.blackberry.com/cascades/reference/bb__cascades__multimedia__camera.html">Photobomber sample</a></li>
</ul>
<p>This API will draw the viewfinder wherever you put it on your screen. Similar to Java, it is up to you to create any UI interactions (like tapping to capture a picture). Unlike Java, you also need to play the capture sound yourself, which is required to be on sale in BlackBerry World in certain regions like Japan.</p>
<pre>#include 
...
soundplayer_play_sound("event_camera_shutter");</pre>
<p>To do Barcodes, connect a BarcodeDetector to a Camera control. You can also do your own detector (or something else) by <a href="https://developer.blackberry.com/cascades/documentation/design/camera/post_processing_viewfinder_frames.html" target="_new">processing the camera preview frames yourself.</a></p>
<ul>
<li><a href="https://github.com/blackberry/Cascades-Samples/tree/master/barcodereader" target="_new">BarcodeReader</a> (Using Cascades component)</li>
<li><a href="https://github.com/blackberry/Cascades-Samples/tree/master/barcodescanner" target="_new">Custom Barcode Scanner</a> (Processing preview frames yourself)</li>
</ul>
<h3><strong>C Camera Library</strong></h3>
<p>This is the low-level API that the Cascades API is built on top of. It is very powerful and allows for things that are not available in the Cascades API like burst capture, facial detection, and directly modifying the preview stream. This is far more advanced than the Java API and beyond the scope of this article.</p>
<p>It’s worth noting that the Cascades and C Camera APIs are not compatible. If you would like to use the C API in Cascades, you can draw a viewfinder with the C API and the Foreign Window Control.</p>
<ul>
<li><a href="http://developer.blackberry.com/native/reference/bb10/com.qnx.doc.camera.lib_ref/topic/overview.html" target="_new">Camera Library</a></li>
<li><a href="http://blackberry.github.com/Community/Camera.html" target="_new">Camera Wiki</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/14487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/14487/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=14487&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2013/04/blackberry-java-to-blackberry-10-cascades-porting-series-part-6-camera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a3bf8c930434e9f401be449eb7ea556?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulbe1</media:title>
		</media:content>
	</item>
		<item>
		<title>BlackBerry Java to BlackBerry 10 Cascades Porting Series – Part 4: Multimedia</title>
		<link>http://devblog.blackberry.com/2013/03/cascades-porting-series-multimedia/</link>
		<comments>http://devblog.blackberry.com/2013/03/cascades-porting-series-multimedia/#comments</comments>
		<pubDate>Wed, 20 Mar 2013 13:31:27 +0000</pubDate>
		<dc:creator>Paul Bernhardt</dc:creator>
				<category><![CDATA[Cascades]]></category>
		<category><![CDATA[Java Development]]></category>
		<category><![CDATA[Native SDK Development]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 7]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[multimedia]]></category>
		<category><![CDATA[Port]]></category>
		<category><![CDATA[porting]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=14214</guid>
		<description><![CDATA[Multimedia on BlackBerry 7 was based on the multimedia JSR (135). There were a lot of limitations regarding supported formats, how many sounds could be played at the same time, and even what worked on which device. In BlackBerry 10, there are a wide range of supported codecs, containers, and protocols. For video, we recommend [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=14214&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="attachment_14224" class="wp-caption aligncenter" style="width: 260px"><a href="http://giphy.com/gifs/TznYiZCFXeLle"><img class="size-full wp-image-14224" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2013/03/original.gif?w=250&#038;h=195" width="250" height="195" /></a><p class="wp-caption-text"><a href="http://giphy.com/gifs/TznYiZCFXeLle" target="_blank">http://giphy.com/gifs/TznYiZCFXeLle</a></p></div>
<p>Multimedia on BlackBerry 7 was based on the multimedia JSR (135). There were a lot of limitations regarding supported formats, how many sounds could be played at the same time, and even what worked on which device.</p>
<p>In BlackBerry 10, there are a wide range of supported <a href="https://developer.blackberry.com/develop/supported_media/bb10_media_support.html" target="_new">codecs, containers</a>, and <a href="https://developer.blackberry.com/devzone/develop/supported_media/bb10_pbos_streaming_support.html" target="_new">protocols</a>.</p>
<p>For video, we recommend an MP4 containing H.264 video at 720p and AAC audio. For audio, it depends a lot on your use case. In addition to mainstays such as MP3 and AAC, we support things like <a href="http://flac.sourceforge.net/" target="_new">FLAC</a> and <a href="http://www.vorbis.com/" target="_new">Ogg Vorbis</a>.</p>
<p>To actually play your multimedia, you should be looking at the <a href="https://developer.blackberry.com/cascades/reference/bb__multimedia__mediaplayer.html" target="_new">MediaPlayer</a> class. That will handle audio or video. You can also easily play the built in system sounds with the <a href="https://developer.blackberry.com/cascades/reference/bb__multimedia__systemsound.html" target="_new">SystemSound</a> class.</p>
<ul>
<li><a href="https://developer.blackberry.com/cascades/documentation/design/audio_video/playing_audio_or_video.html" target="_new">Tutorial: Playing Audio or Video</a></li>
<li><a href="https://developer.blackberry.com/cascades/documentation/design/audio_video/playing_system_sounds_in_an_app_tutorial.html" target="_new">Tutorial: Playing SystemSounds in an app</a></li>
</ul>
<p>Recording audio is through the AudioRecorder class. You can record a few different formats, including AAC (.mp4) and PCM (.wav).</p>
<ul>
<li><a href="https://developer.blackberry.com/cascades/reference/bb__multimedia__audiorecorder.html" target="_new">Recording Audio</a></li>
</ul>
<p>This is all pretty straightforward and should be pretty easy to adjust to if you are used to the Java way of doing things. There are a few key differences that you might not be expecting though.</p>
<p>The first is the <a href="https://developer.blackberry.com/cascades/reference/bb__multimedia__nowplayingconnection.html" target="_new">NowPlayingConnection</a>. If you are building any sort of media player type application: use it. What it does is let the user control the volume and playback of your app from in another app, using the volume keys on the side. You can also provide a bit of data like a thumbnail image and the current song playing. No user is going to want to have to go back into your application just to change the volume, and it’s really easy to implement.</p>
<ul>
<li><a href="https://developer.blackberry.com/cascades/documentation/design/audio_video/working_with_the_nowplayingconnection.html" target="_new">Working with NowPlayingConnection</a></li>
</ul>
<p>Secondly, unlike in BlackBerry 7, in BlackBerry 10 you can enable echo cancellation in order to do VoIP. There is no convenient Qt API to do this, but you can use <a href="http://developer.blackberry.com/native/reference/bb10/audio_libref/topic/summary.html" target="_new">QSA</a> and <a href="http://developer.blackberry.com/native/reference/bb10/audio_libref/topic/libs/snd_pcm_open_name.html" target="_new">open a connection</a> to the “voice” PCM audio interface.</p>
<ul>
<li><a href="http://devblog.blackberry.com/2013/01/blackberry-10-voip/" target="_new">BlackBerry 10 VoIP</a></li>
</ul>
<p>The other big difference is that you can’t just feed bytes directly into the media player. You need to have an actual file to play, or be using one the streaming protocols supported. Of course, there is nothing stopping you from dropping down to <a href="http://connect.creativelabs.com/openal/default.aspx" target="_new">OpenAL/ALUT</a> and doing whatever you need if that’s your style. You also have <a href="http://developer.blackberry.com/native/reference/bb10/audio_libref/topic/summary.html" target="_new">QSA</a> available as mentioned before, as well as <a href="http://developer.blackberry.com/native/reference/bb10/mmrenderer_libref/topic/about.html" target="_new">mm-renderer</a> (which is what MediaPlayer is using), but that is all beyond the scope of this article.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/14214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/14214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=14214&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2013/03/cascades-porting-series-multimedia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a3bf8c930434e9f401be449eb7ea556?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulbe1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2013/03/original.gif" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>
	</item>
		<item>
		<title>BlackBerry Java to BlackBerry 10 Cascades Porting Series – Part 3: Networking</title>
		<link>http://devblog.blackberry.com/2013/02/java-to-cascades-part-3/</link>
		<comments>http://devblog.blackberry.com/2013/02/java-to-cascades-part-3/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 14:53:20 +0000</pubDate>
		<dc:creator>Paul Bernhardt</dc:creator>
				<category><![CDATA[Native SDK Development]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 7]]></category>
		<category><![CDATA[Cascades]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[native]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=13908</guid>
		<description><![CDATA[Networking in BlackBerry 7 OS was based on the Connector.open() paradigm, where you would specify the protocol and transport in the connection string (“http://www.example.com;deviceside=true”), and get back a Connection object of a certain type (HttpConnection, for example). Networking in BlackBerry 10 is done through the QNetwork module. You no longer need to worry about transport [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=13908&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Networking in BlackBerry 7 OS was based on the Connector.open() paradigm, where you would specify the protocol and transport in the connection string (“http://www.example.com;deviceside=true”), and get back a Connection object of a certain type (HttpConnection, for example).</p>
<p><a href="https://developer.blackberry.com/cascades/documentation/device_comm/networking/index.html">Networking</a> in BlackBerry 10 is done through the <a href="https://developer.blackberry.com/cascades/reference/qtnetwork.html" target="_new">QNetwork</a> module. You no longer need to worry about transport selection. Your typical HTTP communication can be handled through <a href="https://developer.blackberry.com/cascades/reference/qnetworkaccessmanager.html" target="_new">QNetworkAccessManager</a>. It provides methods such as get() and post(), which take a <a href="https://developer.blackberry.com/cascades/reference/qnetworkrequest.html" target="_new">QNetworkRequest</a> and then asynchronously return a <a href="https://developer.blackberry.com/cascades/reference/qnetworkreply.html" target="_new">QNetworkReply</a>.</p>
<p><strong>For example:</strong></p>
<pre>QUrl *url = new QUrl("http://www.iana.org/domains/example/");

    QNetworkAccessManager *manager = new QNetworkAccessManager(this);

    connect(manager, SIGNAL(finished(QNetworkReply*)),
    		this, SLOT(replyFinished(QNetworkReply*)));

    manager-&gt;get(QNetworkRequest(*url));</pre>
<p><strong>And then in your replyFinished slot:</strong></p>
<pre>void App::replyFinished(QNetworkReply* reply) {
	qDebug() &lt;readAll();

	// Call deleteLater to make sure the reply gets cleaned up
	reply-&gt;deleteLater();
}</pre>
<p>You can also do TCP with <a href="https://developer.blackberry.com/cascades/reference/qtcpsocket.html" target="_new">QTCPSocket</a> and <a href="https://developer.blackberry.com/cascades/reference/qtcpserver.html" target="_new">QTCPServer</a>, UDP with <a href="https://developer.blackberry.com/cascades/reference/qudpsocket.html">UDPSocket</a> , and FTP with <a href="https://developer.blackberry.com/cascades/reference/qftp.html" target="_new">QFtp</a>.</p>
<p>And of course, lower level <a href="http://developer.blackberry.com/native/reference/bb10/library_support_at_a_glance.html" target="_new">libraries</a> such as <a href="http://curl.haxx.se/" target="_new">cURL</a> are available if you should require them.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/13908/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/13908/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=13908&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2013/02/java-to-cascades-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a3bf8c930434e9f401be449eb7ea556?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulbe1</media:title>
		</media:content>
	</item>
		<item>
		<title>Have An Issue With Running Your Cascades Release Build?</title>
		<link>http://devblog.blackberry.com/2013/01/cascades-release-build-fix/</link>
		<comments>http://devblog.blackberry.com/2013/01/cascades-release-build-fix/#comments</comments>
		<pubDate>Tue, 22 Jan 2013 20:41:27 +0000</pubDate>
		<dc:creator>Paul Bernhardt</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Native SDK Development]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=12995</guid>
		<description><![CDATA[So you have been developing your Cascades app for a while. Everything is working great! You’re ready to just export the release build, double check that it works, and… oh, no, it’s broken. “PANIC!!!” you might think. Well, luckily you found this blog post. I am going to walk you through the all the steps you [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12995&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>So you have been developing your Cascades app for a while. Everything is working great! You’re ready to just export the release build, double check that it works, and… oh, no, it’s broken.</p>
<p><b>“PANIC!!!” </b>you might think.</p>
<p>Well, luckily you found this blog post. I am going to walk you through the all the steps you need to get this working, so buckle up and sit tight, because the clock is ticking.</p>
<p><strong>Step one:</strong></p>
<p>Add Q_DECL_EXPORT in front of your main method, so it looks like this:</p>
<pre>Q_DECL_EXPORT <b>int</b> <b>main</b>(<b>int</b> argc, <b>char</b> **argv)</pre>
<p><strong>Step two:</strong></p>
<p>Nope, that’s it.</p>
<p>We added that requirement in the Gold SDK and added it to the template then, so if your project was created afterwards it’s already taken care of.</p>
<p>If you are still having problems, make sure you aren&#8217;t writing to the assets directory, as it’s read-only on release builds. If you want to change something there, copy it to the data folder first.</p>
<p>Anyway, the Q_DECL_EXPORT change was part of <a href="http://devblog.blackberry.com/2012/12/cascades-project-zygote/">Project Zygote</a>, so if you are running into this error you might want to go all the way through the process  and get a big start time decrease for your app. Again, apps built with the Gold SDK have already had this done for them. Don’t let those newbies show you up!</p>
<p>Good luck! We’re almost there!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/12995/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/12995/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12995&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2013/01/cascades-release-build-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a3bf8c930434e9f401be449eb7ea556?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulbe1</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting Rolling with the Camera API</title>
		<link>http://devblog.blackberry.com/2012/07/camera-api/</link>
		<comments>http://devblog.blackberry.com/2012/07/camera-api/#comments</comments>
		<pubDate>Fri, 20 Jul 2012 18:19:21 +0000</pubDate>
		<dc:creator>Paul Bernhardt</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 10 Dev Alpha]]></category>
		<category><![CDATA[Camera API]]></category>
		<category><![CDATA[sample codeQML]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=10375</guid>
		<description><![CDATA[Troubleshooting the Camera API in the current beta of BlackBerry 10.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10375&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-10376" title="" src="http://rimdevblog.files.wordpress.com/2012/07/camera.jpg?w=550&#038;h=244" alt="TITLE_IMAGE" width="550" height="244" /></p>
<p>With the release of the BlackBerry® Native SDK Beta 2 comes the Cascades™ Camera API. If you want to see it in action, check out the spiffy Photobomber sample app available in the <a href="https://developer.blackberry.com/cascades/sampleapps/" target="_new">BlackBerry Jam Zone</a> and on <a href="https://github.com/blackberry/Cascades-Samples/tree/master/photobomber" target="_new">GitHub</a>. You can just import it, compile it, install it on your BlackBerry® 10 Dev Alpha and go.</p>
<p>However, there are a couple of set-up gotchas in the current beta you are going to run into if you are just trying to add Camera functionality to your own app. Luckily, they are pretty simple to get past, especially with me here telling you exactly what to do! Let’s quickly run through them.</p>
<p><span id="more-10375"></span></p>
<h3><strong>1. QML Imports</strong></h3>
<p>In your QML file, right underneath the default:</p>
<pre>import bb.cascades 1.0</pre>
<p>you want to also add:</p>
<pre>import bb.cascades.multimedia 1.0</pre>
<p>This will let the QML editor know about the camera components so it doesn’t complain at you.</p>
<h3><strong>2. Include the Camera headers</strong></h3>
<p>This is pretty standard C++ stuff, but don’t forget to also import the headers into your C++ code. In your default app.cpp you will want to import at least this:</p>
<pre>#include &lt;bb/cascades/multimedia/Camera&gt;</pre>
<p>You may also end up needing a few others if you are doing more involved camera work in C++, like this:</p>
<pre>#include &lt;bb/cascades/multimedia/CameraSettings.hpp&gt;</pre>
<pre>#include &lt;bb/cascades/multimedia/CameraTypes.hpp&gt;</pre>
<h3><strong>3. Register the Camera in C++</strong></h3>
<p>In your default app.cpp file, right before the call to:</p>
<pre>	QmlDocument *qml = QmlDocument::create("main.qml");</pre>
<p>Add:</p>
<pre>	bb::cascades::multimedia::Camera::registerQmlTypes();</pre>
<p>If you don’t do this, the Camera components won’t actually get loaded and you’ll get an error. This is also why you imported the Camera header file, if you are doing the rest of the camera work in QML.</p>
<h3><strong>4. Link to the Multimedia Libraries</strong></h3>
<p>Right now the linker isn’t quite set up properly to connect your app to some of the new libraries added in R6. For now, you’ll want to manually open the <code>&lt;appname&gt;.pro </code>file and add the following line:</p>
<pre>LIBS   += -lcamapi -lscreen  -lbbsystem  -lbbcascadesmultimedia –lzxing</pre>
<p>Not all of those are strictly necessary (for example, the zxing library will only be helpful if you want to connect to <a href="http://code.google.com/p/zxing/" target="_New">ZXing</a> to do some custom barcode scanning. We’ll talk about how to do that in a future blog post), but it’s not going to hurt, and the names of the libraries are not terribly discoverable on your own.</p>
<p>You’ll note there is no <code>LIBS</code> line by default in your <code>.pro</code> file. I like to add mine below the <code>CONFIG</code> line, though I’m not sure it really matters.</p>
<h3><strong>5. Done!</strong></h3>
<p>That’s it, you’re all set up! Now you can use the Camera API to your heart’s content. If doing so results in your app taking a lot of pictures, don’t forget you can use the <a href="https://developer.blackberry.com/cascades/reference/bb__system__invokemanager.html" target="_new">Invoke Framework</a> to let your users easily share them. It’s a snap.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/10375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/10375/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10375&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/07/camera-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a3bf8c930434e9f401be449eb7ea556?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulbe1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/07/camera.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>
	</item>
		<item>
		<title>AIR Porting: PlayBook to BlackBerry 10</title>
		<link>http://devblog.blackberry.com/2012/06/adobe-air-porting-blackberry-10/</link>
		<comments>http://devblog.blackberry.com/2012/06/adobe-air-porting-blackberry-10/#comments</comments>
		<pubDate>Thu, 07 Jun 2012 14:01:46 +0000</pubDate>
		<dc:creator>Paul Bernhardt</dc:creator>
				<category><![CDATA[Adobe AIR Development]]></category>
		<category><![CDATA[adobe air]]></category>
		<category><![CDATA[Adobe AIR app]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 10 Dev Alpha]]></category>
		<category><![CDATA[porting]]></category>
		<category><![CDATA[sample app]]></category>
		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=9710</guid>
		<description><![CDATA[Find out how to port your Adobe AIR app to BlackBerry 10 - it's easier than you'd think.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9710&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>With the release of the <a href="https://developer.blackberry.com/air/" target="_new">BlackBerry® 10 Adobe® AIR® SDK Beta</a>, I thought it might be time to go back and see how much work it would be to take the <a href="http://supportforums.blackberry.com/t5/Adobe-AIR-Development/How-to-Skin-QNX-UI-Components-Basic/ta-p/1191329" target="_new">sample app I wrote last year</a> and get it going on a <a href="http://blogs.blackberry.com/2012/05/blackberry-10-dev-alpha/" target="_new">BlackBerry 10 Dev Alpha</a>. I was all set to spend the day coding and tweaking and working on a big long guide. Then I loaded the old build onto my device and&#8230;well, it basically worked already:</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-9713" src="http://rimdevblog.files.wordpress.com/2012/06/air-porting-1.jpg?w=300&#038;h=500" alt="TITLE_IMAGE" width="300" height="500" /></p>
<p><span id="more-9710"></span></p>
<p>Turns out I had locked the app’s orientation, but neglected to actually specify which orientation it should be locked to. On the BlackBerry® PlayBook™ tablet it was fine, since the default was landscape and that’s what I wanted, but the Blackberry 10 Dev Alpha is a portrait device. A quick change to add <code>&lt;aspectRatio&gt;landscape&lt;/aspectRatio&gt;</code> to my app.xml (not even the code!), and I’m done.</p>
<p><img class="aligncenter size-full wp-image-9712" title="" src="http://rimdevblog.files.wordpress.com/2012/06/air-porting-2.jpg?w=600&#038;h=360" alt="" width="600" height="360" /></p>
<p>Since I had specified the dimensions of the SWF in my main action script file, I didn’t even need to change any of the sizes of the menus or anything (though I probably should have just made everything scale dynamically in the first place). Either way, it only took me a couple minutes to sort out, and all I did was fix a legitimate bug. I didn’t even have to use the BlackBerry 10 SDK to compile it, since I wasn’t using any new APIs. So if you already have an Adobe AIR app, you are probably good to go. Congratulations on writing your first app for <a href="http://blogs.blackberry.com/2012/05/blackberry-10-world-keynote/" target="_new">BlackBerry 10</a>!</p>
<p><img class="aligncenter size-full wp-image-9711" title="" src="http://rimdevblog.files.wordpress.com/2012/06/air-porting-3.jpg?w=600&#038;h=360" alt="" width="600" height="360" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/9710/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/9710/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9710&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/06/adobe-air-porting-blackberry-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a3bf8c930434e9f401be449eb7ea556?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulbe1</media:title>
		</media:content>

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

		<media:content url="http://rimdevblog.files.wordpress.com/2012/06/air-porting-2.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2012/06/air-porting-3.jpg" medium="image" />
	</item>
		<item>
		<title>Touching On Touchscreen Functionality</title>
		<link>http://devblog.blackberry.com/2012/02/touchscreen-functionality/</link>
		<comments>http://devblog.blackberry.com/2012/02/touchscreen-functionality/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 15:44:28 +0000</pubDate>
		<dc:creator>Paul Bernhardt</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[ALX]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[builds]]></category>
		<category><![CDATA[functionality]]></category>
		<category><![CDATA[touch-aware]]></category>
		<category><![CDATA[Touchscreen]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=8492</guid>
		<description><![CDATA[Looking at some of the past reasons why a developer might have set up separate builds for touch and non-touch devices, and explaining why a separate approach isn’t necessary today.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=8492&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Recently I was asked how a developer can use an ALX file to make sure that the touch-aware version of their app only gets deployed on touchscreen devices. It occurred to me that a lot of apps are still set up with separate touch and non-touch builds. Certainly there have been good reasons to do that in the past &#8211; but is it still the case today? Let’s take a look at some of the past reasons why a developer might have set up separate builds, and explain why a separate approach isn&#8217;t necessary today.</p>
<h3><strong>Reason #1: Touch isn’t supported in that OS</strong></h3>
<p>When the BlackBerry® Storm™ 9530 smartphone launched with OS 4.7, it was necessary to have a special touch-only version compiled against OS 4.7 in order to take full advantage of the touch functionality. If you were using the standard BlackBerry UI components, an app compiled for an older OS would probably work fine &#8211; but if you wanted to actually capture and use touch events, those methods didn’t even exist until OS 4.7. In this case, not only did it make sense to have a separate touch-only version optimized for the BlackBerry Storm smartphone, it was really the only way to go.</p>
<p>Fast forward a few years, and devices running BlackBerry® Device Software 5.0 and higher are <a href="http://us.blackberry.com/developers/choosingtargetos.jsp" target="_new">93% of the market share worldwide for free apps</a>. With paid apps, it’s up to 97%! Since the touch APIs are present in newer OS versions regardless of whether the device supports touch or not, any app compiled for BlackBerry Device Software version 5.0+ (or really 4.7+) can be made touch-aware.</p>
<p><span id="more-8492"></span></p>
<h3><strong>Reason #2: Touch isn’t supported in that form factor</strong></h3>
<p>Regardless of if it was even possible to make an app touch aware when targeting OS 4.7+, for a while the BlackBerry® Storm™ smartphones and BlackBerry® Storm2™ smartphones were our only touch-enabled devices. They had a totally different form factor and no trackpad. It made a lot of sense to have a separate version of your app to target those devices. Even with the BlackBerry® Torch™ 9800 smartphone, it was likely just a matter of adding trackpad navigation to your BlackBerry Storm build.</p>
<p>But now with the BlackBerry® Bold™ 9900 and 9790 smartphones, builds targeting the standard 4:3 aspect ratio/full QWERTY form factor need to be touch-aware too. Make that touch aware but not reliant, and now you don’t need a non-touch build.</p>
<h3><strong>Reason #3: I want to optimize my UI for Touch-only devices</strong></h3>
<p>This is good. The fact is, devices like the BlackBerry® Curve™ 9380 smartphone and BlackBerry Torch family of smartphones have lots of screen real estate in order for you to make buttons nice and big. It’s totally reasonable to have a different UI for those devices compared to something like the BlackBerry Bold 9900 smartphone, where the user might only want to use touch for certain things.<br />
Do you really need a separate build to do it though? Maybe, but it will be easier in the end if you can avoid or minimize that. For example, if you check the <strong><a href="http://www.blackberry.com/developers/docs/7.0.0api/net/rim/device/api/ui/VirtualKeyboard.html#isSupported()" target="_new">VirtualKeyboard.isSupported()</a></strong> method, a return of <strong>true</strong> would indicate one of the long, touch-based form factors.</p>
<p>What might get you though are resources. If you have different ones you want to deploy to different aspect ratios and you don’t want to just include them all, your only choices are: a) separate builds, or b) downloading them at runtime. Either way, it doesn’t leave much room for a non-touch version.</p>
<h3><strong>Deploying to Touch Only</strong></h3>
<p>In answer to the original question, unlike <a href="http://supportforums.blackberry.com/t5/Testing-and-Deployment/Create-a-single-alx-file-to-install-multiple-versions-of-an/ta-p/445156" target="_new">GPS</a>, you can’t determine whether or not a device is touch capable in an ALX file. But as I’ve said, I don’t think there is much point. What you can do is use the <strong>KeyboardType</strong> property, similar to how you’d use the <strong>VirtualKeyBoard.isSupported()</strong> method in Java™. If it’s “<strong>Virtual</strong>” or “<strong>QWERTYVirtual</strong>” (for the sliders), then you can give it that special build with the different resources. But touch itself is easy to implement and present on many devices, so you may as well take advantage of it.</p>
<p>Got questions about implementing touchscreen functionality? Let me know in the comments.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/8492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/8492/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=8492&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/02/touchscreen-functionality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a3bf8c930434e9f401be449eb7ea556?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulbe1</media:title>
		</media:content>
	</item>
		<item>
		<title>What You Need to Know To Develop for BlackBerry 7 Webinar – June 29, July 7 and July 13</title>
		<link>http://devblog.blackberry.com/2011/06/blackberry-7-webinar/</link>
		<comments>http://devblog.blackberry.com/2011/06/blackberry-7-webinar/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 17:52:21 +0000</pubDate>
		<dc:creator>Paul Bernhardt</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[BlackBerry 7]]></category>
		<category><![CDATA[BlackBerry Bold 9900]]></category>
		<category><![CDATA[BlackBerry Bold 9930]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[webcast]]></category>
		<category><![CDATA[webinar]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=6689</guid>
		<description><![CDATA[Announcing a webinar on June 29th about how to developer for BlackBerry 7.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=6689&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Mark your calendar to attend the BlackBerry® 7 webinar on Wednesday June 29th 2011. You will learn more about how to get your applications ready for the new BlackBerry 7 smartphones (including the BlackBerry® Bold™ 9900 smartphone and BlackBerry® Bold™ 9930 smartphone), what’s new in the BlackBerry 7 release and how to add these features into your application.</p>
<p><strong>Date:</strong> Wednesday, June 29, 2011<br />
<strong>Time:</strong> 2:00 pm ET<br />
<strong>Duration:</strong> 1 hour<br />
<strong>Presenter:</strong> Paul Bernhardt, Application Development Consultant, Research In Motion® (RIM®)</p>
<p>The webcast will cover:</p>
<ul>
<li>How to quickly port your current BlackBerry® platform application to BlackBerry 7 and key considerations when designing your app for the new BlackBerry 7 smartphones</li>
<li>BlackBerry 7 API Overview: Includes new hardware enabled features on BlackBerry 7 devices such as Magnetomer, Near Field Communications, Augmented Reality, OpenGL ES 2.0 as well as APIs that enhance the Super Apps experience</li>
<li>Q&amp;A with RIM application development expert</li>
</ul>
<p>Don’t miss out on this event! You must be registered in order to attend, so <a href="http://webcast.streamlogics.com/audience/index.asp?eventid=99509828" target="_new">register today</a>!</p>
<p><strong>UPDATE:</strong> We have added more convenient times to our BlackBerry 7 webinar schedule for developers who are based out of Europe or Asia.  The details and registration links are below, so sign up today!  You must be registered to attend these events:</p>
<p><strong>EMEA</strong><br />
<strong>Date:</strong> Thursday, July 7, 2011<br />
<strong>Time:</strong> 2:00 pm BST<br />
<strong>Duration:</strong> 1 hour<br />
<strong>Registration:</strong> Sign up <a href="http://webcast.streamlogics.com/audience/index.asp?eventid=73027544" target="_new">here</a> for this webcast<br />
<strong>Presenter:</strong> Paul Bernhardt, Application Development Consultant, Research In Motion (RIM) </p>
<p><strong>AP</strong><br />
<strong>Date:</strong> Wednesday, July 13, 2011<br />
<strong>Time:</strong> 12:00 pm HKT<br />
<strong>Duration:</strong> 1 hour<br />
<strong>Registration:</strong> Sign up <a href="http://webcast.streamlogics.com/audience/index.asp?eventid=19724237" target="_new">here</a> for this webcast<br />
<strong>Presenter:</strong> Paul Bernhardt, Application Development Consultant, Research In Motion (RIM)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/6689/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/6689/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=6689&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2011/06/blackberry-7-webinar/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a3bf8c930434e9f401be449eb7ea556?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulbe1</media:title>
		</media:content>
	</item>
		<item>
		<title>Bringing Barcodes to BlackBerry Applications</title>
		<link>http://devblog.blackberry.com/2010/10/barcode-api/</link>
		<comments>http://devblog.blackberry.com/2010/10/barcode-api/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 19:27:11 +0000</pubDate>
		<dc:creator>Paul Bernhardt</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Platform Services]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[barcode]]></category>
		<category><![CDATA[blackberry 6]]></category>
		<category><![CDATA[qr code]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=2514</guid>
		<description><![CDATA[The Barcode Capture API included with BlackBerry® 6 has the ability for developers to integrate scanning and generating 1D and 2D barcodes inside their app. Find out how!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=2514&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img src="http://rimdevblog.files.wordpress.com/2010/10/barcode-11.jpg?w=546&#038;h=546" alt="" title="" width="546" height="546" class="aligncenter size-full wp-image-2515" /></p>
<p>The Barcode Capture API included with BlackBerry® 6 comes with a nifty new feature: The ability for a third-party developer to integrate scanning and generating 1D and 2D barcodes inside their app.  It’s really easy, too &#8211; take a look at <a href="http://supportforums.blackberry.com/t5/Java-Development/How-to-use-the-Barcode-API/ta-p/574569" target="_new">this article</a> in our Developer Resource Center to see a sample app that will generate QR codes, or scan them and open the URL in the browser.</p>
<p>If you have a device running BlackBerry® 6 you can compile the app and start playing around with it right now! If not, you may have noticed the new version of BlackBerry App World ™ (version 2.0) has a “Scan a Barcode” menu option. It’s nominally used to open links to apps in the App World, but it will do any URL encoded in a QR Code. Try this one:</p>
<p><span id="more-2514"></span></p>
<p><img src="http://rimdevblog.files.wordpress.com/2010/10/barcode-21.jpg?w=546&#038;h=546" alt="" title="" width="546" height="546" class="aligncenter size-full wp-image-2517" /></p>
<p><a href="http://en.wikipedia.org/wiki/QR_Code" target="_new">QR Codes</a>, if you have never encountered them before, are a type of 2D barcode. This is in contrast to a 1D barcode like the UPCs you see on most products. The big advantage of 2D barcodes (and QR codes in particular) is that they are easy to scan with a camera and can contain a lot of information. QR codes can hold up to 4296 alphanumeric characters, leaving you plenty of space for URLs or other bits of text data. 1D codes are more difficult to detect, and must be viewed straight on by the camera. This means that on a BlackBerry® Torch™ 9800 smartphone, you actually have to rotate the device into landscape mode to detect them properly. QR codes use those squares in the corner to make it easy to figure out the proper orientation.</p>
<p><img src="http://rimdevblog.files.wordpress.com/2010/10/barcode-31.jpg?w=546&#038;h=546" alt="" title="" width="546" height="546" class="aligncenter size-full wp-image-2519" /></p>
<p>They are pretty popular in the mobile space, so if you are interested in doing stuff with barcodes, QR codes are probably the one you want. They aren’t the only kind of barcode available to you as a developer, however &#8211; we’ve used the open source <a href="http://code.google.com/p/zxing/" target="_new">ZXing</a> library (pronounced “zebra crossing”) to add support for many different kinds of barcode:</p>
<p><i>2D</i><br />
•	<a href="http://en.wikipedia.org/wiki/QR_codes" target="_new">QR Code</a><br />
•	<a href="http://en.wikipedia.org/wiki/Data_matrix_%28computer%29" target="_new">Data Matrix</a><br />
•	<a href="http://en.wikipedia.org/wiki/PDF417" target="_new">PDF 417</a></p>
<p><i>1D</i><br />
•	<a href="http://en.wikipedia.org/wiki/Universal_Product_Code" target="_new">UPC (A and E)</a><br />
•	<a href="http://en.wikipedia.org/wiki/European_Article_Number" target="_new">EAN (8 and 13)</a><br />
•	<a href="http://en.wikipedia.org/wiki/Code_39" target="_new">Code-39</a><br />
•	<a href="http://en.wikipedia.org/wiki/Code_128" target="_new">Code-128</a><br />
•	<a href="http://en.wikipedia.org/wiki/ITF-14" target="_new">ITF</a></p>
<p>The full list is always in the BarcodeFormat class. Currently, as per the ZXing library, Data Matrix and PDF 417 support is alpha quality. These, along with the ease of reading &#8211; and an already very large mobile presence &#8211; make QR codes the best choice for most applications. As I said, the Barcode API in BlackBerry 6 allows the BlackBerry smartphone to generate a QR code for you, but there are also several websites that will help you do that as well (if you want to print them off, for example) such as <a href="http://zxing.appspot.com/generator/" target="_new">here</a>.</p>
<p><img src="http://rimdevblog.files.wordpress.com/2010/10/barcode-41.jpg?w=546&#038;h=546" alt="" title="" width="546" height="546" class="aligncenter size-full wp-image-2520" /></p>
<p>Finally, you might be interested to know that the com.google.zxing package is actually very powerful, letting you get down into the nitty-gritty barcode data if you want. You can play around with the bit matrix used to generate 2D barcodes, and it also offers a few nifty methods like a <a href="http://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction" target="_new">Reed-Solomon</a> encoder and decoder. </p>
<p><img src="http://rimdevblog.files.wordpress.com/2010/10/barcode-51.jpg?w=546&#038;h=546" alt="" title="" width="546" height="546" class="aligncenter size-full wp-image-2521" /></p>
<p>And don’t forget, even if you don’t need to use QR codes inside your application, with the function already built into BlackBerry App World they are a great way to promote your app. Just make one using your app’s URL in BlackBerry App World, and if a user sees it on a billboard or in a magazine, they can scan it and buy it right away.</p>
<p>Have you had any experience with the Barcode API yet? What did you think of it?</p>
<p><img src="http://rimdevblog.files.wordpress.com/2010/10/barcode-61.jpg?w=546&#038;h=546" alt="" title="" width="546" height="546" class="aligncenter size-full wp-image-2518" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/2514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/2514/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=2514&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2010/10/barcode-api/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a3bf8c930434e9f401be449eb7ea556?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulbe1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2010/10/barcode-11.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2010/10/barcode-21.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2010/10/barcode-31.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2010/10/barcode-41.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2010/10/barcode-51.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2010/10/barcode-61.jpg" medium="image" />
	</item>
	</channel>
</rss>
