<?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; sample app</title>
	<atom:link href="http://devblog.blackberry.com/tag/sample-app/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.blackberry.com</link>
	<description></description>
	<lastBuildDate>Mon, 17 Jun 2013 23:00:52 +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; sample app</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>Building Compelling 3D Apps using Cascades and OpenGL ES</title>
		<link>http://devblog.blackberry.com/2012/07/cascades-webcast-4/</link>
		<comments>http://devblog.blackberry.com/2012/07/cascades-webcast-4/#comments</comments>
		<pubDate>Tue, 24 Jul 2012 17:12:04 +0000</pubDate>
		<dc:creator>Jayne L</dc:creator>
				<category><![CDATA[Cascades]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[ndk]]></category>
		<category><![CDATA[OpenGL ES]]></category>
		<category><![CDATA[sample app]]></category>
		<category><![CDATA[webcast]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=10358</guid>
		<description><![CDATA[We've got the fourth Cascades webcast coming up soon - register now!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10358&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:center;"><img title="" src="http://rimdevblog.files.wordpress.com/2012/07/cascades-webcast-1.jpg?w=242&#038;h=402" alt="" width="242" height="402" /> <img title="" src="http://rimdevblog.files.wordpress.com/2012/07/cascades-webcast-2.jpg?w=242&#038;h=402" alt="" width="242" height="402" /></p>
<p>If you want to write your own Cascades™ app using OpenGL ES, you can’t miss our webcast on <strong>Building Compelling 3D Apps using Cascades and OpenGL ES</strong>, which will take place on July 31, 2012 at 11am EST.</p>
<p>This fourth Cascades webcast will focus on how to combine Cascades and OpenGL ES to create compelling 3D apps. The techniques discussed were first presented at <a href="http://www.blackberryjamconference.com/" target="_new">BlackBerry® 10 Jam</a> in Orlando by discussing the creation of GoodCitizenCascades, a Cascades version of the NDK sample app Good Citizen (the original version of this sample app will be posted to the Cascades-Community-Samples repository on GitHub soon). The sample app featured best practices for how to properly structure the OpenGL code and link it in with Cascades, how to leverage Actions and the use of NavigatorPanes for multiple panels, and how to process touch events and use them to control a 3D scene rendered in OpenGL using Qt objects and JavaScript®. In the webcast, we will also expand on the original content with more Cascades tips and tricks based on new Cascades features coming in the next BlackBerry 10 beta release, and demonstrate at least one additional sample app demonstrating some of the integration techniques not covered before.</p>
<p><a href="http://www.blackberrydeveloperevents.com/events/webcast/registration/register.html?scoid=1052564617" target="_new">Registration is now open</a>, so get signed up and reserve your seat today!</p>
<h3><strong>Miss the first three webcasts? No problem!</strong></h3>
<p>If you would like to attend the fourth webcast but missed the first three, don’t worry &#8212; they are available on-demand from the <a href="https://developer.blackberry.com/cascades/documentation/videos/index.html" target="_new">Cascades microsite</a>. Feel free to watch these webcasts, follow along with the sample applications demonstration, and code at the same time. You’ll be able to get caught up on all the information needed to take full advantage of the fourth webcast session.</p>
<p>On the topic of videos: if you are unable to attend this fourth session, rest assured that it too will be posted to the Cascades microsite shortly following its presentation, so keep watch of the site for updates.</p>
<p>I am eagerly looking forward to the upcoming webcasts and interacting with you all again!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/10358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/10358/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10358&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/07/cascades-webcast-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/26be54b1524c0cfc3ec4a27e5ef449a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lordy1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/07/cascades-webcast-1.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2012/07/cascades-webcast-2.jpg" medium="image" />
	</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>Be Social – Integrate your apps with Facebook and Twitter</title>
		<link>http://devblog.blackberry.com/2012/06/integrate-apps-with-social/</link>
		<comments>http://devblog.blackberry.com/2012/06/integrate-apps-with-social/#comments</comments>
		<pubDate>Wed, 06 Jun 2012 13:33:03 +0000</pubDate>
		<dc:creator>Shadid</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Java Development]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[BlackBerry 7]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[sample app]]></category>
		<category><![CDATA[social networks]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=9669</guid>
		<description><![CDATA[Find out how to integrate your app with social networks like Facebook and Twitter.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9669&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>One of the unsung heroes of <a href="http://www.blackberry.com/bb7" target="_new">BlackBerry® 7</a> Java SDK is the Send Command Framework. Although the name doesn’t say much, this API lets you seamlessly integrate with existing apps on the device to share data. Thankfully the native <a href="http://appworld.blackberry.com/webstore/content/680/?lang=en" target="_new">Facebook®</a> and <a href="http://appworld.blackberry.com/webstore/content/8160/?lang=en" target="_new">Twitter®</a> apps are two of many!</p>
<p style="text-align:center;"><img src="http://rimdevblog.files.wordpress.com/2012/05/connected-apps-2.jpg?w=270&#038;h=360" alt="TITLE_IMAGE" width="270" height="360" /> <img title="" src="http://rimdevblog.files.wordpress.com/2012/05/connected-apps-3.jpg?w=270" alt="" width="270" /></p>
<p style="text-align:center;"><em><a href="https://github.com/blackberry/Samples-for-Java/tree/master/SocialApp" target="_new">Download the sample app</a></em></p>
<p>So this is it folks &#8212; no more hair-pulling to figure out how to talk to social networks directly. There are already apps for them, so let’s learn how to leverage those apps from ours instead of reinventing it.</p>
<p><span id="more-9669"></span></p>
<p>The first step is to create the data or context we would like to share. This context is simply a JSON object that encapsulates our data. Here is an example:</p>
<p><code>JSONObject context = new JSONObject();<br />
try {<br />
context.put(SendCommandContextKeys.TEXT, "Your Text");<br />
context.put(SendCommandContextKeys.SUBJECT, "Your Text");<br />
// context.put(SendCommandContextKeys.PATH, "file:///.....");<br />
} catch (JSONException e) {<br />
System.out.println(e.toString());<br />
}</code></p>
<p>I intentionally commented out the PATH type data because we cannot use PATH data in a context that also has TEXT or SUBJECT types. But I still wanted to highlight that we can also share a file path (e.g. a photo).</p>
<p>Once we have our data context nicely wrapped up in a JSONObject, we need to create SendCommand objects that point to specific apps with a specific context. So how do we get these SendCommands? Easy peasy &#8212; we simply query the Send Command Framework with our context data. Here’s how:</p>
<p><code>SendCommand[] commandsAll =<br />
SendCommandRepository.getInstance().get(SendCommand.TYPE_TEXT, context, true);</code></p>
<p>Notice that the 3rd parameter above is a Boolean. If true, the query returns all commands regardless if their associated applications can be opened; if false, it returns only commands whose associated applications can be opened. Ideally we would set it to false; however, in this post we will see how we can get them all and filter them in our own application logic.</p>
<p>Each SendCommand object has an ID that uniquely identifies the target app and the context. Note that the IDs are not documented as there could be so many of them, but it is fairly easy to figure them out by experimentation. Since our target is the Facebook app and the Twitter app, let me save you the work by telling you what their IDs are.</p>
<p><img class="aligncenter size-full wp-image-9672" title="" src="http://rimdevblog.files.wordpress.com/2012/05/connected-apps-1.jpg?w=550&#038;h=130" alt="" width="550" height="130" /></p>
<p>Now let’s filter:</p>
<p><code>for (int i = 0; i &lt; commandsAll.length; i++) {<br />
if (commandsAll[i].getId().equals("Twitter_text")) {<br />
commands[0] = commandsAll[i];<br />
}<br />
if (commandsAll[i].getId().equals("Facebook_text")) {<br />
commands[1] = commandsAll[i];<br />
}<br />
}</code></p>
<p>&#8230;and we are done. We have our SendCommand objects and we are free to call their run() method anywhere in our app. Be it a Button click or a Menu selection, knock yourself out!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/9669/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/9669/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9669&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/06/integrate-apps-with-social/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/25ee80c29143f159bad70d24df820bc1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shadidhaque</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/connected-apps-2.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/connected-apps-3.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/connected-apps-1.jpg" medium="image" />
	</item>
	</channel>
</rss>
