<?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; applications</title>
	<atom:link href="http://devblog.blackberry.com/tag/applications/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.blackberry.com</link>
	<description></description>
	<lastBuildDate>Wed, 19 Jun 2013 14:01:11 +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; applications</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>Click To Start Your BlackBerry 10 Cascades Apps In No Time Flat With Zygote</title>
		<link>http://devblog.blackberry.com/2012/12/cascades-project-zygote/</link>
		<comments>http://devblog.blackberry.com/2012/12/cascades-project-zygote/#comments</comments>
		<pubDate>Wed, 05 Dec 2012 14:52:11 +0000</pubDate>
		<dc:creator>Alex Kinsella</dc:creator>
				<category><![CDATA[Cascades]]></category>
		<category><![CDATA[Native SDK Development]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 10 apps]]></category>
		<category><![CDATA[fast startup]]></category>
		<category><![CDATA[QML]]></category>
		<category><![CDATA[qt]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=12482</guid>
		<description><![CDATA[Guest post from Roberto S. &#8211; Ed. Since the introduction of Cascades in May, developers have been asking us one question: Is there something I can do to make my app start faster? Cascades is a marvelous piece of technology, but like any new technology, it takes time to work out the kinks and optimize [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12482&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:center;"><img class="aligncenter  wp-image-12539" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2012/12/devblog-cascades-cookbook.png?w=612&#038;h=351" height="351" width="612" /></p>
<p><i>Guest post from Roberto S. &#8211; Ed.</i></p>
<p>Since the introduction of Cascades in May, developers have been asking us one question: Is there something I can do to make my app start faster? Cascades is a marvelous piece of technology, but like any new technology, it takes time to work out the kinks and optimize performance. It took a while, but the Cascades team figured out a way to make it faster. Let me introduce you to Project Zygote.</p>
<p>When a detailed performance analysis was conducted on a Cascades application while it was starting up, it was discovered that loading shared libraries was taking up the majority of time. Cascades uses a number of different Qt and platform-specific libraries, so this made sense. After some investigation, we learned that you can save a lot of time by pre-compiling these shared libraries into one library that could be pre-loaded. Thus, Project Zygote was born.</p>
<p>How do you get in on the party? With this latest beta release of BlackBerry 10, all new Cascades projects will have Zygote enabled by default. You get it for free!</p>
<p>For those with pre-existing projects, there are some minor changes you need to make to your existing projects to enable Zygote for your release target. A little bit of work that goes a long way!</p>
<p>Let’s start by looking at the original project file for the Cascades Cookbook sample app:</p>
<p><span id="more-12482"></span></p>
<pre>TEMPLATE = app
TARGET = cascadescookbookqml

CONFIG += qt warn_on debug_and_release cascades

INCLUDEPATH += ../src
SOURCES += ../src/*.cpp 
HEADERS += ../src/*.h 

device {
	CONFIG(release, debug|release) {		
		DESTDIR = o.le-v7		
	} 
	CONFIG(debug, debug|release) {
		DESTDIR = o.le-v7-g
	}
}

simulator {
	CONFIG(release, debug|release) {
		DESTDIR = o
	} 
	CONFIG(debug, debug|release) {
		DESTDIR = o-g
	}
}

OBJECTS_DIR = $${DESTDIR}/.obj
MOC_DIR = $${DESTDIR}/.moc
RCC_DIR = $${DESTDIR}/.rcc
UI_DIR = $${DESTDIR}/.ui</pre>
<p>As mentioned earlier, Zygote is configured primarily for release targets. The reason behind this is that the differences in packaging make it difficult for developers to debug applications built in this way. The first step to upgrading the project configuration is to add a template override from app to lib in the device-release configuration section:</p>
<pre>TEMPLATE = app
TARGET = cascadescookbookqml

CONFIG += qt warn_on debug_and_release cascades10

INCLUDEPATH += ../src
SOURCES += ../src/*.cpp 
HEADERS += ../src/*.h 

device {
	CONFIG(release, debug|release) {		
		DESTDIR = o.le-v7
TEMPLATE=lib
QMAKE_CXXFLAGS += -fvisibility=hidden
	} 
	CONFIG(debug, debug|release) {
		DESTDIR = o.le-v7-g
	}
}

simulator {
	CONFIG(release, debug|release) {
		DESTDIR = o
	} 
	CONFIG(debug, debug|release) {
		DESTDIR = o-g
	}
}

OBJECTS_DIR = $${DESTDIR}/.obj
MOC_DIR = $${DESTDIR}/.moc
RCC_DIR = $${DESTDIR}/.rcc
UI_DIR = $${DESTDIR}/.ui</pre>
<p>These changes switch the target from an executable to a library and hide the symbols to minimize the size.</p>
<p>The next thing that needs to change is the main.cpp file. Change the main() declaration as follows:</p>
<pre>Q_DECL_EXPORT int main(int argc, char **argv)</pre>
<p>The last step is to update the bar.descriptor.xml file as follows:</p>
<pre>    &lt;configuration id="com.qnx.qcc.toolChain.1485069140" name="Device-Debug"&gt;
       &lt;platformArchitecture&gt;armle-v7&lt;/platformArchitecture&gt;
       &lt;asset path="arm/o.le-v7-g/cascadescookbookqml" entry="true" type="Qnx/Elf"&gt;cascadescookbookqml&lt;/asset&gt;
    &lt;/configuration&gt;
    &lt;configuration id="com.qnx.qcc.toolChain.1120265426" name="Device-Release"&gt;
       &lt;platformArchitecture&gt;armle-v7&lt;/platformArchitecture&gt;
       &lt;asset path="arm/o.le-v7/cascadescookbookqml" entry="true" type="Qnx/Elf"&gt;cascadescookbookqml&lt;/asset&gt;
    &lt;/configuration&gt;</pre>
<p>Changes to:</p>
<pre>    &lt;configuration id="com.qnx.qcc.toolChain.1485069140" name="Device-Debug"&gt;
       &lt;platformArchitecture&gt;armle-v7&lt;/platformArchitecture&gt;
       &lt;asset path="arm/o.le-v7-g/cascadescookbookqml " entry="true" type="Qnx/Elf"&gt;HelloPhone&lt;/asset&gt;
    &lt;/configuration&gt;
    &lt;configuration id="com.qnx.qcc.toolChain.1120265426" name="Device-Release"&gt;
       &lt;entryPointType&gt;Qnx/Cascades&lt;/entryPointType&gt;
       &lt;platformArchitecture&gt;armle-v7&lt;/platformArchitecture&gt;
       &lt;asset path="arm/o.le-v7/cascadescookbookqml.so" entry="true" type="Qnx/Elf"&gt;libcascadescookbookqml.so&lt;/asset&gt;
    &lt;/configuration&gt;</pre>
<p>After making these changes, export your project to a zip file. If you haven’t already done so, create a new workspace. Import the project into the new workspace, change the active build to Device-Release, and clean and rebuild the project. You should have a Cascades Cookbook sample app that starts up faster! My testing showed a reduction in start time from 1.96 seconds to 0.68 seconds. Feel free to convert all of your Cascades apps and spread the word!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/12482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/12482/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12482&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/12/cascades-project-zygote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7d0e94a7e96e80d5911732d43f31a39c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Alex K.</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/12/devblog-cascades-cookbook.png" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>
	</item>
		<item>
		<title>Maps. They Don’t Love You Like I Love You.</title>
		<link>http://devblog.blackberry.com/2012/12/blackberry-webworks-maps/</link>
		<comments>http://devblog.blackberry.com/2012/12/blackberry-webworks-maps/#comments</comments>
		<pubDate>Tue, 04 Dec 2012 15:17:42 +0000</pubDate>
		<dc:creator>chadtatro</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WebWorks]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[Bing Maps]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[Leaflet]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[OpenLayers]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[webworks]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=12521</guid>
		<description><![CDATA[Forget everything you know about working with maps and BlackBerry WebWorks. Mapping just got real, real easy! We heard you ask for an easy way to integrate mapping services with your BlackBerry WebWorks applications, and today I’m happy to announce that on BlackBerry 10, the process has become much simpler. We&#8217;ve put together a straight-forward sample [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12521&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-12522" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2012/12/webworks-maps.jpg?w=600&#038;h=364" height="364" width="600" /></p>
<p>Forget everything you know about working with maps and BlackBerry WebWorks. Mapping just got real, real easy!</p>
<p>We heard you ask for an easy way to integrate mapping services with your BlackBerry WebWorks applications, and today I’m happy to announce that on BlackBerry 10, the process has become much simpler.</p>
<p>We&#8217;ve put together a straight-forward sample application that will show you how to integrate with a few of the services out there:  Google Maps, Bing, Leaflet, and OpenLayers.</p>
<p>If you&#8217;ve been following the progression of the BlackBerry WebWorks framework, you&#8217;ve probably noticed an awesome amount of transparency. Open web standards are lovingly embraced and adopted here at RIM. Even the framework itself is staged publicly on GitHub.  Continuing this theme of openness and following web standards, the maps samples we&#8217;ve released are not platform specific.  Whether you’re writing an exclusive BlackBerry app, or planning on targeting multiple platforms using Cordova (previously known as PhoneGap), these samples are most definitely for you!</p>
<p><span id="more-12521"></span></p>
<p>For each service, you’ll be able to learn how to:</p>
<p>-          Setup a mapping service to use to in your app</p>
<p>-          Find the users location with HTML5 Geolocation</p>
<p>-          Perform a search for nearby points of interest</p>
<p>-          Display push-pins on the map, showing the search results.</p>
<p>The goal of this sample is to show you how you can quickly integrate maps into your app and have it perform great in WebWorks for BlackBerry 10.</p>
<p>When it comes down to picking which service is right for your app, it’s completely up to you.  One of my teammates, Jim Ing, wrote a really in-depth article on maps, comparing services and much more.  I strongly recommend checking it out “<a href="http://devblog.blackberry.com/2012/05/lightweight-maps-for-mobile-part-1/" target="_blank">Lightweight Maps For Mobile</a>”.</p>
<p><b>Check out the sample, in action!</b></p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='640' height='390' src='http://www.youtube.com/embed/lSn3rex7PCI?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p><b>Download the source code.</b></p>
<p>Ready to add some maps to your app? Download the source code from <a href="https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/Maps" target="_blank">our GitHub repository</a>!</p>
<p><b>Calling all Native developers!</b></p>
<p>Have you been yearning to contribute to the BlackBerry 10 cause but weren’t sure how?  Why not take this WebWorks sample, and build a Native version?!  If you’re interested, get in touch with Shadid Haque (<a href="http://twitter.com/ShadidHaque" target="_blank">@ShadidHaque</a>) on Twitter.</p>
<p>If you&#8217;ve got a success story, have a question, or just want to chat about apps, hit me up on Twitter <a href="http://www.twitter.com/chadtatro" target="_blank">@chadtatro</a>!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/12521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/12521/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=12521&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/12/blackberry-webworks-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb86e7b2b71616806266b535686102c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ctetreault1980</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/12/webworks-maps.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>
	</item>
		<item>
		<title>Application Resource Monitor added to BlackBerry 7.1</title>
		<link>http://devblog.blackberry.com/2012/05/application-resource-monitor/</link>
		<comments>http://devblog.blackberry.com/2012/05/application-resource-monitor/#comments</comments>
		<pubDate>Thu, 31 May 2012 15:33:37 +0000</pubDate>
		<dc:creator>MSohm</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Application Resource Monitor]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[battery depletion]]></category>
		<category><![CDATA[battery saving]]></category>
		<category><![CDATA[BlackBerry 7.1]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[shutdown]]></category>
		<category><![CDATA[system resources]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=9605</guid>
		<description><![CDATA[Learn about BlackBerry 7.1's Application Resource Monitor and how to work with it.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9605&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Upcoming versions of BlackBerry® Device Software version 7.1.0.x introduce a new service that monitors BlackBerry® applications for system resource abuse, which could cause accelerated battery depletion.  This service is called Application Resource Monitor.  An optional feature (enabled by default) is available to automatically shutdown background battery draining applications.</p>
<p><img src="http://rimdevblog.files.wordpress.com/2012/05/resource-monitor-1.jpg?w=166&#038;h=500" alt="" title="" width="166" height="500" class="aligncenter size-full wp-image-9608" /></p>
<p style="text-align:center;"><i>Image By Civilspanaren (Own work) [Public domain], via Wikimedia Commons</i></p>
<h3><strong>What It Does</strong></h3>
<p>BlackBerry Application Resource Monitor monitors applications when they are in the background (with the screen on or off) and when in the foreground when the screen is off. When the app is in one of these two states, it looks for excessive background wakeups (any sort of timers firing including rapid/constant repaints) and high CPU utilization.</p>
<p><span id="more-9605"></span></p>
<p>When efficient applications are in these two states, they should not be consuming an excessive amount of CPU or exhibiting any sort of timer abuse.  When the problematic application is identified, an alert may be presented to the user. If “Automatically shutdown background draining applications” is enabled, the user is alerted and the application is shut down. If it is disabled, the user is alerted and they have the ability to close the app from within the notification.  The ability to automatically shut down background-draining applications can be enabled and disabled within the Application Resource Monitor options access on a BlackBerry® smartphone by going to Options -&gt; Device &gt; Application Resource Monitor.  The default setting is for it to be enabled.</p>
<p>Applications can also be whitelisted so that they are not shut down by Application Resource Monitor.  To whitelist an application, users need to first receive an alert. If the ability to automatically shut down background-draining applications is disabled, they are simply alerted about the problematic application. They can acknowledge the alert (OK), whitelist the app (Ignore Future Alerts) or choose to manually shutdown the app (Kill it Themselves). If it is enabled, the application will be shut down and an alert presented to the user. The user can then open the alert to acknowledge and dismiss it, or whitelist the application to ignore this application going forward.  To remove items from the whitelist, users can go to Options &gt; Device &gt; Application Resource Monitor.</p>
<h3><strong>How to Avoid Being Shut Down</strong></h3>
<p>You can prevent your application from being shut down by Application Resource Monitor by detecting and adapting to the state changes described above.  If we use the example of a game, you can put your game into a paused state where it is not making any game play calculations for things like physics or artificial intelligence, and so it is not refreshing the screen when the game has moved to the background or when the screen has turned off.</p>
<h3><strong>Detect Moving to the Background</strong></h3>
<p>There are two ways to detect that your application is no longer in the foreground.  <a href="http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/Application.html#deactivate()" target="_new">Application.deactivate()</a> is called when an application is moved to the background, and  <a href="http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/Application.html#activate()" target="_new">Application.activate()</a> is called when the application moves to the foreground.  Override both of these methods to detect the backgrounding and foregrounding events.</p>
<p>An application screen can override the <a href="http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/ui/Screen.html#onObscured()" target="_new">Screen.onObscured()</a> method to be notified when another screen appears on top of it, which may or may not be another application.  This method is fired when the menu appears or if a dialog from your application is shown, which could be another point where you would want to pause your game.  <a href="http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/ui/Screen.html#onExposed()" target="_new">Screen.onExposed()</a> is the matching method that is fired when screens on top of your application have been removed and your screen moves to the top-most position on the screen stack.</p>
<h3><strong>Detect the Screen Turning Off and On</strong></h3>
<p>There are also two ways to detect the BlackBerry device screen turning on or off.  You can use the <a href="http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/SystemListener2.html#backlightStateChange(boolean)" target="_new">SystemListener2.backlightStateChange(boolean on)</a> interface to be notified when the screen turns on or off.  The <a href="http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/Backlight.html#isEnabled()" target="_new">Backlight.enabled()</a> method can be used to poll for the current state of the screen.</p>
<h3><strong>Handling the Shutdown Request Gracefully</strong></h3>
<p>Overriding <a href="http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/Application.html#requestClose()" target="_new">Application.requestClose()</a> can allow your application to respond gracefully to a termination request.  Returning true from this method will allow your application 10 seconds to process any required cleanup before it is shut down.  Returning false will shut down the application immediately.  This can also be used for diagnostic purposes, as it can log information about the state of the application for debugging purposes.  Be careful to avoid logging excessive amounts of data in the production version of your application.  requestClose is also fired for visible applications (those for which acceptsForeground() returns true) if they have not been used for one hour, regardless of whether or not they are using background timers or significant CPU.  (However, applications are not terminated after being idle for one hour.  This is simply a suggestion that they could close to conserve resources.)</p>
<p>Application termination from Application Resource Monitor is not limited to visible applications – in fact, it’s arguably more important that non-visible processes are terminated since users are not otherwise able to easily shut them down. You should consider the possibility that their processes may be shut down and ensure that this does not hinder future use of your app.</p>
<h3><strong>Verifying Efficiency using the BlackBerry Java Plug-in for Eclipse</strong></h3>
<p>Efficient applications that already take into account the states described above should not be impacted.  However, it makes sense to do some performance testing of your application to verify that it does act like a good citizen.  A new view has been added to version 1.5.2 of the BlackBerry Java® Plug-in for Eclipse™ that allows you to do just that.  The new Process View allows you to monitor CPU utilization of your application, where you can monitor the statistics presented to observe the impact of your application while it is in the background and/or when the screen has turned off.</p>
<p><img src="http://rimdevblog.files.wordpress.com/2012/05/resource-monitor-2.jpg?w=600&#038;h=112" alt="" title="" width="600" height="112" class="aligncenter size-full wp-image-9607" /></p>
<p style="text-align:center;"><i>BlackBerry Java Plug-in for Eclipse Profiler View</i></p>
<h3><strong>How to Determine if an Application was Shut Down by Application Resource Monitor</strong></h3>
<p>Application Resource Monitor will create an entry in the event log every time it shuts down an application.  You can view the event log on a BlackBerry smartphone from the home screen by holding down the Alt key and pressing LGLG.  You can also extract it using the javaloader command line tool (javaloader –u eventlog &gt; mylog.txt).<br />
Application Resource Monitor will log detailed information about why the application was shut down and how it handled the shutdown request.  Stack traces may be useful if the alert stems from processing too many timer events in the event handling thread (usually from the use of invokeLater with timed runnables and very short timeouts), but it’s more likely that the stack trace won’t capture the specific event processing at the time of the trace dump.</p>
<p>Setting the minimum event log level to “information” will provide more information about background activity that doesn’t meet the criteria to trigger notification or automatic shutdown – i.e. background timer activity below the minimum wakeup rate threshold.  Here is a sample event log entry that shows an application being shut down by Application Resource Monitor, with comments added describing the entries shown bolded in red:</p>
<p>
<h6>W 22:01:02 &#8211; net.rim.appmon &#8211; Terminating still-running process TestWebworks(596) <font color="#FF0000">Logged because the app did not support requestClose()</font></p>
<p>W 22:01:01 &#8211; net.rim.appmon &#8211; Shutting down process automatically <font color="#FF0000">Logged because autokill is enabled.</font></p>
<p>W 22:01:01 &#8211; net.rim.appmon &#8211; Thread CPU r=0, t=47085  <font color="#FF0000">Recent (last 2 seconds) and cumulative CPU time (ms) for the thread with the preceding stack trace</font></p>
<p>a 22:01:01 &#8211; Java Exception – ForcedStackTraceException  <font color="#FF0000">Start of stack trace of a single thread in the process.</font></p>
<p>| VM:AppM TestWebworks(596) 322 2 0&#215;15580800<br />
| net_rim_cldc(4FA2F16A)<br />
|  Object<br />
|  wait<br />
|  0xA7AF<br />
| net_rim_cldc-36(4FA2F16A)<br />
|  MessageQueue<br />
|  dequeue<br />
|  0x72F5<br />
| net_rim_cldc-11(4FA2F16A)<br />
|  ApplicationProcess<br />
|  getMessage<br />
|  0x4A6E<br />
| net_rim_cldc-10(4FA2F16A)<br />
|  Application<br />
|  processNextMessage<br />
|  0&#215;2249<br />
| net_rim_cldc-10(4FA2F16A)<br />
|  Application<br />
|  enterEventDispatcher<br />
|  0&#215;2196<br />
| TestWebworks-2(4F9144A8)<br />
|  Widget<br />
|  main<br />
|  0x741C</p>
<p>W 22:01:01 &#8211; net.rim.appmon &#8211; Thread CPU r=0, t=9531</p>
<p>a 22:01:01 &#8211; Java Exception &#8211; ForcedStackTraceException</p>
<p>| VM:AppM TestWebworks(596) 173 3<br />
| TestWebworks-3(4F9144A8)<br />
|  AnimatedGIFField$AnimatorThread<br />
|  run<br />
|  0&#215;187</p>
<p>W 22:01:00 &#8211; net.rim.appmon &#8211; Thread CPU r=0, t=125632</p>
<p>a 22:01:00 &#8211; Java Exception &#8211; ForcedStackTraceException</p>
<p>| VM:AppM TestWebworks(596) 163 3<br />
| TestWebworks-2(4F9144A8)<br />
|  MemoryMaid<br />
|  run<br />
|  0&#215;3081</p>
<p>W 22:01:00 &#8211; net.rim.appmon &#8211; Thread CPU r=0, t=242</p>
<p>a 22:01:00 &#8211; Java Exception &#8211; ForcedStackTraceException</p>
<p>| VM:AppM TestWebworks(596) 352 2 0x14FE2C00<br />
| net_rim_cldc(4FA2F16A)<br />
|  Object<br />
|  wait<br />
|  0xA7AF<br />
| TestWebworks-2(4F9144A8)<br />
|  EventQueue<br />
|  dequeueWaitIfEmpty<br />
|  0x25FB<br />
| TestWebworks-2(4F9144A8)<br />
|  SystemEventManager<br />
|  getNextWaitingEvent<br />
|  0x600D<br />
| TestWebworks-2(4F9144A8)<br />
|  SystemEventExtension<br />
|  invoke<br />
|  0x5E09<br />
| TestWebworks-3(4F9144A8)<br />
|  WidgetRequestController<br />
|  handleResourceRequest<br />
|  0x4DA0<br />
| net_rim_bb_browser_field2_api(4FA2F821)<br />
|  RenderingApplicationImpl<br />
|  getInputConnectionDirect<br />
|  0&#215;3971<br />
| net_rim_bb_browser_field2_api(4FA2F821)<br />
|  RenderingApplicationImpl$2<br />
|  run<br />
|  0x3D0D<br />
| net_rim_bb_apps_framework-4(4FA2F73D)<br />
|  Job<br />
|  go<br />
|  0&#215;4874<br />
| net_rim_bb_apps_framework-4(4FA2F73D)<br />
|  Worker<br />
|  joinableRun<br />
|  0xA682<br />
| net_rim_cldc-34(4FA2F16A)<br />
|  InterruptibleThread<br />
|  run<br />
|  0x1EEE</p>
<p>W 22:01:00 &#8211; net.rim.appmon &#8211; Thread CPU r=0, t=0</p>
<p>a 22:01:00 &#8211; Java Exception &#8211; ForcedStackTraceException</p>
<p>| VM:AppM TestWebworks(596) 330 2 0x258AC400<br />
| net_rim_cldc(4FA2F16A)<br />
|  Object<br />
|  wait<br />
|  0xA7AF<br />
| TestWebworks-2(4F9144A8)<br />
|  PushListener2$MessageProcessor<br />
|  run<br />
|  0x44EA</p>
<p>W 22:01:00 &#8211; net.rim.appmon &#8211; Process TestWebworks(596), system = false, visible = true, localized app name = BARM Test App, group name = RIM, friendly group name = BARM Test App  <font color="#FF0000">Details about the process</font>.</p>
<p>W 22:01:00 &#8211; net.rim.appmon &#8211; Process TestWebworks(596) background wakeup count 3661 over 420023ms <font color="#FF0000">First log for the alert, shows the wakeup rate.</font></h6>
</p>
<h3><strong>Triggering Application Resource Monitor Shut Down for Application Testing</strong></h3>
<p>The BlackBerry Profiler View in the BlackBerry Java Plug-in for Eclipse should always be the first tool you use to test and enhance the efficiency of your application.  However, you may want to test how your application behaves in the event that it gets shut down by Application Resource Monitor.  To do so, you can lower the thresholds that it uses to determine if an application should be shut down.  This can also be used in conjunction with the BlackBerry Profiler View to ensure that your application stays well under the default threshold.  To modify this threshold, go to Options -&gt; Application Resource Monitor on your BlackBerry smartphone, then type FLTR to display the additional options.  You should see a screen that has these additional options:</p>
<p><img src="http://rimdevblog.files.wordpress.com/2012/05/resource-monitor-3.jpg?w=480&#038;h=360" alt="" title="" width="480" height="360" class="aligncenter size-full wp-image-9606" /></p>
<p>Here are some tips on how to configure these settings while testing your application.</p>
<ul>
<li>Reduce the wakeup threshold to a low level, perhaps the minimum. It is intentionally set at a very conservative (high) level by default.</li>
<li>Disable automatic shut down – this allows you to immediately profile the application when Application Resource Monitor triggers an alert and before changing the state, to see what’s going on in your application.</li>
<li>Disable transient filtering &#8211; this will speed up detection of sustained problems.</li>
<li>If you are performing very frequent restarts of your BlackBerry smartphone while testing, reduce the startup delay to 0.</li>
</ul>
<h3><strong>Shutting Down</strong></h3>
<p>The BlackBerry Application Resource Monitor is designed to help consumers get the most battery life out of their BlackBerry smartphone by closing applications that are abusing resources leading to noticeable battery drain.  By following the steps outlined in this article, you can ensure that your application behaves like a good citizen on the device and is never noticed by Application Resource Monitor.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/9605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/9605/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=9605&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/05/application-resource-monitor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/76c7dc9f1e2068196cd724a8bd5bac54?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msohm</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/resource-monitor-1.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/resource-monitor-2.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/resource-monitor-3.jpg" medium="image" />
	</item>
		<item>
		<title>Are you using NFC to its full potential?</title>
		<link>http://devblog.blackberry.com/2011/11/near-field-communication-development/</link>
		<comments>http://devblog.blackberry.com/2011/11/near-field-communication-development/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 20:42:35 +0000</pubDate>
		<dc:creator>Luke Reimer</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[BlackBerry 7]]></category>
		<category><![CDATA[BlackBerry Tag]]></category>
		<category><![CDATA[nfc]]></category>
		<category><![CDATA[NFC tags]]></category>
		<category><![CDATA[resources]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=7828</guid>
		<description><![CDATA[Find out more about NFC and get some great resources for development.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=7828&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><I>Happy Friday, BlackBerry devs!  We&#8217;ve got a quick update for you from Martin about a little something called NFC&#8230;enjoy! &#8211; Ed.</I></p>
<p>Hopefully you’re already aware that one of the exciting new features of the BlackBerry® 7 OS and devices (such as the <a href="http://ca.blackberry.com/smartphones/blackberry-bold-9900-9930/" target="_new">BlackBerry® Bold™ 9900</a> smartphone and <a href="http://ca.blackberry.com/smartphones/blackberry-curve-9350-9360-9370/" target="_new">BlackBerry® Curve™ 9360</a> smartphone) is Near Field Communications, or “NFC” for short. In addition to some of the consumer and business stories we’ve talked about on the NFC front in recent weeks, such as announcing BlackBerry® Tag and the MasterCard® certification of BlackBerry Bold 9900 and BlackBerry Curve 9360, NFC can be used by you, our community of developers, in a variety of ways. This presents a great opportunity to get creative and differentiate your applications and your company.</p>
<p>For developers, NFC is a truly interesting area of technology to learn about, though for many it may currently be quite unfamiliar territory. With that in mind, we’re aiming to publish a series of articles under the Resources tab in the <a href="http://us.blackberry.com/developers/resources/" target="_new">BlackBerry® Developer Zone</a>, which will help inform developers about the possibilities of using NFC, the underlying technical details of the technology, and how to use the BlackBerry 7 APIs for NFC in your own applications.</p>
<p>In fact, myself and John, my colleague in BlackBerry Developer Relations, have already published the first two articles in the series. The first is called “<a href="http://supportforums.blackberry.com/t5/Java-Development/NFC-Primer-for-Developers/ta-p/1334857" target="_new">NFC Primer for Developers</a>” and if you’re completely new to the topic, it’s definitely the place to start. More recently, we also published an article entitled “<a href="http://supportforums.blackberry.com/t5/Java-Development/Reading-and-Writing-NFC-Smart-Tags/ta-p/1379453" target="_new">Reading and Writing NFC Tags</a>”, which explains how to work with smart posters and other implementations of NFC tags.</p>
<p>We hope you find these articles interesting and useful, and we look forward to being impressed by your use of NFC in BlackBerry® applications! Watch the Inside BlackBerry Developer’s Blog for further articles in the future.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/7828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/7828/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=7828&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2011/11/near-field-communication-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/02798908b6c8de45a0e4aa8531a6d869?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lukereim1</media:title>
		</media:content>
	</item>
	</channel>
</rss>
