<?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>A Sling and a Stone</title>
	<atom:link href="http://www.aslingandastone.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aslingandastone.com</link>
	<description>Bringing down the Giant</description>
	<lastBuildDate>Mon, 16 Apr 2012 14:56:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Foxy Boxy Update &#8211; v1.0.4</title>
		<link>http://www.aslingandastone.com/2012/foxy-boxy-1-0-4/</link>
		<comments>http://www.aslingandastone.com/2012/foxy-boxy-1-0-4/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 00:58:52 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Changelog]]></category>
		<category><![CDATA[Foxy Boxy]]></category>
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://www.aslingandastone.com/?p=311</guid>
		<description><![CDATA[Foxy Boxy v1.0.4 brings several bug fixes and a few new features to Foxy Boxy! Changes from v1.0.2 include: New Features/Changes: [Added] You will now be notified if someone joins an online game that you&#8217;ve started [Added] Facebook friend invitations &#8230; <a href="http://www.aslingandastone.com/2012/foxy-boxy-1-0-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Foxy Boxy v1.0.4 brings several bug fixes and a few new features to Foxy Boxy!</p>
<p>Changes from v1.0.2 include:</p>
<p><strong>New Features/Changes:</strong><br />
[Added] You will now be notified if someone joins an online game that you&#8217;ve started<br />
[Added] Facebook friend invitations working<br />
[Added] A dialog to make it more clear when you&#8217;re waiting for an opponent to join a Random Online Game<br />
[Changed] Clicking a Game Update status bar notification will now take you directly to the game that&#8217;s been updated<br />
[Changed] User given a link to the view game results in the in-game game over dialog<br />
[Changed] Game Results now viewable from an out-of-app notification</p>
<p><strong>Core Bug Fixes:</strong><br />
[Fixed] Scoring in local play now is working properly<br />
[Fixed] Default colors for Player One and Guest now properly set to blue and orange<br />
[Fixed] Custom game sizes now working properly at the start of a local game or invitation game<br />
[Fixed] Notifications properly default to displaying in-game notifications<br />
[Fixed] login_dialog.xml fixed to allow editing with the GUI editor<br />
[Fixed] Player one given a default name when not logged in<br />
[Fixed] Player two default name capitalized, now Guest<br />
[Fixed] Several notifications fixed that were duplicates<br />
[Fixed] Game grid selection sizes (defaulted to 5 dots)</p>
<p><strong>Backend:</strong><br />
[Changed] AdMob updated to latest version to fix some errors in previous versions<br />
[Changed] targetSdkVersion set to 13 as a requirement of the new AdMob library. Shouldn&#8217;t create any problems.<br />
[Changed] Removed unused imports in several files to clean up warnings<br />
[Fixed] An Android Lint error in Proguard.cfg<br />
[Changed] Added graphics for mdpi and hdpi on the welcome screen<br />
[Fixed] The start local game on the welcome screen displaying the incorrect size grid size by default (made it match the invite a friend grid selection dialog)<br />
[Changed] Slight modification to the layout of the welcome screen on all devices so as to not have a scroll view<br />
[Added] jsonObject string to php (get_stats.php) to include email in stats screen</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aslingandastone.com/2012/foxy-boxy-1-0-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Foxy Boxy BETA Release!</title>
		<link>http://www.aslingandastone.com/2011/foxy-boxy-beta-release/</link>
		<comments>http://www.aslingandastone.com/2011/foxy-boxy-beta-release/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 16:40:57 +0000</pubDate>
		<dc:creator>cam</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Foxy Boxy]]></category>
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://www.aslingandastone.com/?p=289</guid>
		<description><![CDATA[Be a foxy fox and steal as many boxy boxes as you can. By using power pieces, bonus boxes and crafty cunning you can outfox your opponent. Beware of bummer boxes though, as those will make you lose precious points. &#8230; <a href="http://www.aslingandastone.com/2011/foxy-boxy-beta-release/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Be a foxy fox and steal as many boxy boxes as you can. By using power pieces, bonus boxes and crafty cunning you can outfox your opponent. Beware of bummer boxes though, as those will make you lose precious points.</p>
<p>Foxy Boxy expands on the familiar game of Dots and Boxes to provide a fluid multiplayer experience for hours of fun!</p>
<p>FEATURES</p>
<div id="attachment_290" class="wp-caption alignright" style="width: 261px"><a href="https://market.android.com/details?id=com.aslingandastone.boxgame"><img class="size-full wp-image-290 " title="Android Market Direct Link" src="http://www.aslingandastone.com/assets/foxy_boxy_qr.png" alt="Foxy Boxy QR Code" width="251" height="253" /></a><p class="wp-caption-text">Android Market Direct Link</p></div>
<ul>
<li>Familiar &#8220;Dots and Boxes&#8221; style game with some unique strategic twists</li>
</ul>
<ul>
<li>Notifications make for quick, easy play</li>
</ul>
<ul>
<li>Play up to 50 games simultaneously</li>
</ul>
<ul>
<li>Invite friends or play random opponents</li>
</ul>
<ul>
<li>Pass and Play local multiplayer</li>
</ul>
<ul>
<li>Optimized for play on tablets</li>
</ul>
<ul>
<li>Gain experience and Level up</li>
</ul>
<p>BETA &#8211; We would love your feedback, bug reports, and suggestions to make the game more enjoyable for you to play! Just email <a href="mailto:support@aslingandastone.com" target="_blank">support@aslingandastone.com</a>. Thanks!</p>
<p>Questions/comments/bugs/feature requests?  Please drop a comment below!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aslingandastone.com/2011/foxy-boxy-beta-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drawing Evenly Distributed Points on an Ellipse in Flash AS3</title>
		<link>http://www.aslingandastone.com/2011/drawing-evenly-distributed-points-on-an-ellipse-in-flash-as3/</link>
		<comments>http://www.aslingandastone.com/2011/drawing-evenly-distributed-points-on-an-ellipse-in-flash-as3/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 16:46:16 +0000</pubDate>
		<dc:creator>cam</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[distributed points]]></category>
		<category><![CDATA[ellipse]]></category>
		<category><![CDATA[equations]]></category>
		<category><![CDATA[evenly spaced points]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[integral]]></category>

		<guid isPermaLink="false">http://www.aslingandastone.com/?p=264</guid>
		<description><![CDATA[I recently had a request from a friend on how to draw evenly distributed points on an ellipse in Flash.  So I did some research and basically found that all articles/posts/whatever talk about the same thing.  See here as an example. &#8230; <a href="http://www.aslingandastone.com/2011/drawing-evenly-distributed-points-on-an-ellipse-in-flash-as3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently had a request from a friend on how to draw evenly distributed points on an ellipse in Flash.  So I did some research and basically found that all articles/posts/whatever talk about the same thing.  See <a title="Simple Algorithm for Calculating Evenly Distributed Point on an Ellipse" href="http://gamedev.stackexchange.com/questions/1692/what-is-a-simple-algorithm-for-calculating-evenly-distributed-points-on-an-ellip" target="_blank">here</a> as an example.</p>
<h1>Goal</h1>
<p>Find a way to evenly distribute points on an ellipse using Flash AS3.</p>
<h1>Step 1: Grab Some Classes</h1>
<p>I used <a title="Senocular Transform Tool" href="http://www.senocular.com/flash/actionscript/?file=ActionScript_3.0/com/senocular/display/TransformTool.as">Senocular&#8217;s TransformTool</a> and <a title="AS3 Math Library SVN Checkout" href="http://code.google.com/p/as3mathlib/source/checkout" target="_blank">AS3 Math Library</a> to get started.</p>
<h1>Step 2: Learn About Elliptical Integrals of the Second Kind</h1>
<p>I&#8217;m not going to go into the math detail in this tutorial as I&#8217;m sure most people viewing this would rather have code then piles of calculus.  If you are interested in the math behind the functionality here, please <a title="Elliptical Integrals of the Second Kind" href="http://mathworld.wolfram.com/EllipticIntegraloftheSecondKind.html" target="_blank">check out this site</a>.</p>
<h1>Step 3: Code the &#8220;important&#8221; Do/While Loop</h1>
<p>Basically, the code below is all you need to get things up and running.  Notice though that I&#8217;m using <a title="Simpson's Rule" href="http://en.wikipedia.org/wiki/Simpson's_rule" target="_blank">Simpson&#8217;s Rule</a> to calculate the integral.  Please checkout the classes above to integrate this.</p>
<pre class="brush: plain; title: ; notranslate">
private function iterateArcAngle():void {
			var targetArcLength = (targetArcAngle(Math.PI)/numDots);

			var nextInput:Number = 0;
			var degreeLimit:Number = .01;
			var degreeCounter:Number = 0;
			var arcLength = 0;

			for(var i:int = 0; i &lt;= numDots; i++) {
				degreeCounter = 0;
				arcLength = 0;
				do {
					degreeCounter+=degreeLimit;
					arcLength = calculateArcAngle(0, degreeCounter);
				}
				while(arcLength &lt; targetArcLength*(i));

				nextInput = degreeCounter;

				dotArray[i].x = (radiusX * Math.cos(nextInput)) + fieldsOffset;
				dotArray[i].y = (-radiusY * Math.sin(nextInput)) + fieldsOffset;
			}
		}

private function calculateArcAngle(iteration:int, angle:Number):Number {

			var f:Function = function(x:Number):Number {
	       	 	return Math.sqrt(
								 (radiusX*Math.sin(x))*
								 (radiusX*Math.sin(x)) +
								 (radiusY*Math.cos(x))*
								 (radiusY*Math.cos(x))
								 );
			}
			var returnNum:Number = integralCalculator.simpson(f, iteration, angle, 4);
			return returnNum;
		}
</pre>
<h1>Step 4: Test the Demo</h1>
<p>Here&#8217;s the reason you came to this article anyway. Check out this <strong><a title="Ellipse Testing" href="http://www.aslingandastone.com/dev/as3/EllipseTesting.swf" target="_blank">demo</a></strong> and/or just <strong><a title="Ellipse Testing Source" href="http://www.aslingandastone.com/dev/as3/EllipseTesting.zip" target="_blank">download the source code</a></strong>.</p>
<h1>Conclusion</h1>
<p>I&#8217;d suggest learning more about math.  Math knowledge when writing any code is essential, and it&#8217;s also fun <img src='http://www.aslingandastone.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.aslingandastone.com/2011/drawing-evenly-distributed-points-on-an-ellipse-in-flash-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Reset Root Password in Drupal 7 with FTP and phpMyAdmin</title>
		<link>http://www.aslingandastone.com/2011/how-to-reset-root-password-in-drupal-7-with-ftp-and-phpmyadmin/</link>
		<comments>http://www.aslingandastone.com/2011/how-to-reset-root-password-in-drupal-7-with-ftp-and-phpmyadmin/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 16:59:00 +0000</pubDate>
		<dc:creator>cam</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[drupal 7]]></category>
		<category><![CDATA[password reset]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[user_hash_password]]></category>

		<guid isPermaLink="false">http://aslingandastone.com/?p=218</guid>
		<description><![CDATA[I recently was working on a client website and had a major problem. I forgot the root level password! Uh-ohz! So what to do? Well let&#8217;s just jump in and set a new password with phpMyAdmin&#8230;. only that&#8217;s not so &#8230; <a href="http://www.aslingandastone.com/2011/how-to-reset-root-password-in-drupal-7-with-ftp-and-phpmyadmin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently was working on a client website and had a major problem. I forgot the root level password! Uh-ohz! So what to do? Well let&#8217;s just jump in and set a new password with phpMyAdmin&#8230;. only that&#8217;s not so simple.  Drupal 7 has a custom password hash.</p>
<h1>Goal</h1>
<p>Find a way to reset my root level password in Drupal 7 with only access to phpMyAdmin and ftp.</p>
<h1>Step 1: Write and Upload the PHP File</h1>
<p>Here is the basic php file that will solve your problem:</p>
<pre class="brush: java; title: ; notranslate">
&lt;?php
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

require_once 'includes/password.inc';
echo user_hash_password('NEW_TEMP_PASSWORD');

die();
menu_execute_active_handler(); ?&gt;
</pre>
<p>The only thing you need to change here is the user_hash_password(&#8216;NEW_TEMP_PASSWORD&#8217;); Just set &#8216;NEW_TEMP_PASSWORD&#8217; to whatever password you&#8217;d like. Just make sure to reset your password once you regain access to your Drupal 7 admin panel.<br />
Upload this file to your Drupal 7 php root.</p>
<h1>Step 2: Go to PHP File and Copy the Hash</h1>
<p>Open a browser and hit your file.  For instance  http://example.com/pass_reset.php</p>
<p>So out comes the Drupal user_hash_password -<strong> $S$C6x2r.aW5Nkg7st6/u.IKWjTerHXscjPtu4spwhCVZlP89UKcbb/</strong></p>
<p>(that&#8217;s the hash for NEW_TEMP_PASSWORD).</p>
<p>So if you didn&#8217;t want to go through the hassle of making your own PHP file you could just take the hash i&#8217;ve provided. Just keep in mind that your site won&#8217;t be secure until you change your password once you&#8217;re back in the Drupal admin panel.</p>
<p><strong>Copy the hashed text.</strong></p>
<h1>Step 3: Open phpMyAdmin and Reset the Password</h1>
<p>Navigate to your phpMyAdmin (likely in your control panel online somewhere).</p>
<p>Then browse the User table for the Root user and it will look something like this:</p>
<div id="attachment_224" class="wp-caption alignnone" style="width: 310px"><a href="http://aslingandastone.com/?attachment_id=224" rel="attachment wp-att-224"><img class="size-medium wp-image-224" title="phpMyAdmin Drupal User Table" src="http://aslingandastone.com/wp-content/uploads/2011/07/hashed_phpmyadmin-300x211.jpg" alt="Drupal User Table" width="300" height="211" /></a><p class="wp-caption-text">Drupal User Table</p></div>
<p>Take the copied hashed text and paste it into the pass field of the Root user and hit &#8220;Go&#8221;.</p>
<h1>Step 4: Try Logging into your Drupal Admin Panel</h1>
<p>If everything went as planned you will now be able to login to your Drupal Admin with the password we&#8217;ve hashed out.  Make sure to use the password &#8220;NEW_TEMP_PASSWORD&#8221; and not the hash &#8220;$S$C6x2r.aW5Nkg7st6/u.IKWjTerHXscjPtu4spwhCVZlP89UKcbb/&#8221;</p>
<p>Once you&#8217;ve regained access, make sure to go and change your Root password right away, as to not let anyone else get in there.</p>
<h1>Step 5: Remove the Custom Hash PHP File</h1>
<p>You no longer need the custom php file on your server, so it&#8217;s best to remove it.</p>
<h1>Conclusion</h1>
<p>It&#8217;s not difficult to regain access to your Drupal instance.  Just take the time to do things right and don&#8217;t forget your passwords in the first place. <img src='http://www.aslingandastone.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.aslingandastone.com/2011/how-to-reset-root-password-in-drupal-7-with-ftp-and-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Automatically Mute Microphone on Keyboard Activity with AutoHotkey</title>
		<link>http://www.aslingandastone.com/2011/automatically-mute-microphone-on-keyboard-activity-with-autohotkey/</link>
		<comments>http://www.aslingandastone.com/2011/automatically-mute-microphone-on-keyboard-activity-with-autohotkey/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 11:35:44 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[autohotkey]]></category>
		<category><![CDATA[mechanical keyboard]]></category>
		<category><![CDATA[system automation]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://aslingandastone.com/?p=179</guid>
		<description><![CDATA[I&#8217;ve recently upgraded to a mechanical keyboard, and I have to say I&#8217;m an addict. The tactile response makes typing on a standard rubber-dome feel like mashing on jello. One problem, however, is that when I&#8217;m in a Google Talk/Skype &#8230; <a href="http://www.aslingandastone.com/2011/automatically-mute-microphone-on-keyboard-activity-with-autohotkey/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently upgraded to a mechanical keyboard, and I have to say I&#8217;m an addict. The tactile response makes typing on a standard rubber-dome feel like mashing on jello. One problem, however, is that when I&#8217;m in a Google Talk/Skype session, typing on the keyboard can be heard through my microphone with the subtlety of an AK-47.</p>
<p><em>&#8220;Yeah, sure, let me look that up here qui&#8230;CLACK CLACK CLACK CLACK CLACK&#8221;</em></p>
<h1>Goal</h1>
<p>Find a free, quick and lightweight way to automatically mute my microphone when I start typing on the keyboard. My solution is an AutoHotkey script that does exactly that.</p>
<p>While this script is designed to mitigate the clicking passed through a mechanical keyboard and desktop microphone, I think it would have similar benefit with laptops and a built-in mic, as typing on the laptop can be loud through the mic in my experience.</p>
<h1>Prerequisites/Before You Begin</h1>
<p>OS: Windows 7/Windows Vista<br />
Skills: Ability to unzip files and navigate file system<br />
Difficulty: Medium</p>
<p>The AutoHotkey libraries I use in my solution depends on a Vista or Windows 7 workstation. In order to make this work for Windows XP you would need to use an XP-compatible volume library, and I unfortunately don&#8217;t have an XP box to find and test that.</p>
<p>You will have to edit the AutoHotkey script I provide in order to make it work for your specific machine, so AutoHotkey or general scripting experience would be extremely helpful. I will, however, try to make things easy for anyone not familiar with AutoHotkey, and feel free to post any questions in the comments.</p>
<h1>Downloads</h1>
<p>The following is all the software you will need to complete this project. Note that you will have to edit the script MuteOnKeypress to accommodate your specific microphone, as I will describe in this post.</p>
<ol>
<li>AutoHotkey &#8211; <a href="http://www.autohotkey.net/~Lexikos/AutoHotkey_L/AutoHotkey_L_Install.exe">Installer for AutoHotkey_L</a> (latest version)</li>
<li><a href="http://www.autohotkey.net/~Lexikos/VA/VA21.zip">Vista Audio Control Functions</a> for AutoHotkey &#8211; library for AutoHotkey that lets us use volume controls on a Vista or Windows 7 machine</li>
<li><a href="http://www.aslingandastone.com/assets/CaptureDeviceList.zip">CaptureDeviceList</a> &#8211; AutoHotkey script (zipped) for discovering what microphone our system uses, based off <a href="http://www.autohotkey.net/~Lexikos/VA/topology2.ahk">topology2.ahk</a></li>
<li><a href="http://www.aslingandastone.com/assets/MuteOnKeypress.zip">MuteOnKeypress</a> &#8211; AutoHotkey script (zipped) that we will run whenever we want the microphone to mute when there&#8217;s keyboard activity</li>
</ol>
<h1>Step 1: Download and Install AutoHotkey</h1>
<p>Install AutoHotkey from file here: <a href="http://www.autohotkey.net/~Lexikos/AutoHotkey_L/AutoHotkey_L_Install.exe">Installer for AutoHotkey_L</a>, or visit the download page at <a href="http://www.autohotkey.com/download/">http://www.autohotkey.com/download/</a> and choose &#8220;Installer for AutoHotkey_L.&#8221;</p>
<h1>Step 2: Install the Vista Audio Control Functions</h1>
<p>Download the Vista Audio Control Functions from this <a href="http://www.autohotkey.net/~Lexikos/VA/VA21.zip">direct link</a>, or visit the forum page <a href="http://www.autohotkey.com/forum/viewtopic.php?t=23792">here</a> and &#8220;Download v2.1 with documentation.&#8221;</p>
<p>Once downloaded, unzip the VA21.zip to a folder, which should leave you with two files: VA.ahk and VA.html.  The HTML file contains the VA manual, but VA.ahk is what we&#8217;re interested in.</p>
<p>Next, find the installation directory of AutoHotkey. This should be under My Computer -&gt; C:/Program Files/AutoHotkey. Once there, create a new folder called Lib. Open the newly-created Lib folder and copy the VA.ahk file into there.</p>
<p>What we&#8217;ve done is moved the Vista Audio Control Functions library into the AutoHotkey Lib folder so that AutoHotkey knows where to look for the volume control functions when our scripts need them.</p>
<h1>Step 3: Verify Vista Audio Control Functions</h1>
<p>Next you will want to download and unzip the <a href="http://www.aslingandastone.com/assets/CaptureDeviceList.zip">CaptureDeviceList</a> AutoHotkey file.  When you execute the file CaptureDeviceList.ahk, you should see something similar to this:</p>
<div id="attachment_191" class="wp-caption alignnone" style="width: 397px"><a href="http://www.aslingandastone.com/product-detail/113-autosave/" rel="attachment wp-att-191"><img class="size-full wp-image-191" title="CaptureDeviceListCorrect" src="http://aslingandastone.com/wp-content/uploads/2011/06/CaptureDeviceListCorrect.png" alt="" width="387" height="606" /></a><p class="wp-caption-text">CaptureDeviceList when working properly</p></div>
<p>If, however, you see something like this:</p>
<div id="attachment_192" class="wp-caption alignnone" style="width: 524px"><a href="http://www.aslingandastone.com/product-detail/113-revision-2/" rel="attachment wp-att-192"><img class="size-full wp-image-192" title="CaptureDeviceListVAError" src="http://aslingandastone.com/wp-content/uploads/2011/06/CaptureDeviceListVAError.png" alt="" width="514" height="265" /></a><p class="wp-caption-text">CaptureDeviceList when VA is not in the proper directory</p></div>
<p>That means that you don&#8217;t have the Vista Audio Control Functions file VA.ahk in the C:/Program Files/AutoHotkey/Lib folder like it should be (see Step 2).  If you can&#8217;t even get CaptureDeviceList.ahk to run, you most likely have an AutoHotkey installation error.</p>
<p>Once you can successfully see the device list, we&#8217;re ready to move on to the last step.</p>
<h1>Step 4: Run MuteOnKeypress</h1>
<p>Download and unzip <a href="http://www.aslingandastone.com/assets/MuteOnKeypress.zip">MuteOnKeypress</a>. Run script by double-clicking on the .ahk file and an AutoHotkey icon should remain in your system tray as long as the script is running.  No editing of the MuteOnKeypress.ahk file should be necessary.</p>
<p>Now whenever there is keyboard activity, the system will mute the microphone for 1 second from the last keypress.</p>
<p>The easiest way I found to test the script is to open Sound Recorder (Start -&gt; All Programs -&gt; Accessories -&gt; Sound Recorder) and see what the green bar looks like when I talk then start typing. If everything is working properly, the bar should drop to zero once you start typing, then pick up again after not typing for more than one second (as long as you&#8217;re continually talking or blowing on the mic).</p>
<h1>Conclusion</h1>
<p>I&#8217;ve found in my tests that the first click of the keyboard is still heard over the mic before the system mutes the microphone. However, this is a huge, huge improvement from the loud clicking that was previously passed over the voice chat session when I typed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aslingandastone.com/2011/automatically-mute-microphone-on-keyboard-activity-with-autohotkey/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Dynamically Changing Views with XML Layouts</title>
		<link>http://www.aslingandastone.com/2011/dynamically-changing-android-views-with-xml-layouts/</link>
		<comments>http://www.aslingandastone.com/2011/dynamically-changing-android-views-with-xml-layouts/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 22:46:56 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[dynamic changing views]]></category>
		<category><![CDATA[xml layouts]]></category>

		<guid isPermaLink="false">http://aslingandastone.com/?p=61</guid>
		<description><![CDATA[Dynamically changing Android views that are defined in code is fairly trivial &#8211; you already have references to the views in your class and you created them once. Changing a view created in code can be as simple as calling &#8230; <a href="http://www.aslingandastone.com/2011/dynamically-changing-android-views-with-xml-layouts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Dynamically changing Android views that are defined in code is fairly trivial &#8211; you already have references to the views in your class and you created them once. Changing a view created in code can be as simple as calling <tt>viewGroup.removeAllViews()</tt>. However, changing a view that&#8217;s defined completely as an XML layout can be a bit trickier.</p>
<h1>Goal</h1>
<p>The project I&#8217;m working on has a High Scores activity that, among other things, presents an EditText field for a player to enter his name when a game is done and submit his score.  Once the name is submitted, I want to remove the TextView label, the EditText field and the Submit Button, and replace them with a &#8220;New Game&#8221; button.</p>
<h1>Justification</h1>
<p>Because layouts can be created either in XML or in code, you could probably make do without ever having to do dynamic XML layout loading. That being said, there are some clear advantages as to why I think one may want to do so:</p>
<ol>
<li>Code cleanliness.  Doing anything more than basic layouts in code can get very messy, very fast.</li>
<li>Code re-use.  It&#8217;s extremely easy to inflate an XML layout into a specified view with one or two lines of code</li>
<li>Performance.  Creating the objects necessary for an in-code layout leads to unnecessary garbage collection.  As per the Android <a href="http://developer.android.com/guide/practices/design/performance.html">Designing for Performance</a> article, &#8220;avoid creating short-term temporary objects if you can.&#8221;</li>
<li>Attribute availability.  Defining Views in an XML layout exposes attributes that are not always available by object methods.</li>
</ol>
<p>Possible disadvantages:</p>
<ol>
<li>It make take more time to do an XML layout versus defining the layout in code, especially if there are only one or two interface elements that need to be changed.</li>
</ol>
<p>After thinking about what I want to accomplish, it makes sense for me to use XML layouts for the dynamic view changes I need.  It would be more than just a few lines of code to do my layout changes without utilizing XML layouts.</p>
<h1>Planning</h1>
<p>My plan for doing the layouts in XML is to create three separate layouts:</p>
<ol>
<li><tt>score_submit.xml</tt> that will contain the label, EditText field, and &#8220;Submit&#8221; Button</li>
<li><tt>score_submitted.xml</tt> that will contain the &#8220;New Game&#8221; button and possibly an &#8220;End Game&#8221; button &#8211; this is what we want to be displayed when the Submit button from the previous layout is clicked</li>
<li>The main <tt>score.xml</tt> that will contain the layout of the activity and include one of the other two layouts at a time</li>
</ol>
<h1>Creating XML Layouts</h1>
<p>First, I created the <tt>score.xml</tt> layout.  Add a few elements, build, run.  Add a few more, build, run.  The resulting code is as follows:</p>
<p><strong><tt>score.xml</tt></strong></p>
<pre class="brush: xml; highlight: [36]; title: ; notranslate">
&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?--&gt;
xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
android:orientation=&quot;vertical&quot;
android:background=&quot;@drawable/game_bg&quot;
android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;fill_parent&quot;&gt;

android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;20dp&quot; /&gt;

android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;1px&quot;
android:background=&quot;#000&quot;
android:paddingTop=&quot;8dp&quot; /&gt;

android:id=&quot;@+id/score_result&quot;
android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;50dp&quot;
android:gravity=&quot;center&quot;
android:textSize=&quot;30sp&quot;
android:textColor=&quot;@color/gameTitleColor&quot;
android:background=&quot;@drawable/translucent_blue&quot;
android:textStyle=&quot;bold&quot;
android:text=&quot;Score: 205&quot; /&gt;

android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;1px&quot;
android:background=&quot;#000&quot;
android:paddingBottom=&quot;8dp&quot; /&gt;

android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;1px&quot;
android:background=&quot;#000&quot; /&gt;

android:id=&quot;@+id/lbl_overview&quot;
android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;30dp&quot;
android:textSize=&quot;15sp&quot;
android:textColor=&quot;@color/gameTitleColor&quot;
android:background=&quot;@drawable/translucent_blue&quot;
android:text=&quot;High Scores&quot;
android:gravity=&quot;center&quot; /&gt;

android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;1px&quot;
android:background=&quot;#000&quot; /&gt;

xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
android:orientation=&quot;horizontal&quot;
android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;wrap_content&quot;
android:paddingLeft=&quot;8dp&quot;
android:paddingRight=&quot;8dp&quot;
android:paddingTop=&quot;10dp&quot;
android:paddingBottom=&quot;10dp&quot;
android:gravity=&quot;center&quot;&gt;

&lt;button&gt;&lt;/button&gt; android:id=&quot;@+id/by_ref_score&quot;
android:layout_height=&quot;wrap_content&quot;
android:layout_width=&quot;wrap_content&quot;
android:paddingLeft=&quot;8dp&quot;
android:paddingRight=&quot;8dp&quot;
android:text=&quot;By Reference&quot; /&gt;

&lt;button&gt;&lt;/button&gt; android:id=&quot;@+id/by_verse_score&quot;
android:layout_height=&quot;wrap_content&quot;
android:layout_width=&quot;wrap_content&quot;
android:paddingLeft=&quot;8dp&quot;
android:paddingRight=&quot;8dp&quot;
android:text=&quot;By Verse&quot; /&gt;

&lt;button&gt;&lt;/button&gt; android:id=&quot;@+id/fitb_score&quot;
android:layout_height=&quot;wrap_content&quot;
android:layout_width=&quot;wrap_content&quot;
android:paddingLeft=&quot;8dp&quot;
android:paddingRight=&quot;8dp&quot;
android:text=&quot;Fill in the Blanks&quot; /&gt;
</pre>
<p>If that looks like a lot of code, it&#8217;s really not. Most of the generic Views are used for spacing or the 1-pixel lines around the colored TextViews. Here&#8217;s what the layout looks like when added to an activity:</p>
<p><a href="http://www.aslingandastone.com/2011/dynamically-changing-android-views-with-xml-layouts/dynamiclayouts00/" rel="attachment wp-att-53"><img class="alignnone size-medium wp-image-53" title="dynamiclayouts00" src="http://aslingandastone.com/wp-content/uploads/2010/11/dynamiclayouts00-300x181.png" alt="" width="300" height="181" /></a></p>
<p>Between the Score and the High Scores headers is where I want my submit name section to go. Since I want the submit name layout to be displayed first, I created that XML layout next:</p>
<p><strong><tt>score_submit.xml</tt></strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?--&gt;
xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
android:orientation=&quot;horizontal&quot;
android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;wrap_content&quot;
android:paddingLeft=&quot;8dp&quot;
android:paddingRight=&quot;8dp&quot;
android:paddingTop=&quot;20dp&quot;
android:paddingBottom=&quot;20dp&quot;
android:gravity=&quot;center&quot;&gt;

android:id=&quot;@+id/lbl_submit_name&quot;
android:layout_width=&quot;wrap_content&quot;
android:layout_height=&quot;wrap_content&quot;
android:textSize=&quot;15sp&quot;
android:textColor=&quot;@color/gameTitleColor&quot;
android:text=&quot;Name:&quot; /&gt;

android:id=&quot;@+id/txt_submit_name&quot;
android:layout_width=&quot;wrap_content&quot;
android:layout_height=&quot;wrap_content&quot;
android:layout_weight=&quot;1&quot;
android:background=&quot;@android:drawable/editbox_background&quot; /&gt;

&lt;button&gt;&lt;/button&gt; android:id=&quot;@+id/submit_score&quot;
android:layout_height=&quot;wrap_content&quot;
android:layout_width=&quot;wrap_content&quot;
android:paddingLeft=&quot;8dp&quot;
android:paddingRight=&quot;8dp&quot;
android:text=&quot;Submit&quot; /&gt;
</pre>
<p>Loading this in the <tt>score.xml</tt> is easier than one might think. I used the Android developer article <a href="http://developer.android.com/resources/articles/layout-tricks-reuse.html">Creating Reusable UI Components</a> for the information. All I had to do is add the following line where I wanted to include the <tt>score_submit.xml</tt>:</p>
<pre class="brush: xml; title: ; notranslate">
android:id=&quot;@+id/score_name_entry&quot;
layout=&quot;@layout/score_submit&quot; /&gt;
</pre>
<p>Here&#8217;s the resulting output:</p>
<p><a href="http://www.aslingandastone.com/acf/release-date/55-revision/" rel="attachment wp-att-56"><img class="alignnone size-medium wp-image-56" title="dynamiclayouts01" src="http://aslingandastone.com/wp-content/uploads/2010/11/dynamiclayouts01-300x274.png" alt="" width="300" height="274" /></a></p>
<p>For the last XML layout I put together <tt>score_submitted.xml</tt> as follows:</p>
<p><strong><tt>score_submitted.xml</tt></strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?--&gt;
xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
android:orientation=&quot;horizontal&quot;
android:layout_width=&quot;fill_parent&quot;
android:layout_height=&quot;wrap_content&quot;
android:paddingLeft=&quot;8dp&quot;
android:paddingRight=&quot;8dp&quot;
android:gravity=&quot;center&quot;&gt;

&lt;button&gt;&lt;/button&gt; android:id=&quot;@+id/new_game&quot;
android:layout_height=&quot;wrap_content&quot;
android:layout_width=&quot;wrap_content&quot;
android:paddingLeft=&quot;8dp&quot;
android:paddingRight=&quot;8dp&quot;
android:text=&quot;New Game&quot; /&gt;
</pre>
<p>Right now it only has one button (I may add more in the future) but this will do for the sake of the article.</p>
<h1>Dynamically switching layout in code</h1>
<p>So we have all three XML layouts and running the program at this point produces the screenshot above. Now to load the <tt>score_submitted.xml</tt> when the &#8220;Submit&#8221; button from <tt>score_submit.xml</tt> is pressed.</p>
<p>I begin by getting a reference to the &#8220;Submit&#8221; button and creating an onClickListener for it in the activity onCreate:</p>
<pre class="brush: java; title: ; notranslate">
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.score);

// Watch for button clicks.
Button button = (Button)findViewById(R.id.submit_score);
button.setOnClickListener(submitListener);
}

private OnClickListener submitListener = new OnClickListener() {
public void onClick(View v) {

}
};
</pre>
<p>Within the OnClickListener three things need to happen: I need to get a reference to the score_name_entry of <tt>score.xml</tt>, remove the views in that layout, and load the <tt>score_submitted.xml</tt> layout into it.</p>
<p>Below is the resulting code, which should be commented enough to be self-explanatory:</p>
<pre class="brush: java; title: ; notranslate">
// Get a reference to the score_name_entry object in score.xml
LinearLayout submitScoreLayout = (LinearLayout)findViewById(R.id.score_name_entry);
submitScoreLayout.removeAllViews();

// Create new LayoutInflater - this has to be done this way, as you can't directly inflate an XML without creating an inflater object first
LayoutInflater inflater = getLayoutInflater();
submitScoreLayout.addView(inflater.inflate(R.layout.score_submitted, null));

// The listener for the second button also has to be defined here as opposed to in the onCreate, as the score_submitted.xml isn't loaded yet at activity first run
Button button = (Button)findViewById(R.id.new_game);
button.setOnClickListener(newGameListener);
</pre>
<p>And that&#8217;s really it! I&#8217;ll attach the full (current) source code of the files to the end of this post. Here&#8217;s the screenshots of what the program looks like:</p>
<h2>On HighScores activity load:</h2>
<p><a href="http://www.aslingandastone.com/acf/release-date/55-revision/" rel="attachment wp-att-56"><img class="alignnone size-medium wp-image-56" title="dynamiclayouts01" src="http://aslingandastone.com/wp-content/uploads/2010/11/dynamiclayouts01-300x274.png" alt="" width="300" height="274" /></a></p>
<h2>On Submit button click:</h2>
<p><a href="http://www.aslingandastone.com/acf/release-date/55-revision-2/" rel="attachment wp-att-57"><img class="alignnone size-medium wp-image-57" title="dynamiclayouts02" src="http://aslingandastone.com/wp-content/uploads/2010/11/dynamiclayouts02-300x270.png" alt="" width="300" height="270" /></a></p>
<h1>TL;DR (Conclusion)</h1>
<pre class="brush: java; light: true; title: ; notranslate">
myLayout.addView(getLayoutInflater().inflate(R.layout.my_xml_layout, null));
</pre>
<p>Dynamic XML layout loading can pretty much be summed up with that one line of code. Most of the work goes into designing the layouts and making sure the layout you&#8217;re replacing has the same size and layout constraints as the one that&#8217;s replacing it, otherwise you will end up with the layout shifting to compensate for the different-sized layout.</p>
<p>Now I just have to decide whether to use a custom ListView for the high scores table, a custom Table Layout, or an agglomeration of TextViews&#8230;</p>
<p>Questions/comments welcomed.</p>
<p><a href="http://www.aslingandastone.com/wp-content/uploads/2010/11/source_files.zip" rel="source files">source_files.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aslingandastone.com/2011/dynamically-changing-android-views-with-xml-layouts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Versed Update</title>
		<link>http://www.aslingandastone.com/2011/versed-update/</link>
		<comments>http://www.aslingandastone.com/2011/versed-update/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 18:27:01 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Versed]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[bible game]]></category>
		<category><![CDATA[versed]]></category>

		<guid isPermaLink="false">http://aslingandastone.com/?p=152</guid>
		<description><![CDATA[The first major update to Versed brings a new game mode – Books of the Bible! Challenge your memory of the Bible books by identifying which book comes before or after a given book in the easy mode, or arrange &#8230; <a href="http://www.aslingandastone.com/2011/versed-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The first major update to Versed brings a new game mode – Books of the Bible! Challenge your memory of the Bible books by identifying which book comes before or after a given book in the easy mode, or arrange four books in the order they appear in the Bible in the hard mode.</p>
<p>At multiple users’ requests, we have almost doubled the number of verses available in Versed to test your Bible knowledge in the Verse, Reference and Fill in the Blanks modes.</p>
<p>The High Scores table has also been updated in this release to provide a better list of your best scores across all four game modes.</p>
<p>Have any features you would like to see implemented in Versed? Let us know by emailing <a href="mailto:support@aslingandastone.com">support@aslingandastone.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aslingandastone.com/2011/versed-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rhyme Deception Release!</title>
		<link>http://www.aslingandastone.com/2011/rhyme-deception-release/</link>
		<comments>http://www.aslingandastone.com/2011/rhyme-deception-release/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 04:14:55 +0000</pubDate>
		<dc:creator>cam</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Rhyme Deception]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[jake enfield]]></category>
		<category><![CDATA[rhyme deception]]></category>
		<category><![CDATA[seriousgamegroup]]></category>
		<category><![CDATA[word games]]></category>

		<guid isPermaLink="false">http://aslingandastone.com/?p=120</guid>
		<description><![CDATA[Rhyme Deception was designed by Jake Enfield and developed for the Android by A Sling and a Stone. The game challenges the player to solve as many Rhyme Puzzles as possible. Each puzzle requires 3 to 6 responses to crossword &#8230; <a href="http://www.aslingandastone.com/2011/rhyme-deception-release/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">Rhyme Deception was designed by Jake Enfield and developed for the Android by A Sling and a Stone. The game challenges the player to solve as many Rhyme Puzzles as possible. Each puzzle requires 3 to 6 responses to crossword type clues. To simplify matters, each of the words in the puzzle Rhyme. Well, not quite. The last word of each puzzle does not Rhyme and the clue may be deceiving. To help you out when you get stuck, you get three free answers.</div>
<div id="_mcePaste">Rhyme Deception was originally developed during the 2010 Global Game Jam as a web-based Flash game. This version has the same 15 puzzles as the free Android version and is available online at http://www.seriousgamegroup.com/RhymeDeception for free. For this original version, Jake Enfield designed and developed the game; Pratima Dutta, Jake Enfield, and Dao Hoa created the puzzles, and Evan Bogunia and Chris Bates created the audio.</div>
<p>Rhyme Deception was designed by Jake Enfield and developed for the Android by A Sling and a Stone. The game challenges the player to solve as many Rhyme Puzzles as possible. Each puzzle requires 3 to 6 responses to crossword type clues. To simplify matters, each of the words in the puzzle Rhyme. Well, not quite. The last word of each puzzle does not Rhyme and the clue may be deceiving. To help you out when you get stuck, you get three free answers.<br />
Rhyme Deception was originally developed during the 2010 Global Game Jam as a web-based Flash game. This version has the same 15 puzzles as the free Android version and is available online at http://www.seriousgamegroup.com/RhymeDeception for free. For this original version, Jake Enfield designed and developed the game; Pratima Dutta, Jake Enfield, and Dao Hoa created the puzzles, and Evan Bogunia and Chris Bates created the audio.</p>
<div id="attachment_121" class="wp-caption aligncenter" style="width: 245px"><a href="https://market.android.com/details?id=com.aslingandastone.android.rhymedeception"><img class="size-full wp-image-121 " title="rd_qr" src="http://aslingandastone.com/wp-content/uploads/2011/02/rd_qr.png" alt="Rhyme Deception for Android" width="235" height="235" /></a><p class="wp-caption-text">Rhyme Deception Direct Link</p></div>
<p>Rhyme Deception can now be downloaded online or on your Android phone via the Marketplace!</p>
<p><a href="https://market.android.com/details?id=com.aslingandastone.android.rhymedeception" target="_blank">https://market.android.com/details?id=com.aslingandastone.android.rhymedeception</a></p>
<p>Questions/comments/bugs/feature requests?  Please drop a comment below</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aslingandastone.com/2011/rhyme-deception-release/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Signing an Android APK for Release to the Android Market on Mac OS X</title>
		<link>http://www.aslingandastone.com/2011/signing-an-android-apk-for-release-to-the-android-market-on-mac-os-x/</link>
		<comments>http://www.aslingandastone.com/2011/signing-an-android-apk-for-release-to-the-android-market-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 08:59:38 +0000</pubDate>
		<dc:creator>cam</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[android market]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[signing apk android]]></category>

		<guid isPermaLink="false">http://aslingandastone.com/?p=112</guid>
		<description><![CDATA[This short tutorial will help you to get your Android app to the Android Market, quickly and effectively.  It took me a while to figure out how to make this happen, so I'm hoping that this tutorial will ensure you don't have the same pain that I did. <a href="http://www.aslingandastone.com/2011/signing-an-android-apk-for-release-to-the-android-market-on-mac-os-x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is a list of what needs to happen in it&#8217;s simplest form:</p>
<ol>
<li>Make a private key</li>
<li>Compile your app</li>
<li>Sign your app</li>
<li>Align your app</li>
<li>Upload to the Android Market</li>
</ol>
<h2>1. Make a private key</h2>
<p>There are a variety of ways to make a private key on Mac OS X, but for this tutorial I&#8217;m going to be using keytool.  Keytool is an executable that&#8217;s included with the Mac OS X Development Kit.  So if you&#8217;ve ever done anything with Cocoa for iOS or Mac OS, you&#8217;re good.  Otherwise, you may have to download the developer tools from Apple to be able to use keytool.</p>
<p>Basically, just type the command below in Terminal.  It will ask your for a password, so type it twice (and remember it).</p>
<pre class="brush: xml; highlight: [36]; title: ; notranslate">
keytool -genkey -v -keystore android-test.keystore
</pre>
<h2>2. Compile your App</h2>
<p>Open up your app in Eclipse.  Open your AndroidManifest.xml file.  Using the Android SDK (the Manifest tab), under Export, select <strong>Export an unsigned APK</strong>.</p>
<h2>3. Sign your app</h2>
<p>Now it&#8217;s time go back to Terminal.  You will now use Jarsigner to sign  your application.  Again, Jarsigner is part of the Apple Development Kit.  The command you need to use will look something like this:</p>
<pre class="brush: xml; highlight: [36]; title: ; notranslate">
jarsigner -verbose -keystore android-test.keystore &quot;PATH_TO_YOUR_APP.apk&quot; alias_name
</pre>
<h2 style="font-size: 1.5em;">4. Align your app</h2>
<div>Zipalign is part of the Android SDK that you&#8217;ve already downloaded.  It&#8217;s located in where ever you&#8217;ve saved the Android SDK/tools/zipalign.  So something like what I have below in the next command you need to use:</div>
<pre class="brush: xml; highlight: [36]; title: ; notranslate">/SDKs/android-sdk-mac_86/tools/zipalign -f -v 4  &quot;/SDKs/android-sdk-mac_86/Versed.apk&quot; &quot;/Users/Cam/Versed.apk&quot;
</pre>
<div>Note: You must have the absolute paths to both your APK file and the zipalign tool (In case you were wondering, I use the quotes because sometimes people put spaces in their file names and Terminal doesn&#8217;t like that .  This just ensures the file path is correct).</div>
<div>The 2nd to last command in that line specifies <strong>input</strong> file and the last command is the <strong>output</strong> file.  That&#8217;s really all you need to know.</div>
<div>
<h2>5.Upload to the Android Market</h2>
<div>Go to <a title="Android Market" href="http://market.android.com/" target="_blank">http://market.android.com/</a></div>
<div>Setup an account if you don&#8217;t have one already.</div>
<div>Scroll to the bottom of the page to this: &#8220;<span style="font-family: Arial; line-height: normal; color: #333333;">If you are a developer, learn about publishing your application <strong><a style="color: #3f8cd9; text-decoration: none;" href="http://market.android.com/publish">here</a></strong>.&#8221;</span></div>
<div>Click on here.</div>
<div>Fill out all the requirements and Upload your app!</div>
<div>For further, more detailed info -&gt; <a href="http://developer.android.com/guide/publishing/app-signing.html">http://developer.android.com/guide/publishing/app-signing.html</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.aslingandastone.com/2011/signing-an-android-apk-for-release-to-the-android-market-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Versed Release!</title>
		<link>http://www.aslingandastone.com/2010/versed-release/</link>
		<comments>http://www.aslingandastone.com/2010/versed-release/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 04:09:41 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Versed]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[versed]]></category>

		<guid isPermaLink="false">http://aslingandastone.com/?p=90</guid>
		<description><![CDATA[Versed is a tool to help you memorize Bible scripture.  By helping apply the Bible in everyday life, Versed will better equip you to be a shining Christian example in a lost and dark world. 5 Bible translations 3 modes &#8230; <a href="http://www.aslingandastone.com/2010/versed-release/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Versed is a tool to help you memorize Bible scripture.  By helping apply the Bible in everyday life, Versed will better equip you to be a shining Christian example in a lost and dark world.</p>
<div id="attachment_91" class="wp-caption alignright" style="width: 121px"><a href="market://search?q=pname:com.aslingandastone.versed"><img class="size-full wp-image-91 " title="Android Market Link" src="http://aslingandastone.com/wp-content/uploads/2010/12/img.png" alt="Android Market Link" width="111" height="111" /></a><p class="wp-caption-text">Android Market direct link</p></div>
<ul>
<li>5 Bible translations</li>
<li>3 modes of play
<ul>
<li>Learn by verse</li>
<li>Learn by reference</li>
<li>Fill in the blanks</li>
</ul>
</li>
</ul>
<p>Versed can now be downloaded online using <a title="Mobspot" href="http://www.mobspot.com/" target="_blank">Mobspot</a> or on your Android phone via the Marketplace!</p>
<p><a title="Versed on Mobspot" href="http://www.mobspot.com/apps/Versed" target="_blank">http://www.mobspot.com/apps/Versed</a></p>
<p>Questions/comments/bugs/feature requests?  Please drop a comment below!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aslingandastone.com/2010/versed-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

