<?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; BlackBerry Java</title>
	<atom:link href="http://devblog.blackberry.com/tag/blackberry-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.blackberry.com</link>
	<description></description>
	<lastBuildDate>Wed, 19 Jun 2013 18:00:36 +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; BlackBerry Java</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>Payment Service SDK v1.8 for BlackBerry Java has been released!</title>
		<link>http://devblog.blackberry.com/2012/05/payment-service-sdk-new-release/</link>
		<comments>http://devblog.blackberry.com/2012/05/payment-service-sdk-new-release/#comments</comments>
		<pubDate>Mon, 07 May 2012 18:54:49 +0000</pubDate>
		<dc:creator>garett</dc:creator>
				<category><![CDATA[Java Development]]></category>
		<category><![CDATA[BlackBerry Java]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Payment Service SDK]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=8728</guid>
		<description><![CDATA[Payment Service SDK version 1.8  is now available for download, and is specifically for BlackBerry Java development.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=8728&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I am pleased to announce that the Payment Service SDK version 1.8 (“Version 1.8”) is now <a href="https://bdsc.webapps.blackberry.com/devzone/appworld/payment">available for download</a>. This update is specifically for BlackBerry® Java® development and adds three new features:</p>
<ol>
<li>Asynchronous Retrieval of Purchase History</li>
<li>The DigitalGood Class</li>
<li>Asynchronous Retrieval of Digital Goods Available for Purchase</li>
</ol>
<h3><strong>Asynchronous Retrieval of Purchase History</strong></h3>
<p>In the previous Payment Service SDK version 1.5 (Version 1.5), only synchronous retrieval of purchase history was possible. This meant that when retrieval was occurring, the user interface would be unusable &#8211; a busy indicator would be displayed. This was acceptable for some situations but it could really impede usability of the application. With Version 1.8, you can now program your application to perform this pull request asynchronously using the following line of code:</p>
<p><span id="more-8728"></span></p>
<pre><code>PurchaseHistory.get(PurchaseHistoryListingListener purchaseHistoryListingListener);</code></pre>
<p>The PurchaseHistoryListingListener interface has only 2 methods:</p>
<pre><code>PurchaseHistoryListingListener(){</code>
public void error(String message, int errorCode) {
}
public void success(Purchase[] goods) {
 }
};</pre>
<p>The huge benefit here is that it is very easy to retrieve the purchase history of a user in the background without causing any impact to the user interface.</p>
<h3><strong>The DigitalGood Class</strong></h3>
<p>In Version 1.5, digital goods existed only in the BlackBerry App World™ storefront client. There are no actual classes in the Payment Service SDK to encapsulate what a digital good object actually is. Version 1.8 adds a DigitalGood class to do just this. The new DigitalGood class allows the application to retrieve information about the goods hosted on BlackBerry App World available for purchase by the user, where the Purchase class previously used only provides information about the actual purchase. The big benefit of this class: a developer can add new items to the Vendor Portal without needing to release a new version of their application. This new addition is also greeted with a way to retrieve all available digital goods asynchronously (continued in the next section).</p>
<h3><strong>Asynchronous Retrieval of Digital Goods Available for Purchase</strong></h3>
<p>The method to retrieve a list of digital goods available for purchase by the user is very similar to that used above to retrieve the PurchaseHistory. First, call the DigitalGoods#get() method passing in your DigitalGoodsListingListener:</p>
<pre><code>DigitalGoods.get(DigitalGoodsListingListener digitalGoodsListingListener);</code></pre>
<p>In your DigitalGoodsListingListener implement the 2 defined methods:</p>
<pre><code>DigitalGoodsListingListener(){</code>
public void error(String message, int errorCode) {
}
public void success(DigitalGood[] goods) {
}
};</pre>
<p>This is virtually identical to the PurchaseHistoryListingListener implementation; however, the <code>success()</code> method receives an array of DigitalGood objects as opposed to Purchase.</p>
<p>The above three new features are easy to implement and should help simplify the development logic as well as improve the overall user experience of your application. You can find the new Payment Service SDK version 1.8 <a href="https://bdsc.webapps.blackberry.com/devzone/appworld/payment">available for download here</a>. The download includes full JavaDocs, and additional documentation (developer’s guide, release notes) can be viewed <a href="http://docs.blackberry.com/en/developers/subcategories/?userType=21&amp;category=Payment+Service" target="_new">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/8728/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/8728/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=8728&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/05/payment-service-sdk-new-release/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>
	</item>
	</channel>
</rss>
