<?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; documentation</title>
	<atom:link href="http://devblog.blackberry.com/tag/documentation/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.blackberry.com</link>
	<description></description>
	<lastBuildDate>Tue, 18 Jun 2013 16:50:23 +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; documentation</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>Get Your Invoke On: BlackBerry 10 Invocation Framework</title>
		<link>http://devblog.blackberry.com/2012/08/blackberry-10-invocation-framework/</link>
		<comments>http://devblog.blackberry.com/2012/08/blackberry-10-invocation-framework/#comments</comments>
		<pubDate>Fri, 17 Aug 2012 14:18:52 +0000</pubDate>
		<dc:creator>Shadid</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Native SDK Development]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 10 invocation framework]]></category>
		<category><![CDATA[bound invocation]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[invoke]]></category>
		<category><![CDATA[sample code]]></category>
		<category><![CDATA[target]]></category>
		<category><![CDATA[unbound invocation]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=10749</guid>
		<description><![CDATA[BlackBerry® apps have always been known for their ability to deeply integrate with core applications as well as with other third-party apps. With BlackBerry® 10, we are taking that experience to the next level with our Invocation Framework. It enables one application to request another to perform a specific task. For example, BlackBerry® Messenger (BBM™) [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10749&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>BlackBerry® apps have always been known for their ability to deeply integrate with core applications as well as with other third-party apps. With BlackBerry® 10, we are taking that experience to the next level with our Invocation Framework. It enables one application to request another to perform a specific task. For example, BlackBerry® Messenger (BBM™) may request an app to open a .DOC file that it received in a chat session. But that’s just the tip of the iceberg &#8211; the framework streamlines the communication between apps and provides a consistently smooth and jitter-free user experience.</p>
<p>First and foremost, there are two kinds of invocations – unbound and bound. An unbound invocation is performed when an app does not specify a specific target app that should get invoked, and hence relies on the invocation framework to select the best target. For example, if there are three apps that can open .DOC files, the framework chooses the best one based on its own target selection logic. So, for unbound invocations, the framework provides automatic brokering to find the best-fit targets and also performs target selection to choose the best among the best. This is very powerful because the client application does not need to know any target applications at all, and yet it can discover and invoke them via the invocation framework.</p>
<p><span id="more-10749"></span></p>
<p><img class="aligncenter size-full wp-image-10751" title="" src="http://rimdevblog.files.wordpress.com/2012/08/invocation-framework-1.jpg?w=600&#038;h=422" alt="TITLE_IMAGE" width="600" height="422" /></p>
<p>On the other hand, a bound invocation is performed when the target app is specified by the client application while sending an invocation request. For example, a client app may request that Docs to Go® should be invoked for opening a .doc file. In this case, the invocation framework does not provide any brokering (or target selection) and blindly invokes the specified target app with the request parameters. Extra care must be taken when performing a bound invocation because an app may be sending a request to a target that the target does not understand at all. One thing is clear &#8212; bound invocation assumes that the client knows the target well.</p>
<p><img class="aligncenter size-full wp-image-10750" title="" src="http://rimdevblog.files.wordpress.com/2012/08/invocation-framework-2.jpg?w=600&#038;h=191" alt="" width="600" height="191" /></p>
<p>There are really two ways you can know a target. First, you might have had a conversation with the author of the target app and have an agreement on the invocation request parameters. In return, they have made you aware of their target ID that you can use to perform a bound invocation. Second, you can query the invocation framework with an invocation request to get a list of best-fit targets and programmatically parse their attributes (capabilities) including their target IDs and invoke one programmatically. Note that querying is another way to discover apps without knowing them and is even more powerful and flexible than unbound invocations. As long as you have a valid target ID, you can perform a bound invocation with the appropriate parameters.</p>
<p>So far so good, but how does the invocation framework know about all the target apps? It does because each target app is required to register with the framework if they wish to be considered by the framework. While registering with the framework, targets must specify a target id which alone makes them candidates for bound invocation. However if a target wants to make itself available for unbound invocations or invocation queries, it must define one or more invoke filters. Each filter is a combination of the following attributes.</p>
<ul>
<li>Actions (e.g. bb.action.OPEN) that describes the action it can perform</li>
<li>MIME types (e.g. application/pdf) describing the content type it can perform the action on</li>
<li>URIs (e.g. <a href="http://" rel="nofollow">http://</a>, file://) specifying the protocols it can handle to retrieve the data</li>
<li>EXTs describing the file extensions it can handle if the URI scheme is file://</li>
</ul>
<p>Note that at least one action and one MIME type is mandatory for each filter definition, and if the URI is file://, at least one EXT must be specified. Filters are what really allow the invocation framework to broker between clients and potential targets as well as target selection that lead to successful invocations.</p>
<p>Well, that’s a 30,000 feet overview of the invocation framework but as a developer I know your hands are itching for some real code. The good news is I have that covered &#8212; I have already uploaded a few sample applications on Github that you may find very (very) useful.</p>
<ul>
<li><a href="https://github.com/blackberry/Cascades-Samples/tree/master/invokeclient" target="_new">InvokeClient</a> – An application that demos different ways to invoke and to query for targets</li>
<li><a href="https://github.com/blackberry/Cascades-Community-Samples/tree/master/InvokeTarget1" target="_new">InvokeTarget1</a> – A dummy target app that can be used with InvokeClient</li>
<li><a href="https://github.com/blackberry/Cascades-Community-Samples/tree/master/InvokeTarget2" target="_new">InvokeTarget2</a> – A second dummy target app that can also be used with InvokeClient</li>
</ul>
<p>Samples are great, but so are documentations (if we read them) for a solid understanding. Please refer to our <a href="https://developer.blackberry.com/cascades/documentation/device_platform/invocation/index.html" target="_new">App Integration</a> development guide for a comprehensive guide with code snippets for both invoke clients and targets.</p>
<p>I am more excited than ever before to introduce the invocation framework as part of the <a href="https://developer.blackberry.com/cascades/download" target="_new">BlackBerry 10 Native SDK beta 2</a> and have no doubt that this will help most app developers out there to provide a deeply integrated user experience. Invocation is one of the core aspects of the BlackBerry 10 experience and come launch, it is going to be hard to find an app that does not invoke or get invoked. I will keep everyone posted on new features as we add them to this framework but more importantly, I am all ears to your feedbacks at shaque[at]rim[dot]com, <a href="http://twitter.com/BlackBerryDev" target="_new">@BlackBerryDev</a> and <a href="http://twitter.com/shadidhaque" target="_new">@shadidhaque</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/10749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/10749/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10749&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/08/blackberry-10-invocation-framework/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/08/invocation-framework-1.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/08/invocation-framework-2.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>
		<item>
		<title>The right tool for the right job: Developer microsites get a facelift</title>
		<link>http://devblog.blackberry.com/2012/02/developer-microsites-facelift/</link>
		<comments>http://devblog.blackberry.com/2012/02/developer-microsites-facelift/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 19:58:10 +0000</pubDate>
		<dc:creator>Tim N.</dc:creator>
				<category><![CDATA[Adobe AIR Development]]></category>
		<category><![CDATA[Android Development]]></category>
		<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Java Development]]></category>
		<category><![CDATA[Native SDK Development]]></category>
		<category><![CDATA[Theme Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[make money]]></category>
		<category><![CDATA[microsites]]></category>
		<category><![CDATA[platforms]]></category>
		<category><![CDATA[profit]]></category>
		<category><![CDATA[samples]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=8423</guid>
		<description><![CDATA[Giddy-up! We just launched new microsites to better serve the BlackBerry® developer community and have given BlackBerry Jam Zone a facelift to make it easy to navigate to the tools you want. We wanted to re-build the main page to bring you the answers you’re looking for: How do I make money? What are the [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=8423&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="https://bdsc.webapps.blackberry.com/devzone/platforms" target="_new"><img src="http://rimdevblog.files.wordpress.com/2012/02/developer_microsites.jpg?w=600&#038;h=225" alt="" title="" width="600" height="225" class="aligncenter size-full wp-image-8424" /></a></p>
<p>Giddy-up! We just launched new microsites to better serve the BlackBerry® developer community and have given BlackBerry Jam Zone a facelift to make it easy to navigate to the tools you want.</p>
<p>We wanted to re-build the <a href="https://bdsc.webapps.blackberry.com/devzone/platforms" target="_new">main page</a> to bring you the answers you’re looking for:</p>
<ul>
<li>How do I make money?</li>
<li>What are the development platform options and which one is right for me?</li>
<li>How do I participate in the community and collaborate with others?</li>
</ul>
<p>Now new sites have been introduced for <a href="http://developer.blackberry.com/air" target="_new">Adobe® AIR®</a> and <a href="http://developer.blackberry.com/java" target="_new">BlackBerry Java</a>.  Oh, and a BlackBerry Theme Studio website is on the way as well, so stay tuned&#8230;</p>
<p>Starting back at <a href="http://www.blackberrydevcon.com/americas" target="_new">DevCon Americas</a> we launched <a href="http://developer.blackberry.com/native" target="_new">Native C/C++</a>, <a href="http://developer.blackberry.com/android" target="_new">Android Runtime</a> and <a href="http://developer.blackberry.com/html5" target="_new">HTML5/WebWorks microsites</a> designed to bring a targeted experience for these development audiences.  These were just the beginning steps in updating our online tools to help you build for BlackBerry and PlayBook.</p>
<p>We built these microsites to:</p>
<ul>
<li>Bring all of the documentation, samples, tutorials, downloads and API references into one convenient, integrated location</li>
<li>Ensure that the information is presented and organized in a way that makes sense for the community who is using the technology</li>
<li>Keep it simple!  We’ve been working with the design groups from TAT to create a streamlined design to get you the information you’re looking for FAST!</li>
</ul>
<p>These microsites will continually evolve based on your feedback, what’s important to you, and how you approach developing apps. You’ll see lots of improvements to all of our websites as we continue to focus on getting you the information you want, the way you want it. So, don’t be shy. Let us know what you would like to see.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/8423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/8423/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=8423&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/02/developer-microsites-facelift/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3939390650b170ba28e9bf3c53d397ad?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">timneil1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/02/developer_microsites.jpg" medium="image" />
	</item>
	</channel>
</rss>
