<?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>Antoine Vo</title>
	<atom:link href="http://antoinevo.com/feed" rel="self" type="application/rss+xml" />
	<link>http://antoinevo.com</link>
	<description>A newcomer&#039;s thoughts and explorations into mobile development, general software, and gaming industry.</description>
	<lastBuildDate>Wed, 08 Feb 2012 06:49:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A Step By Step Guide to Getting One&#8217;s Android App Signed for Release</title>
		<link>http://antoinevo.com/archives/21</link>
		<comments>http://antoinevo.com/archives/21#comments</comments>
		<pubDate>Thu, 15 Dec 2011 10:09:41 +0000</pubDate>
		<dc:creator>avo</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://antoinevo.com/?p=21</guid>
		<description><![CDATA[Now I must say that the Android Developer&#8217;s Guide to Signing Your Applications explains the process well enough, but a step by step guide still make things much easier. And this, I found this little gem from the talkandroid.com forum by Destorythenseek.  Now my experience with forum posts is they have a higher chance of [...]]]></description>
			<content:encoded><![CDATA[<p>Now I must say that the <a href="http://developer.android.com/guide/publishing/app-signing.html#secure-key">Android Developer&#8217;s Guide to Signing Your Applications </a>explains the process well enough, but a step by step guide still make things much easier.</p>
<p>And this, I found this little gem from the talkandroid.com forum by <a href="http://www.talkandroid.com/android-forums/android-market-reviews/1317-tutorial-signing-your-apk-publishing.html">Destorythenseek</a>.  Now my experience with forum posts is they have a higher chance of it getting deleted than other corners of information (To be fair, blogs that is hosted on its own have an even higher chance. An abandoned blog means eventual shut down after ending payment, a blog on WordPress just get a left abandoned with last post dating to something like 2004.)</p>
<p>Either way, I&#8217;ll quote his writings here:</p>
<blockquote><p>Hey Guys,<br />
I had a really really really hard time figuring this out so here is exactly how to do it for those of you who need/want it.</p>
<p>First of all,<br />
jarsigner and keytool are .exe files that help create your &#8220;signed&#8221; application for release to the market to prevent fraud.</p>
<p>1.<br />
Make a folder somewhere called &#8220;keytools&#8221; and make a folder in that called &#8220;keys&#8221;</p>
<p>2.<br />
If you&#8217;re using Eclipse, in Package Exp window&#8230; right click on your project -&gt; Android Tools -&gt; Exports Unsigned Application Package &#8230; Save in keytools<br />
&#8220;filename.apk&#8221; or something.</p>
<p>3. Check<br />
&#8220;C:\Program Files\Java\jdk1.6.0_12\bin&#8221; for jarsigner and keytools..<br />
&#8230; or whatever jdk version you have</p>
<p>If you DONT have it install the following .. <a href="https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u12-oth-JPR@CDS-CDS_Developer" rel="nofollow" target="_blank">https://cds.sun.com/is-bin/INTERSHOP&#8230;-CDS_Developer</a></p>
<p>4. open cmd.exe,</p>
<p>5. cd your way to where you have your keytools folder&#8230;<br />
I had to do.. cd desktop, cd g1, cd keytools to get to C:\Users\Anton\Desktop\G1\keytools\</p>
<p>In this directory is you apk file which we will manipulate.</p>
<p>type the following now (or something similar to my example)&#8230;<br />
C:\&#8221;Program Files&#8221;\Java\jdk1.6.0_12\bin\keytool -genkey -alias donate.keystore -keyalg RSA -validity 20000 -keystore keys/donate.keystore</p>
<p>Then you will have be presented with:<br />
Enter keystore password: (type in a password you will use)<br />
Re-enter new password: (type in same password here)<br />
What is your first and last name? Anton<br />
What is the name of your Organization unit? (You dont have to type anything really)<br />
What is the name of your city or locality?<br />
What is the name of your state or providence?<br />
what is the two-letter country code for this unit? US<br />
is CN=Anton C=US correct?<br />
[no]: yes (type yes there)<br />
Enter key password for &lt;donate.keystore&gt;<br />
&lt;RETURN if same as keystore password&gt;: (push enter)</p>
<p>6.</p>
<p>type the following now (or something similar to my example)&#8230;<br />
C:\&#8221;Program Files&#8221;\Java\jdk1.6.0_12\bin\jarsigner -verbose -keystore key/donate.keystore -signedjar Donate_signed.apk Donate.apk donate.keystore</p>
<p>Enter Passphase for keystore: (your password you made earlier)<br />
adding: META-INF/MINFEST.MF &#8230;.<br />
&#8230;&#8230;.<br />
&#8230;..<br />
&#8230;Signing: classes.dex</p>
<p>and you&#8217;re all set! you signed your Doante_signed.apk file or whatever you wanted to create!<br />
Congratulations.<img title="Smile5" src="http://www.talkandroid.com/android-forums/images/smilies/smile5.gif" alt="" border="0" /><br />
NOW STOP BEING FRUSTRATED LIKE I WAS FOR HOURS!</p>
<p>&nbsp;</p></blockquote>
<p>From there, I have a few observations that might make the step by step guide a little easier to read.</p>
<p>C:\&#8221;Program Files&#8221;\Java\jdk1.6.0_12\bin\keytool -genkey -alias donate.keystore -keyalg RSA -validity 20000 -keystore keys/donate.keystore</p>
<p>-alias is to make a screenname.  It doesn&#8217;t have to be name.keystone.  It could just be avo if you wish.</p>
<p>-validity is based on number of days.  10,000 can suffice.</p>
<p>-keystone is for naming the keystone.  I think the .keystone is necessary, but there no need for any slashes.  I used hyphens (or maybe it&#8217;s a dash).</p>
<p>C:\&#8221;Program Files&#8221;\Java\jdk1.6.0_12\bin\jarsigner -verbose -keystore key/donate.keystore -signedjar <strong>Donate_signed.apk Donate.apk donate.keystore </strong></p>
<p>The interesting part of this is unlike the developer guide&#8217;s example, this shows how to take the original Apk and sign it while saving it as a separate instead of overwriting it.  I also want to remind that the &#8220;donate.keystone&#8221; is alias name.  This is why I was talking about an alias can just be &#8220;Avo&#8221; or &#8220;Avo.keystone&#8221; instead of using a similar name 3 times.  It just makes things easier to read.</p>
]]></content:encoded>
			<wfw:commentRss>http://antoinevo.com/archives/21/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fighting/Learning AdMob &#8211; Google Search link up</title>
		<link>http://antoinevo.com/archives/15</link>
		<comments>http://antoinevo.com/archives/15#comments</comments>
		<pubDate>Wed, 14 Dec 2011 21:19:39 +0000</pubDate>
		<dc:creator>avo</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://antoinevo.com/?p=15</guid>
		<description><![CDATA[For a couple lines of codes, I had to Google quite a bit to find all the answers I want to find. First, a question related to warnings.  AdMobs requires that use a targetSdkVersion of at at least Android 3.2 (API 13).  But obviously I want my app to be usable to phones that uses [...]]]></description>
			<content:encoded><![CDATA[<p>For a couple lines of codes, I had to Google quite a bit to find all the answers I want to find.</p>
<p>First, a question related to warnings.  AdMobs requires that use a targetSdkVersion of at at least Android 3.2 (API 13).  But obviously I want my app to be usable to phones that uses much earlier versions of Android.</p>
<p>Now I&#8217;ll be honest that many young CS people/programmers and myself have a bad habit of ignoring warnings.  I recalled that some of the later classes do start to crack down on that and the TF/TA being to frown on that if shown. But I digressed.</p>
<p>So Googling that, the answer you&#8217;ll find is through <a href="http://stackoverflow.com/questions/3911258/what-happens-if-the-minsdkversion-is-lower-than-the-targetsdkversion">birryree from stackoverflow</a>:</p>
<p><em>You can safely ignore the warning.</em></p>
<p>So ignore it.  x_x  Yeah.</p>
<p>To be fair, as beekeeper chimed, it does mean a complicated app needs more extensive testing.  As one complies to a newer version of Android, if you one of the newer features, it won&#8217;t work on earlier versions.</p>
<p>&#8212;-</p>
<p>Speaking of Build Targets&#8230; How do one change Build Targets?  This is originally a drafted post, but I&#8217;ll just merge it here.</p>
<p>A simple change. Just a small issue encountered. How to change build target?</p>
<p>Right click on the project<br />
Click on properties<br />
Click Android<br />
Choose the new Build Target!</p>
<p>Don&#8217;t forget to update the Android Manifest!</p>
<p>&lt;uses-sdk android:minSdkVersion=&#8221;(Insert new build number here)&#8221; /&gt;</p>
<p>This could be useful when you want to use stuff that requires a different build target. I should read up more about it and its implications. Perhaps it would allow me to write a more interesting and comprehensive post.</p>
<p>&#8212;-</p>
<p>Another question is adding your device ID to the code so you can safely test (not accidentally be accused of clicking the ad yourself to get money) the app.</p>
<p>Several places give the advice of looking in logcat!  And you open logcat, connect the phone, and then what&#8230;</p>
<p>Fortunately, this guy gave a more detailed instructions on finding the Device ID.  <a href="http://webhole.net/2011/12/02/android-sdk-tutorial-get-admob-test-device-id/">The missing detai</a>l.</p>
<p>Pretty simple, but very useful to know.</p>
<p>&#8212;-</p>
<p>Finally last link up is toward the question of placing AdMob ads on the phone.  Unlike iPhone Development where it is pretty simple to place the object of where you want it to be on the screen, Android is a bit more tricky.  <a href="http://code.google.com/mobile/ads/docs/android/fundamentals.html">Google Code&#8217;s Developer&#8217;s Guide</a> does a good enough job explain on putting the ads with some explanation to set some modifications (like targeting the audience and etc.)  However, I started to have the problem of setting the ad to the very bottom of the screen.  Pretty simple thing, but Googling multiple approaches and many was in XML rather than Java code.  Also I wanted to read if it is possible to do it in Linear Layout too.  In the end, I gave up and <a href="http://stackoverflow.com/questions/5483010/how-to-place-an-admob-ad-at-the-bottom-of-the-screen">switch to XML with help of this answer</a> (Don&#8217;t forget to type in android:layout_alignParentBottom=&#8221;true&#8221; or it will still not align)  with Java code to set target audience parameters.  Though now that I did it in XML, I think I understand enough to do it in Java. However, I&#8217;ll test that out after publishing the app and this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://antoinevo.com/archives/15/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Why is Eclipse is asking me to remove all the &#8220;@override&#8221; all of a sudden?</title>
		<link>http://antoinevo.com/archives/5</link>
		<comments>http://antoinevo.com/archives/5#comments</comments>
		<pubDate>Mon, 12 Dec 2011 18:01:30 +0000</pubDate>
		<dc:creator>avo</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://antoinevo.com/?p=5</guid>
		<description><![CDATA[I was wasting my time fighting Eclipse and whatever-the-issue-with-Android and decided the easiest way (relatively) was just to re-install everything. Now, all of a sudden Eclipse is yelling at me to remove &#8220;@override&#8221; over things like the OnClick() Method and the run() Method. While doing what it asked seems to fix the problem, I have [...]]]></description>
			<content:encoded><![CDATA[<p>I was wasting my time fighting Eclipse and whatever-the-issue-with-Android and decided the easiest way (relatively) was just to re-install everything. Now, all of a sudden Eclipse is yelling at me to remove &#8220;@override&#8221; over things like the OnClick() Method and the run() Method. While doing what it asked seems to fix the problem, I have to ask what&#8217;s changed that cause this to happened. I&#8217;m still not sure, but I found this.</p>
<p>From Stackoverflow:</p>
<p><em>It&#8217;s an implementation thing. In Java 5 vs Java 6 they changed whether you could use &#8220;Override&#8221; with an interface (since Override seems to imply that you are overriding some sort of default behavior, which you are not doing with an interface!). If you so desire, you can search in the Eclipse preferences and change it from a compilation error to a compilation warning. You code inside of the CheckBox() function looks fine to me.</em></p>
<p><em>However, you are never calling the CheckBox function, so that&#8217;s where the &#8216;not used locally&#8217; error is coming from. Were you meaning to call that function from within the OnPreferenceClick method?</em></p>
<p><em>-Hamy</em></p>
<p>I&#8217;m not completely convinced it is truly the reason for me (I thought I was already on Java 6, maybe even Java 7, but maybe I chose an older version back in August after my reformat). But I guess that&#8217;s the reason.</p>
]]></content:encoded>
			<wfw:commentRss>http://antoinevo.com/archives/5/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

