<?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/"
	>

<channel>
	<title>WSU CS &#8211; CS@Worcester</title>
	<atom:link href="https://cs.worcester.edu/category/wsu-cs/feed/" rel="self" type="application/rss+xml" />
	<link>https://cs.worcester.edu</link>
	<description>Worcester State University Computer Science Department</description>
	<lastBuildDate>Thu, 29 Jan 2015 19:26:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
<site xmlns="com-wordpress:feed-additions:1">236835116</site>	<item>
		<title>HDP Sandbox Startup Problems?</title>
		<link>https://cs.worcester.edu/2015/01/29/hdp-sandbox-startup-problems/</link>
		
		<dc:creator><![CDATA[kevpfowler]]></dc:creator>
		<pubDate>Thu, 29 Jan 2015 19:26:55 +0000</pubDate>
				<category><![CDATA[Hadoop]]></category>
		<category><![CDATA[WSU CS]]></category>
		<guid isPermaLink="false">http://kevpfowler.wordpress.com/?p=15</guid>

					<description><![CDATA[When I installed the Hortonworks HDP 2.2 Sandbox in my VMware Player, I had a problem after connecting to the first web page indicated on the startup screen. That web page had bad links. The quick and dirty solution is to explicitly include the port number 8888 in your URL. If you want to see [&#8230;]<img alt="" border="0" src="https://pixel.wp.com/b.gif?host=kevpfowler.wordpress.com&#38;blog=83413554&#38;post=15&#38;subd=kevpfowler&#38;ref=&#38;feed=1" width="1" height="1">]]></description>
										<content:encoded><![CDATA[<p>When I installed the Hortonworks HDP 2.2 Sandbox in my VMware Player, I had a problem after connecting to the first web page indicated on the startup screen. That web page had bad links.</p>
<p>The quick and dirty solution is to explicitly include the port number 8888 in your URL.</p>
<p>If you want to see more detailed description of the problem (as I saw it) and the workaround (that worked for me), go to this blog entry:</p>
<p><a href="https://kevpfowler.wordpress.com/2015/01/28/bad-links-in-hortonworks-hdp-2-2-sandbox-startup/" rel="nofollow">https://kevpfowler.wordpress.com/2015/01/28/bad-links-in-hortonworks-hdp-2-2-sandbox-startup/</a></p>
<p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kevpfowler.wordpress.com/15/"><img decoding="async" alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kevpfowler.wordpress.com/15/" /></a> <img data-recalc-dims="1" decoding="async" alt="" border="0" src="https://i0.wp.com/pixel.wp.com/b.gif?resize=1%2C1&#038;ssl=1" width="1" height="1" /></p>

<p class="syndicated-attribution"><em>From the blog <a href="https://kevpfowler.wordpress.com">kevpfowler » wsu-cs</a> by <a href="https://cs.worcester.edu/author/0/" title="Read other posts by kevpfowler">kevpfowler</a></em> and used with permission of the author. All other rights reserved by the author.</p>]]></content:encoded>
					
		
		<enclosure url="https://2.gravatar.com/avatar/26b066f486bdf07c7a40c94245609e16?s=96&#038;d=identicon&#038;r=G" length="0" type="" />

		<post-id xmlns="com-wordpress:feed-additions:1">3904</post-id>	</item>
		<item>
		<title>Hadoop MapReduce Clusters</title>
		<link>https://cs.worcester.edu/2015/01/26/hadoop-mapreduce-clusters/</link>
		
		<dc:creator><![CDATA[kevpfowler]]></dc:creator>
		<pubDate>Mon, 26 Jan 2015 14:01:16 +0000</pubDate>
				<category><![CDATA[WSU CS]]></category>
		<guid isPermaLink="false">http://kevpfowler.wordpress.com/?p=12</guid>

					<description><![CDATA[The assigned MapReduce tutorial on YDN provided a detailed lesson on MapReduce execution and the basics of coding the MapClass and Reduce classes. I thought it was clearly presented and the checkpoint assignment was effective, if not too challenging. As another blogger noted, it may be necessary to reload the tutorial several times to get [&#8230;]<img alt="" border="0" src="https://pixel.wp.com/b.gif?host=kevpfowler.wordpress.com&#38;blog=83413554&#38;post=12&#38;subd=kevpfowler&#38;ref=&#38;feed=1" width="1" height="1">]]></description>
										<content:encoded><![CDATA[<p>The assigned MapReduce tutorial on YDN provided a detailed lesson on MapReduce execution and the basics of coding the MapClass and Reduce classes. I thought it was clearly presented and the checkpoint assignment was effective, if not too challenging. As another blogger noted, it may be necessary to reload the tutorial several times to get it to load successfully. But the persistence was worth it.</p>
<p>The article linked below includes a MapReduce example but is more focused on the cluster components and how the Hadoop architecture operates both to provide the HDFS and to execute MapReduce jobs. I found it helpful to understand a bit more of the bigger Hadoop picture in the context of a MapReduce job execution.</p>
<p><a href="http://bradhedlund.com/2011/09/10/understanding-hadoop-clusters-and-the-network/" rel="nofollow">http://bradhedlund.com/2011/09/10/understanding-hadoop-clusters-and-the-network/</a></p>
<p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kevpfowler.wordpress.com/12/"><img decoding="async" alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kevpfowler.wordpress.com/12/" /></a> <img data-recalc-dims="1" decoding="async" alt="" border="0" src="https://i0.wp.com/pixel.wp.com/b.gif?resize=1%2C1&#038;ssl=1" width="1" height="1" /></p>

<p class="syndicated-attribution"><em>From the blog <a href="https://kevpfowler.wordpress.com">kevpfowler » wsu-cs</a> by <a href="https://cs.worcester.edu/author/0/" title="Read other posts by kevpfowler">kevpfowler</a></em> and used with permission of the author. All other rights reserved by the author.</p>]]></content:encoded>
					
		
		<enclosure url="https://2.gravatar.com/avatar/26b066f486bdf07c7a40c94245609e16?s=96&#038;d=identicon&#038;r=G" length="0" type="" />

		<post-id xmlns="com-wordpress:feed-additions:1">3897</post-id>	</item>
		<item>
		<title>CS-383 Intro Post</title>
		<link>https://cs.worcester.edu/2015/01/22/cs-383-intro-post/</link>
		
		<dc:creator><![CDATA[kevpfowler]]></dc:creator>
		<pubDate>Thu, 22 Jan 2015 20:14:14 +0000</pubDate>
				<category><![CDATA[WSU CS]]></category>
		<guid isPermaLink="false">http://kevpfowler.wordpress.com/?p=8</guid>

					<description><![CDATA[My name is Kevin Fowler and this is my intro post on my CS-383 blog. I &#160;am a software engineer in the Networking division at Dell. My experience is all in legacy languages, tools and infrastructure. I&#8217;m taking this course to learn newer&#160;technology concepts and capabilities. Not sure what I will do with it yet [&#8230;]<img alt="" border="0" src="https://pixel.wp.com/b.gif?host=kevpfowler.wordpress.com&#38;blog=83413554&#38;post=8&#38;subd=kevpfowler&#38;ref=&#38;feed=1" width="1" height="1">]]></description>
										<content:encoded><![CDATA[<p>My name is Kevin Fowler and this is my intro post on my CS-383 blog.</p>
<p>I  am a software engineer in the Networking division at Dell. My experience is all in legacy languages, tools and infrastructure. I&#8217;m taking this course to learn newer technology concepts and capabilities. Not sure what I will do with it yet &#8211; just taking the first step.</p>
<p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kevpfowler.wordpress.com/8/"><img decoding="async" alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kevpfowler.wordpress.com/8/" /></a> <img data-recalc-dims="1" decoding="async" alt="" border="0" src="https://i0.wp.com/pixel.wp.com/b.gif?resize=1%2C1&#038;ssl=1" width="1" height="1" /></p>

<p class="syndicated-attribution"><em>From the blog <a href="https://kevpfowler.wordpress.com">kevpfowler » wsu-cs</a> by <a href="https://cs.worcester.edu/author/0/" title="Read other posts by kevpfowler">kevpfowler</a></em> and used with permission of the author. All other rights reserved by the author.</p>]]></content:encoded>
					
		
		<enclosure url="https://2.gravatar.com/avatar/26b066f486bdf07c7a40c94245609e16?s=96&#038;d=identicon&#038;r=G" length="0" type="" />

		<post-id xmlns="com-wordpress:feed-additions:1">3893</post-id>	</item>
		<item>
		<title>my new post</title>
		<link>https://cs.worcester.edu/2015/01/22/my-new-post/</link>
		
		<dc:creator><![CDATA[enyihnico]]></dc:creator>
		<pubDate>Thu, 22 Jan 2015 19:04:15 +0000</pubDate>
				<category><![CDATA[WSU CS]]></category>
		<guid isPermaLink="false">http://nicomagic.wordpress.com/?p=3</guid>

					<description><![CDATA[My name is Nico and i am a computer science student currently taken CS 382.   ]]></description>
										<content:encoded><![CDATA[<p>My name is Nico and i am a computer science student currently taken CS 382.</p>
<p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicomagic.wordpress.com/3/"><img decoding="async" alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicomagic.wordpress.com/3/" /></a> <img data-recalc-dims="1" loading="lazy" decoding="async" alt="" border="0" src="https://i0.wp.com/pixel.wp.com/b.gif?resize=1%2C1&#038;ssl=1" width="1" height="1" /></p>

<p class="syndicated-attribution"><em>From the blog <a href="https://nicomagic.wordpress.com">nicomagic » WSU.CS</a> by <a href="https://cs.worcester.edu/author/0/" title="Read other posts by enyihnico">enyihnico</a></em> and used with permission of the author. All other rights reserved by the author.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3886</post-id>	</item>
		<item>
		<title>End Of the Semester</title>
		<link>http://jamescelona.wordpress.com/2012/12/09/end-of-the-semester/</link>
		
		<dc:creator><![CDATA[jamescelona]]></dc:creator>
		<pubDate>Sun, 09 Dec 2012 16:03:23 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[WSU CS]]></category>
		<category><![CDATA[WSU_CS]]></category>
		<guid isPermaLink="false">http://jamescelona.wordpress.com/?p=139</guid>

					<description><![CDATA[For Jon&#160;and I this is the end of the road for undergrad. &#160;This Android project was a great way to end it. &#160;All three of us want to continue to work on the app after school ends, we still have plans for it. &#160; I&#8217;ve learned quite a bit over the course of the semester, [&#8230;]<img alt="" border="0" src="http://pixel.wp.com/b.gif?host=jamescelona.wordpress.com&#38;blog=31908591&#38;post=139&#38;subd=jamescelona&#38;ref=&#38;feed=1" width="1" height="1">]]></description>
										<content:encoded><![CDATA[<p>For <a href="http://codeyourenthusiasm.wordpress.com/">Jon</a> and I this is the end of the road for undergrad.  This Android project was a great way to end it.  All three of us want to continue to work on the app after school ends, we still have plans for it.</p>
<p>&nbsp;</p>
<p>I&#8217;ve learned quite a bit over the course of the semester, not just coding with Android but how to work with a team.   We all became pretty good at using git, although sometimes the project still hates me and doesn&#8217;t want to work but that&#8217;s ok.  We have hundreds and hundreds of emails over the past few months talking about the app.  We also took advantage of the library TVs and did a bit of code review at our (bi)-weekly meetings.  Of course, we all learned Java for Android quite a bit, too and attempting to use the GUI for XML.</p>
<p>&nbsp;</p>
<p>This was a great experience and a great way to end my undergraduate degree.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Thanks to everyone who helped along the way,</p>
<p>&nbsp;</p>
<p>James Celona</p>
<p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jamescelona.wordpress.com/139/"><img decoding="async" alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jamescelona.wordpress.com/139/" /></a> <img data-recalc-dims="1" loading="lazy" decoding="async" alt="" border="0" src="https://i0.wp.com/pixel.wp.com/b.gif?resize=1%2C1" width="1" height="1" /></p>

<p class="syndicated-attribution"><em>From the blog <a href="http://jamescelona.wordpress.com">jamescelona » WSU CS</a> by <a href="https://cs.worcester.edu/author/0/" title="Read other posts by jamescelona">jamescelona</a></em> and used with permission of the author. All other rights reserved by the author.</p>]]></content:encoded>
					
		
		<enclosure url="http://1.gravatar.com/avatar/7c2c556c2436ff6edb3e01c5e64f6780?s=96&#038;d=identicon&#038;r=G" length="0" type="" />

		<post-id xmlns="com-wordpress:feed-additions:1">1264</post-id>	</item>
		<item>
		<title>Using 3rd Party Libraries</title>
		<link>http://codeyourenthusiasm.wordpress.com/2012/12/06/using-3rd-party-libraries/</link>
		
		<dc:creator><![CDATA[Jon]]></dc:creator>
		<pubDate>Thu, 06 Dec 2012 15:33:28 +0000</pubDate>
				<category><![CDATA[ActionBarSherlock]]></category>
		<category><![CDATA[AmbilWarna]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Third Party]]></category>
		<category><![CDATA[WSU CS]]></category>
		<guid isPermaLink="false">http://codeyourenthusiasm.wordpress.com/?p=181</guid>

					<description><![CDATA[Task Butler uses two open source third party libraries: ActionBar Sherlock and AmbilWarna ActionBarSherlock is an excellent library that emulates the Ice Cream Sandwich action bar in older versions of Android. This was crucial for our app because we were developing for 2.2+, and having to design an entirely different UI would have been inelegant [&#8230;]<img alt="" border="0" src="http://pixel.wp.com/b.gif?host=codeyourenthusiasm.wordpress.com&#38;blog=37163678&#38;post=181&#38;subd=codeyourenthusiasm&#38;ref=&#38;feed=1" width="1" height="1">]]></description>
										<content:encoded><![CDATA[<p>Task Butler uses two open source third party libraries: ActionBar Sherlock and AmbilWarna</p>
<p><a href="http://actionbarsherlock.com/">ActionBarSherlock</a> is an excellent library that emulates the Ice Cream Sandwich action bar in older versions of Android. This was crucial for our app because we were developing for 2.2+, and having to design an entirely different UI would have been inelegant and a massive amount of extra work. Jake Wharton&#8217;s ABS uses the same API calls as Android&#8217;s official library, so one can follow Google&#8217;s API specification to use his library. Google has its own support library with limited features available, but ABS is a much more complete solution. It was critical to the design of our UI and I thank him for developing it and releasing it for free.</p>
<p>The <a href="http://code.google.com/p/android-color-picker/">AmbilWarna color picker dialog</a> is a neat piece of code that provides a color selector for users. We needed a way for users to pick colors for their categories and this seemed like a much nicer solution than giving users limited choices like other apps do. Picture attached.</p>
<p><a href="http://codeyourenthusiasm.wordpress.com/2012/12/06/using-3rd-party-libraries/colorpicker_1/" rel="attachment wp-att-182"><img data-recalc-dims="1" height="300" width="300" decoding="async" class="alignnone size-medium wp-image-182" alt="ColorPicker_1" src="http://codeyourenthusiasm.files.wordpress.com/2012/12/colorpicker_1.png?w=167&#038;h=300&#038;fit=300%2C300"   /></a></p>
<p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeyourenthusiasm.wordpress.com/181/"><img decoding="async" alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeyourenthusiasm.wordpress.com/181/" /></a> <img data-recalc-dims="1" loading="lazy" decoding="async" alt="" border="0" src="https://i0.wp.com/pixel.wp.com/b.gif?resize=1%2C1" width="1" height="1" /></p>

<p class="syndicated-attribution"><em>From the blog <a href="http://codeyourenthusiasm.wordpress.com">Code Your Enthusiasm » WSU CS</a> by <a href="https://cs.worcester.edu/author/0/" title="Read other posts by Jon">Jon</a></em> and used with permission of the author. All other rights reserved by the author.</p>]]></content:encoded>
					
		
		<enclosure url="http://1.gravatar.com/avatar/74f7210512992fc54e041bc8b28171f6?s=96&#038;d=identicon&#038;r=G" length="0" type="" />
<enclosure url="http://codeyourenthusiasm.files.wordpress.com/2012/12/colorpicker_1.png?w=168" length="0" type="" />

		<post-id xmlns="com-wordpress:feed-additions:1">1252</post-id>	</item>
		<item>
		<title>Task Butler available on Google Play!</title>
		<link>http://codeyourenthusiasm.wordpress.com/2012/12/06/task-butler-available-on-google-play/</link>
		
		<dc:creator><![CDATA[Jon]]></dc:creator>
		<pubDate>Thu, 06 Dec 2012 15:21:23 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Google Play]]></category>
		<category><![CDATA[WSU CS]]></category>
		<guid isPermaLink="false">http://codeyourenthusiasm.wordpress.com/?p=179</guid>

					<description><![CDATA[As of this writing, our summer/fall project Task Butler is available to be downloaded on the Google Play store! I am very proud of what we accomplished and I invite anyone with an Android device to check it out. Feedback is always appreciated, of cours...]]></description>
										<content:encoded><![CDATA[<p>As of this writing, our summer/fall project Task Butler is available to be downloaded on the Google Play store! I am very proud of what we accomplished and I invite anyone with an Android device to check it out. Feedback is always appreciated, of course.</p>
<p>&nbsp;</p>
<p>Grab it <a href="https://play.google.com/store/apps/details?id=edu.worcester.cs499summer2012">here</a>.</p>
<p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeyourenthusiasm.wordpress.com/179/"><img decoding="async" alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeyourenthusiasm.wordpress.com/179/" /></a> <img data-recalc-dims="1" loading="lazy" decoding="async" alt="" border="0" src="https://i0.wp.com/pixel.wp.com/b.gif?resize=1%2C1" width="1" height="1" /></p>

<p class="syndicated-attribution"><em>From the blog <a href="http://codeyourenthusiasm.wordpress.com">Code Your Enthusiasm » WSU CS</a> by <a href="https://cs.worcester.edu/author/0/" title="Read other posts by Jon">Jon</a></em> and used with permission of the author. All other rights reserved by the author.</p>]]></content:encoded>
					
		
		<enclosure url="http://1.gravatar.com/avatar/74f7210512992fc54e041bc8b28171f6?s=96&#038;d=identicon&#038;r=G" length="0" type="" />

		<post-id xmlns="com-wordpress:feed-additions:1">1253</post-id>	</item>
		<item>
		<title>Using IntentService With AlarmManager to Schedule Alarms</title>
		<link>http://dhimitraq.wordpress.com/2012/11/27/using-intentservice-with-alarmmanager-to-schedule-alarms/</link>
		
		<dc:creator><![CDATA[dhimitraq]]></dc:creator>
		<pubDate>Wed, 28 Nov 2012 00:20:40 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Android AlarmManager]]></category>
		<category><![CDATA[Android BroadcastReceiver]]></category>
		<category><![CDATA[Android IntentService]]></category>
		<category><![CDATA[Android WakeLock]]></category>
		<category><![CDATA[Multiple Alarms]]></category>
		<category><![CDATA[Waking up Android Device using Alarms]]></category>
		<category><![CDATA[WSU CS]]></category>
		<guid isPermaLink="false">http://dhimitraq.wordpress.com/?p=86</guid>

					<description><![CDATA[Many Linux developers look for a cron like service when starting to develop on Android, well luckily it exists in the form of AlarmManager. AlarmManager allows you to schedule your application to run at a time in the future, however it is cleared on boot&#8211;should/can be re registered with the system through OnBoot BroadcastReceiver. AndroidManifest.xml; [&#8230;]<img alt="" border="0" src="http://pixel.wp.com/b.gif?host=dhimitraq.wordpress.com&#38;blog=31909135&#38;post=86&#38;subd=dhimitraq&#38;ref=&#38;feed=1" width="1" height="1">]]></description>
										<content:encoded><![CDATA[<p>Many Linux developers look for a cron like service when starting to develop on Android, well luckily it exists in the form of <a title="AlarmManager" href="http://developer.android.com/reference/android/app/AlarmManager.html" >AlarmManager</a>. AlarmManager allows you to schedule your application to run at a time in the future, however it is cleared on boot&#8211;should/can be re registered with the system through OnBoot BroadcastReceiver.</p>
<p>AndroidManifest.xml; you need to register the two BroadcastReceivers, and the service. Also get permission to use the WakeLock, and to get Boot_Completed signal.</p>
<pre class="brush: xml; title: ; notranslate">
    &lt;uses-permission android:name=&quot;android.permission.RECEIVE_BOOT_COMPLETED&quot; /&gt;
    &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;
&lt;application&gt;
     &lt;receiver android:name=&quot;.service.OnBootReceiver&quot; &gt;
         &lt;intent-filter&gt;
            &lt;action android:name=&quot;android.intent.action.BOOT_COMPLETED&quot; /&gt;
         &lt;/intent-filter&gt;
     &lt;/receiver&gt;

     &lt;receiver android:name=&quot;.service.OnAlarmReceiver&quot; &gt;
     &lt;/receiver&gt;

     &lt;service android:name=&quot;.service.TaskButlerService&quot; &gt;
     &lt;/service&gt;
&lt;/application&gt;
</pre>
<p>This is a BroadcastReceiver for the OnBoot complete, used to reschedule alarms with the AlarmManager since after boot the alarms are flashed out. There is only 2 lines of code in the onReceive() method, that is due to your own onReceive() needing to be short. The first line acquires a <a title="PARTIAL_WAKE_LOCK" href="http://developer.android.com/reference/android/os/PowerManager.html#PARTIAL_WAKE_LOCK" >partial WakeLock</a> to keep the CPU running, while our <a title="IntentService" href="http://developer.android.com/reference/android/app/IntentService.html" >IntentService</a> is executing.</p>
<pre class="brush: java; title: ; notranslate">
package edu.worcester.cs499summer2012.service;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

/**
 * BroadCastReceiver for android.intent.action.BOOT_COMPLETED
 * passes all responsibility to TaskButlerService.
 * @author Dhimitraq Jorgji
 *
 */
public class OnBootReceiver extends BroadcastReceiver{
	@Override
	public void onReceive(Context context, Intent intent) {

		WakefulIntentService.acquireStaticLock(context); //acquire a partial WakeLock
		context.startService(new Intent(context, TaskButlerService.class)); //start TaskButlerService
	}
}
</pre>
<p>IntentService is my favorite way of getting things done in the background, separate from the main thread of my application. Usually I don&#8217;t inherit IntentService directly, and I suggest you do the same; define a synchronized method to acquire a WakeLock before you continue on with whatever you need to accomplish.</p>
<pre class="brush: java; title: ; notranslate">
package edu.worcester.cs499summer2012.service;

import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.os.PowerManager;

/**
 * Acquires a partial WakeLock, allows TaskButtlerService to keep the CPU alive
 * until the work is done.
 * @author Dhimitraq Jorgji
 *
 */
public class WakefulIntentService extends IntentService {
	public static final String
	LOCK_NAME_STATIC=&quot;edu.worcester.cs499summer2012.TaskButlerService.Static&quot;;;
	public static final String
	LOCK_NAME_LOCAL=&quot;edu.worcester.cs499summer2012.TaskButlerService.Local&quot;;
	private static PowerManager.WakeLock lockStatic=null;
	private PowerManager.WakeLock lockLocal=null;

	public WakefulIntentService(String name) {
		super(name);
	}
	/**
	 * Acquire a partial static WakeLock, you need too call this within the class
	 * that calls startService()
	 * @param context
	 */
	public static void acquireStaticLock(Context context) {
		getLock(context).acquire();
	}

	synchronized private static PowerManager.WakeLock getLock(Context context) {
		if (lockStatic==null) {
			PowerManager
			mgr=(PowerManager)context.getSystemService(Context.POWER_SERVICE);
			lockStatic=mgr.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
					LOCK_NAME_STATIC);
			lockStatic.setReferenceCounted(true);
		}
		return(lockStatic);
	}

	@Override
	public void onCreate() {
		super.onCreate();
		PowerManager mgr=(PowerManager)getSystemService(Context.POWER_SERVICE);
		lockLocal=mgr.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
				LOCK_NAME_LOCAL);
		lockLocal.setReferenceCounted(true);
	}

	@Override
	public void onStart(Intent intent, final int startId) {
		lockLocal.acquire();
		super.onStart(intent, startId);
		getLock(this).release();
	}

	@Override
	protected void onHandleIntent(Intent intent) {
		lockLocal.release();
	}
}
</pre>
<p>Now we can simply inheriting the WakeFulIntentService, and do all our work with in one simple method onHandleIntent(Intent). The method can be called from within anywhere in your program and it will handle everything on a background thread like any Service, also safely since it holds a WakeLock until the method completes at which point it returns the lock and exits nicely.</p>
<pre class="brush: java; title: ; notranslate">
package edu.worcester.cs499summer2012.service;

import java.util.List;

import android.content.Intent;

import edu.worcester.cs499summer2012.database.TasksDataSource;
import edu.worcester.cs499summer2012.task.Task;

/**
 * An IntentService that takes care of setting up alarms for Task Butler
 * to remind the user of upcoming events
 * @author Dhimitraq Jorgji
 *
 */
public class TaskButlerService extends WakefulIntentService{

	public TaskButlerService() {
		super(&quot;TaskButlerService&quot;);
	}

	@Override
	protected void onHandleIntent(Intent intent) {
		TasksDataSource db = TasksDataSource.getInstance(this); //get access to the instance of TasksDataSource
		TaskAlarm alarm = new TaskAlarm();

		List&lt;Task&gt; tasks = db.getAllTasks(); //Get a list of all the tasks there
		for (Task task : tasks) {
			// Cancel existing alarm
			alarm.cancelAlarm(this, task.getID());

			//Procrastinator and Reminder alarm
			if(task.isPastDue()){
				alarm.setReminder(this, task.getID());
			}

			//handle repeat alarms
			if(task.isRepeating() &amp;&amp; task.isCompleted()){
				task = alarm.setRepeatingAlarm(this, task.getID());
			}

			//regular alarms
			if(!task.isCompleted() &amp;&amp; (task.getDateDue() &gt;= System.currentTimeMillis())){
				alarm.setAlarm(this, task);
			}
		}
		super.onHandleIntent(intent);
	}
}
</pre>
<p>At this point you just need a BroadcastReceiver to receive your alarms.</p>
<pre class="brush: java; title: ; notranslate">
package edu.worcester.cs499summer2012.service;

import edu.worcester.cs499summer2012.database.TasksDataSource;
import edu.worcester.cs499summer2012.task.Task;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

/**
 * BroadCastReceiver for Alarms, displays notifications as it receives alarm
 * and then starts TaskButlerService to update alarm schedule with AlarmManager
 * @author Dhimitraq Jorgji
 *
 */
public class OnAlarmReceiver extends BroadcastReceiver {
	@Override
	public void onReceive(Context context, Intent intent) {
		WakefulIntentService.acquireStaticLock(context); //acquire a partial WakeLock

		//send notification, bundle intent with taskID
		NotificationHelper notification = new NotificationHelper();
		Bundle bundle = intent.getExtras();
		int id = bundle.getInt(Task.EXTRA_TASK_ID);
		TasksDataSource db = TasksDataSource.getInstance(context);
		Task task = db.getTask(id);

		if(task.hasFinalDateDue() || task.getPriority() == Task.URGENT){
			notification.sendPersistentNotification(context, task); // send basic notification
		} else {
			notification.sendBasicNotification(context, task); // send basic notification
		}

		context.startService(new Intent(context, TaskButlerService.class)); //start TaskButlerService
	}
}
</pre>
<p>The setAlarm method:<br />
NOTE:I use a method to create <a title="PendingIntent" href="http://developer.android.com/reference/android/app/PendingIntent.html" >PendingIntent</a> so my pending intents mach if the id passed in is the same, and because of of the FLAG_UPDATE_CURRENT the pending intent updates a possibly existing PendingIntent rather than duplicating.</p>
<pre class="brush: java; title: ; notranslate">
	/**
	 * Set a One Time Alarm using the taskID
	 * @param context
	 * @param id id of task to retrieve task from SQLite database
	 */
	public void setAlarm(Context context, int id){
		TasksDataSource db = TasksDataSource.getInstance(context);
		Task task = db.getTask(id);
		AlarmManager am=(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
		am.set(AlarmManager.RTC_WAKEUP, task.getDateDue(), getPendingIntent(context, id));
	}

	//get a PendingIntent
	PendingIntent getPendingIntent(Context context, int id) {
		Intent intent =  new Intent(context, OnAlarmReceiver.class)
		.putExtra(Task.EXTRA_TASK_ID, id);
		return PendingIntent.getBroadcast(context, id, intent, PendingIntent.FLAG_UPDATE_CURRENT);
	}
</pre>
<p>All of the source code for Task Butler can be found on <a title="Source Code on GitHub" href="https://github.com/CS-Worcester/CS499Summer2012" >GitHub</a>, including the above code.</p>
<p>Any questions shoot away in the comments bellow.</p>
<p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dhimitraq.wordpress.com/86/"><img decoding="async" alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dhimitraq.wordpress.com/86/" /></a> <img data-recalc-dims="1" loading="lazy" decoding="async" alt="" border="0" src="https://i0.wp.com/pixel.wp.com/b.gif?resize=1%2C1" width="1" height="1" /></p>

<p class="syndicated-attribution"><em>From the blog <a href="http://dhimitraq.wordpress.com">Live and Code » WSU CS</a> by <a href="https://cs.worcester.edu/author/0/" title="Read other posts by dhimitraq">dhimitraq</a></em> and used with permission of the author. All other rights reserved by the author.</p>]]></content:encoded>
					
		
		<enclosure url="http://2.gravatar.com/avatar/520270a1b47b277b8ee7fb185decef7b?s=96&#038;d=identicon&#038;r=G" length="0" type="" />

		<post-id xmlns="com-wordpress:feed-additions:1">1237</post-id>	</item>
		<item>
		<title>QA Testing</title>
		<link>http://jamescelona.wordpress.com/2012/11/27/qa-testing/</link>
		
		<dc:creator><![CDATA[jamescelona]]></dc:creator>
		<pubDate>Tue, 27 Nov 2012 18:39:23 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[WSU CS]]></category>
		<category><![CDATA[WSU_CS]]></category>
		<guid isPermaLink="false">http://jamescelona.wordpress.com/?p=133</guid>

					<description><![CDATA[The release&#160;candidate&#160;is ready to go and so starts the crazy amount of bug testing we will need to do. &#160;We need to assure we check all the edge cases and all the&#160;scenarios&#160;in which the user could break our app. &#160;It reminds me of the last time working before a Mahadev assignment is due and checking [&#8230;]<img alt="" border="0" src="http://pixel.wp.com/b.gif?host=jamescelona.wordpress.com&#38;blog=31908591&#38;post=133&#38;subd=jamescelona&#38;ref=&#38;feed=1" width="1" height="1">]]></description>
										<content:encoded><![CDATA[<p>The release candidate is ready to go and so starts the crazy amount of bug testing we will need to do.  We need to assure we check all the edge cases and all the scenarios in which the user could break our app.  It reminds me of the last time working before a Mahadev assignment is due and checking if anything could go wrong.  We need to make sure things like:</p>
<p>repeating alarms actually set to the proper date.</p>
<p>what happens if you delete a task right before it&#8217;s due, does the alarm still go off? What about deleting it before looking at the notification? (we corrected this one earlier)</p>
<p>What happens if you set something to go off in the past, how will our app handle it?</p>
<p>Do the notifications stack correctly if it repeats frequently?</p>
<p>Does the app do anything about SQL injection?</p>
<p>Does anything happen if a task has all the same information?</p>
<p>what about categories, does the name matter?</p>
<p>If you create a category in a different activity can you use it in addTaskActivity?</p>
<p>&#8212;&#8212;&#8212;</p>
<p>The list seems to be endless and ones where we need to create like 20 tasks to make sure everything works at that high of a load is up to Jon/Dhimitri since my VM doesn&#8217;t really play nice.</p>
<p>Questions like these are a great way to test to make sure the app is functional.  I&#8217;ll doing another write up about what google would like our app to.</p>
<p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jamescelona.wordpress.com/133/"><img decoding="async" alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jamescelona.wordpress.com/133/" /></a> <img data-recalc-dims="1" loading="lazy" decoding="async" alt="" border="0" src="https://i0.wp.com/pixel.wp.com/b.gif?resize=1%2C1" width="1" height="1" /></p>

<p class="syndicated-attribution"><em>From the blog <a href="http://jamescelona.wordpress.com">jamescelona » WSU CS</a> by <a href="https://cs.worcester.edu/author/0/" title="Read other posts by jamescelona">jamescelona</a></em> and used with permission of the author. All other rights reserved by the author.</p>]]></content:encoded>
					
		
		<enclosure url="http://1.gravatar.com/avatar/7c2c556c2436ff6edb3e01c5e64f6780?s=96&#038;d=identicon&#038;r=G" length="0" type="" />

		<post-id xmlns="com-wordpress:feed-additions:1">1233</post-id>	</item>
		<item>
		<title>Library’s TV is Very Useful</title>
		<link>http://dhimitraq.wordpress.com/2012/11/26/librarys-tv-is-very-useful/</link>
		
		<dc:creator><![CDATA[dhimitraq]]></dc:creator>
		<pubDate>Mon, 26 Nov 2012 23:32:18 +0000</pubDate>
				<category><![CDATA[WSU CS]]></category>
		<guid isPermaLink="false">http://dhimitraq.wordpress.com/?p=70</guid>

					<description><![CDATA[Who would have thought our Library&#8217;s TV could be so useful for group projects involving programming. James had an idea to bring a HDMI cable in to allow us to show code each other easier; we don&#8217;t have to crowd behind one person&#8217;s laptop, this was a lot more comfortable. The meeting went longer than [&#8230;]<img alt="" border="0" src="http://pixel.wp.com/b.gif?host=dhimitraq.wordpress.com&#38;blog=31909135&#38;post=70&#38;subd=dhimitraq&#38;ref=&#38;feed=1" width="1" height="1">]]></description>
										<content:encoded><![CDATA[<p>Who would have thought our Library&#8217;s TV could be so useful for group projects involving programming. James had an idea to bring a HDMI cable in to allow us to show code each other easier; we don&#8217;t have to crowd behind one person&#8217;s laptop, this was a lot more comfortable. The meeting went longer than expected, however it helped us set the direction we wanted to go with the app, as well as debug, and write some code.</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" src="http://dhimitraq.files.wordpress.com/2012/11/photo2.jpg?w=300&#038;h=224&#038;fit=300%2C224&#038;resize=300%2C224" alt="" title="What a useful TV screen" width="300" height="224" class="alignnone size-medium wp-image-73" /></p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" src="http://dhimitraq.files.wordpress.com/2012/11/photo1.jpg?w=300&#038;h=225&#038;fit=300%2C225&#038;resize=300%2C225" alt="" title="photo1" width="300" height="225" class="alignnone size-medium wp-image-72" /></p>
<p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dhimitraq.wordpress.com/70/"><img decoding="async" alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dhimitraq.wordpress.com/70/" /></a> <img data-recalc-dims="1" loading="lazy" decoding="async" alt="" border="0" src="https://i0.wp.com/pixel.wp.com/b.gif?resize=1%2C1" width="1" height="1" /></p>

<p class="syndicated-attribution"><em>From the blog <a href="http://dhimitraq.wordpress.com">Live and Code » WSU CS</a> by <a href="https://cs.worcester.edu/author/0/" title="Read other posts by dhimitraq">dhimitraq</a></em> and used with permission of the author. All other rights reserved by the author.</p>]]></content:encoded>
					
		
		<enclosure url="http://2.gravatar.com/avatar/520270a1b47b277b8ee7fb185decef7b?s=96&#038;d=identicon&#038;r=G" length="0" type="" />
<enclosure url="http://dhimitraq.files.wordpress.com/2012/11/photo2.jpg?w=300" length="0" type="" />
<enclosure url="http://dhimitraq.files.wordpress.com/2012/11/photo1.jpg?w=300" length="0" type="" />

		<post-id xmlns="com-wordpress:feed-additions:1">1235</post-id>	</item>
	</channel>
</rss>
