<?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; application</title>
	<atom:link href="http://devblog.blackberry.com/tag/application/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.blackberry.com</link>
	<description></description>
	<lastBuildDate>Fri, 17 May 2013 17:47:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='devblog.blackberry.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/9ef0a66c09615fa946c4179662398878?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>BlackBerry Developer Blog &#187; application</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>Using the Invocation Framework from ActionScript</title>
		<link>http://devblog.blackberry.com/2012/07/using-the-invocation-framework-from-actionscript-2/</link>
		<comments>http://devblog.blackberry.com/2012/07/using-the-invocation-framework-from-actionscript-2/#comments</comments>
		<pubDate>Thu, 19 Jul 2012 13:11:44 +0000</pubDate>
		<dc:creator>Tim N.</dc:creator>
				<category><![CDATA[Adobe AIR Development]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[adobe air]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 10 SDK]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[invoke]]></category>
		<category><![CDATA[Invoke Framework]]></category>
		<category><![CDATA[invoking]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=10243</guid>
		<description><![CDATA[Examining the Invocation Framework included in the Beta 2 of the BlackBerry 10 SDK for Adobe AIR.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10243&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-10268" title="" src="http://rimdevblog.files.wordpress.com/2012/07/air-invoke.jpg?w=310&#038;h=197" alt="TITLE_IMAGE" width="310" height="197" /></p>
<p>Beta 2 of the BlackBerry® 10 SDK for Adobe® AIR® now has support for participating in the BlackBerry 10 Invoke Framework. You can find all of the APIs in the QNXDevice.ane and they are all documented.</p>
<h3><strong>Invoking a Application</strong></h3>
<p>By leveraging the Invoke API, you can invoke virtually any other application on the BlackBerry® smartphone through some simple API call, where you’ll set a parameter for the app you want to invoke and then pass in any parameters that application is expecting. A typical example would be that your application can invoke the BlackBerry® Maps application when it comes across an address. <code>InvokeManager.invoke()</code> will invoke an application.</p>
<p>When the application has been successfully invoked, an <code>InvokeEvent.INVOKE_TARGET</code> event will be dispatched. If there was an error invoking the target, an <code>ErrorEvent.ERROR</code> event will be dispatched. Please refer to the following <a href="http://supportforums.blackberry.com/t5/Test-Article-and-Discussion/Invocation-APIs-fail-when-using-the-BlackBerry-10-Dev-Alpha/ta-p/1819139/">Knowledge Base article</a> for details on some known issues which will be addressed in an upcoming patch.</p>
<p><span id="more-10243"></span></p>
<h3><strong>Invoking a Viewer</strong></h3>
<p><code>InvokeManager.invokeViewer()</code> will invoke a viewer. A Viewer class is returned and is used to communicate with the viewer.</p>
<p>Let’s say you have an image viewer application and you want to invoke it from the main application you’re working on. In the main application, you want to pass the image file that the imager viewer app will open when invoked.</p>
<p>Below is a sample of how you can invoke a viewer and wait for it to be created. This example assumes that you have created the <code>viewerRequest</code> object with the correct data for your viewer.</p>
<pre>var viewer:Viewer = InvokeManager.invokeManager.invokeViewer( viewerRequest );
viewer.addEventListener( ViewerEvent.VIEWER_CREATED, viewerCreated );

private function viewerCreated( event:ViewerEvent ):void
{
   //viewer is created and ready to communicate with.
}</pre>
<h3><strong>Making your Application an Invoke Handler</strong></h3>
<p>If you are developing an application that can be invoked by another application, you will want to add a listener for the invoke event at the very start of your application. These should be the first lines of your application.<br />
Once you have received the invoke event, you can check the startup mode and get the data that you were invoked with.<br />
Below is a sample of how you would accomplish this:</p>
<pre>InvokeManager.invokeManager.addEventListener(InvokeEvent.INVOKE, onInvoked );
private function onInvoked( event:InvokeEvent ):void
{
    if( InvokeManager.invokeManager.startupMode == InvokeStartupMode.INVOKE )
    {
        var invokeRequest:InvokeRequest = InvokeManager.invokeManager.startupRequest;
    }
    else if( InvokeManager.invokeManager.startupMode == InvokeStartupMode.VIEWER )
    {
        var viewerRequest:InvokeViewerRequest = InvokeManager.invokeManager.startupViewerRequest;
    }
}</pre>
<h3><strong>Query a list of targets</strong></h3>
<p>You can also query a list of targets or viewers on the device by calling the <code>InvokeManager.queryTargets()</code> method. At some point in the future, this will make a pop-up list in your application that will allow users to select items from the list. For now, it returns the results and it is up to you to use those values in your <code>invoke()</code> and <code>invokeViewer()</code> calls.</p>
<h3><strong>InvokeEvent</strong></h3>
<p>No matter how your application is started, you will receive an InvokeEvent dispatched by the InvokeManager. In order to determine how your app was started, you can check the <code>InvokeManager.startupMode</code> in your InvokeEvent handler. So, your application would look something like the following, assuming that your application can be launched as a target and a viewer:</p>
<pre>package
{
    import qnx.events.InvokeEvent;
    import qnx.invoke.*;

    public class Main extends Sprite
    {

        public function Main()
        {
            //NOTE: THIS MUST BE THE FIRST THING SET IN YOUR APPLICATION CONSTRUCTOR
            InvokeManager.invokeManager.addEventListener(InvokeEvent.INVOKE, onInvoke );
        }

        private function onInvoke( event:InvokeEvent ):void
        {
            if( InvokeManager.invokeManager.startupMode == InvokeStartupMode.INVOKE )
            {
                //invoked as an application/target.
                var data:InvokeRequest = InvokeManager.invokeManager.startupRequest;
            }
            else if( InvokeManager.invokeManager.startupMode == InvokeStartupMode.VIEWER )
            {
                //invoked as a viewer
                var data:InvokeViewerRequest = InvokeManager.invokeManager.startupViewerRequest;
            }
            else
            {
                //launched by the pressing on the icon on the home screen.
            }
        }
    }
}</pre>
<h3><strong>Closing a Viewer</strong></h3>
<p>There are two different ways a viewer can be closed:</p>
<ol>
<li>From the application</li>
<li>From the viewer</li>
</ol>
<p>When an application wishes to close a viewer that it has created, it can simply call the <code>Viewer.dispose()</code> method. This will cause the viewer to be removed immediately.</p>
<p>A viewer can request to be closed by the application and should never actually attempt to close itself directly. Viewers can call the <code>InvokeManager.requestViewerClose()</code> method. This will send a message to the application requesting that it be closed. The Viewer instance in the application will dispatch a <code>ViewerEvent.VIEWER_CLOSE_REQUEST</code> event. When application receives this event, it should call the <code>dispose()</code> method on the viewer to close it. The reason this doesn’t happen automatically is so that applications can transition viewers out before removing them. We may make this a bit more automated in the future, and we’ll let you know when this happens.</p>
<h3><strong>Viewer message relay</strong></h3>
<p>Viewers can send data to applications using the <code>InvokeManager.viewerSendMessage()</code> method. The Viewer instance will then dispatch <code>ViewerEvent.VIEWER_MESSAGE</code> events with the message and data properties set to what was passed into the <code>viewerSendMessage()</code>. Here is an example of how you would use this:</p>
<h3><strong>Viewer code</strong></h3>
<pre>InvokeManager.invokeManager.viewerSendMessage( "select", {name:"Fred"});</pre>
<h3><strong>App Code</strong></h3>
<pre>__currentViewer = InvokeManager.invokeManager.invokeViewer(viewerRequest);
__currentViewer.addEventListener( ViewerEvent.VIEWER_MESSAGE, onMessage );

private function onMessage( e:ViewerEvent ):void
{
    trace( e.message, e.data ); //outputs "select Fred";
}</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/10243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/10243/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10243&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/07/using-the-invocation-framework-from-actionscript-2/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/07/air-invoke.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>
	</item>
		<item>
		<title>BlackBerry Developer Webinar: Mobile Design Considerations</title>
		<link>http://devblog.blackberry.com/2009/10/blackberry-developer-webinar-mobile-design-considerations/</link>
		<comments>http://devblog.blackberry.com/2009/10/blackberry-developer-webinar-mobile-design-considerations/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 11:35:32 +0000</pubDate>
		<dc:creator>Mike Kirkup</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Java Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JDE]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Toolkit]]></category>
		<category><![CDATA[webinar]]></category>

		<guid isPermaLink="false">http://blackberrydev.edstaging.com/?p=271</guid>
		<description><![CDATA[Building on the momentum of our extremely successful Web Development and Toolkits webinar , we will be hosting our second ever developer webinar on Tuesday, October 20th, addressing mobile design considerations for application development. Read on for a more detailed overview of this live and free webinar. Presenter: Sarim Aziz, Senior Application Development Consultant, Developer Relations Panelists: Mike Kirkup, [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=271&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img src="http://rimdevblog.files.wordpress.com/2009/10/original25.jpg?w=500&#038;h=300" alt="" title="BlackBerry Developer Webinar: Mobile Design Considerations" width="500" height="300" class="aligncenter size-full wp-image-5845" /></p>
<p>Building on the momentum of our extremely successful <a rel="nofollow" href="http://supportforums.blackberry.com/t5/BlackBerry-Developer-s-Blog/BlackBerry-Developers-Webinar-Web-Development-and-Toolkits/ba-p/325108" target="_self">Web Development</a> and <a rel="nofollow" href="http://supportforums.blackberry.com/t5/BlackBerry-Developer-s-Blog/BlackBerry-Developers-Webinar-Follow-Up/ba-p/332288" target="_self">Toolkits webinar</a> , we will be hosting our second ever <strong>developer webinar on Tuesday, October 20th, addressing mobile design considerations for application development. </strong>Read on for a more detailed overview of this <strong>live and free webinar</strong>.</p>
<p><strong>Presenter:</strong> Sarim Aziz, Senior Application Development Consultant, Developer Relations<br />
<strong>Panelists:</strong> Mike Kirkup, Director, Developer Relations<br />
<strong>Date:</strong> Tuesday October 20, 2009.<br />
<strong>Time:</strong> 2:00 pm – 3:00 pm EST.<span id="more-271"></span></p>
<p><strong>Overview: </strong><br />
Join us in an online discussion for BlackBerry Java developers which will help you better understand mobile application design considerations through a review of best practices and real world examples.</p>
<p>We&#8217;ll help you address design considerations specific to mobile applications, from Network Communication and User Interface, to Data and Memory management. We&#8217;ll also take a look at how you can leverage the <a rel="nofollow" href="http://na.blackberry.com/eng/developers/javaappdev/" target="_self">BlackBerry Java Development Tools</a> for debugging and optimizing your BlackBerry applications.</p>
<p>After the information presentation, developers will have an opportunity to interact with BlackBerry experts in a real time Q&amp;A session. What are you waiting for? Click on the link below for registration information!</p>
<p><a rel="nofollow" href="http://e.blackberry.com/servlet/cc6?jpuKuQDSQqTVVaVWB" target="_self">BlackBerry Developer Webinar: BlackBerry Java Development Tools</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/271/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=271&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2009/10/blackberry-developer-webinar-mobile-design-considerations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/df3fbb85b0186198b2f85e7cd3f0bf1a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mikekir1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2009/10/original25.jpg" medium="image">
			<media:title type="html">BlackBerry Developer Webinar: Mobile Design Considerations</media:title>
		</media:content>
	</item>
	</channel>
</rss>
