<?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>dimitar.me &#187; Android</title>
	<atom:link href="http://dimitar.me/category/programming/java/eclipse/android/feed/" rel="self" type="application/rss+xml" />
	<link>http://dimitar.me</link>
	<description>Dimitar Darazhanski&#039;s blog.</description>
	<lastBuildDate>Wed, 01 Feb 2012 03:17:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to Switch your Google Checkout Account in the Android Market Application</title>
		<link>http://dimitar.me/how-to-switch-your-google-checkout-account-in-the-android-market-application/</link>
		<comments>http://dimitar.me/how-to-switch-your-google-checkout-account-in-the-android-market-application/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 18:38:16 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=1163</guid>
		<description><![CDATA[With Google&#8217;s last update of the Market application on the Android devices, it became a lot easier to now switch your Google Checkout account associated with all your application purchases. Just fire up the Market application on your device and press the Menu button. That gives you the &#8220;Accounts&#8221; option, which allows you to switch [...]]]></description>
			<content:encoded><![CDATA[<p>With Google&#8217;s last update of the Market application on the Android devices, it became a lot easier to now switch your Google Checkout account associated with all your application purchases.</p>
<p>Just fire up the Market application on your device and press the Menu button. That gives you the &#8220;Accounts&#8221; option, which allows you to switch the Google Checkout account associated with your Market application:</p>
<p><a href="http://dimitar.me/wp-content/uploads/2011/08/AndroidMarketApplication_2011_08_15.png"><img src="http://dimitar.me/wp-content/uploads/2011/08/AndroidMarketApplication_2011_08_15-180x300.png" alt="" title="AndroidMarketApplication_2011_08_15" width="180" height="300" class="aligncenter size-medium wp-image-1167" /></a></p>
<p>Of course you have to have added your new Google account to the available accounts on the phone before you can do the above switch. To do this, go to:</p>
<p>Menu -> Settings -> Accounts &#038; sync</p>
<p>and add your account (new Gmail email) here. Then you can go to the Market application and switch to this new account.</p>
<p>In the past this used to require a factory reset of the device or a root access.</p>
<p>Although this is a great feature for the consumer, it might also turn out to be an issue in the long run. All downloaded/purchased applications are associated with the Google Checkout account used at the time of acquiring them from the Market. So if you switch your account in the Market application, you will no longer have access to the applications you purchases or downloaded with the previous account. For example, when you go to &#8220;My Apps&#8221; in the Market application, you will not be able to see the application you downloaded with your old account. </p>
<p>Furthermore (unless Google is doing something new that I am not aware of) all the licensed application you purchased from the Market with the old account will begin to complain that they are not licensed for your new account. </p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/how-to-switch-your-google-checkout-account-in-the-android-market-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to sign an unsigned Android package (.apk file)</title>
		<link>http://dimitar.me/how-to-sign-an-unsigned-android-package-apk-file/</link>
		<comments>http://dimitar.me/how-to-sign-an-unsigned-android-package-apk-file/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 18:49:27 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=1143</guid>
		<description><![CDATA[If you develop with Eclipse, you most likely use the built in Export Wizard to export and sign your Android applications. There are some cases though, when this method will not do. For example, if you decide to publish your applications on the new Amazon App Store, you will find out that they require you [...]]]></description>
			<content:encoded><![CDATA[<p>If you develop with Eclipse, you most likely use the built in Export Wizard to export and sign your Android applications.</p>
<p>There are some cases though, when this method will not do. For example, if you decide to publish your applications on the new Amazon App Store, you will find out that they require you to submit an unsigned apk first. They do some optimizations and DRM (if you chose to use it) processing of it, and then they allow you to download the new package and sign and re-upload the final .apk file.</p>
<p>Amazon provides an option to sign the package for you, but in a lot of cases that will not work. For example, if you use some Google API&#8217;s (like Google Maps, etc.) you must sign it yourself! Otherwise the application will not work!</p>
<p>Steps to sign your application:</p>
<p>1. Export the unsigned package:</p>
<p>Right click on the project in Eclipse -&gt; Android Tools -&gt; Export Unsigned Application Package</p>
<p>2. Sign the application using your keystore and the jarsigner tool (comes with the JDK):</p>
<p>Change directory to where your unsigned .apk file is. Then run:</p>
<pre><code>jarsigner -verbose -keystore /path_to_keystore/mykeystore.keystore my_application.apk my_keystore_alias</code></pre>
<p>It will ask you to provide your password:</p>
<p>Enter Passphrase for keystore:</p>
<p>Once you enter the password it will sign your apk. To verify that the signing is successful you can run:</p>
<pre><code>jarsigner -verify my_application.apk</code></pre>
<p>It should come back with:</p>
<p>jar verified.</p>
<p>Just an FYI: The jarsigner tool should be in your /usr/bin directory by default.</p>
<p>Here is a detailed documentation on signing your Android applications: <a href="http://developer.android.com/guide/publishing/app-signing.html" onclick="pageTracker._trackPageview('/outgoing/developer.android.com/guide/publishing/app-signing.html?referer=');">http://developer.android.com/guide/publishing/app-signing.html</a></p>
<p>3. Do not forget to zipalign the .apk at the very end!</p>
<p>Even though this is not absolutely necessary, it is highly recommended. The zipalign tool optimizes the .apk file and makes it a lot faster to execute.</p>
<p>To zipalign your application:</p>
<pre><code>zipalign -f -v 4 my_application.apk my_zipaligned_application.apk</code></pre>
<p>As you can see, zipalign expects you to provide the input .apk file and specify what you want the output file to be named.</p>
<p><a href="http://developer.android.com/resources/articles/zipalign.html" onclick="pageTracker._trackPageview('/outgoing/developer.android.com/resources/articles/zipalign.html?referer=');">Zipalign tool documentation.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/how-to-sign-an-unsigned-android-package-apk-file/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Eclipse Project is Flagged with an &#8220;Android Packaging Problem&#8221; Error</title>
		<link>http://dimitar.me/eclipse-project-is-flagged-with-an-android-packaging-problem-error/</link>
		<comments>http://dimitar.me/eclipse-project-is-flagged-with-an-android-packaging-problem-error/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 03:37:31 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=1137</guid>
		<description><![CDATA[Sometimes while developing in Eclipse you will notice that the Android Project will be flagged with the red &#8220;x&#8221; but none of your source files or resources will have errors. If you look in the &#8220;Problems&#8221; tab you will notice that the project is flagged with an &#8220;Android Package Problem&#8221; type and the &#8220;Location&#8221; will [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes while developing in Eclipse you will notice that the Android Project will be flagged with the red &#8220;x&#8221; but none of your source files or resources will have errors. If you look in the &#8220;Problems&#8221; tab you will notice that the project is flagged with an &#8220;Android Package Problem&#8221; type and the &#8220;Location&#8221; will be Unknown.</p>
<p>To fix this, just do:</p>
<p>Project->Clean</p>
<p>This will rebuild the project from scratch.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/eclipse-project-is-flagged-with-an-android-packaging-problem-error/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Android Version 2.2.2 Prevents Applications with Copy Protection Turned on from Displaying in the Market</title>
		<link>http://dimitar.me/android-version-2-2-2-prevents-applications-with-copy-protection-turned-on-from-displaying-in-the-market/</link>
		<comments>http://dimitar.me/android-version-2-2-2-prevents-applications-with-copy-protection-turned-on-from-displaying-in-the-market/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 04:07:11 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=1126</guid>
		<description><![CDATA[Today I got the Over the Air update of my Nexus One phone to version 2.2.2. To my surprise I could not see some of my applications that were published in the Android Market. Neither could I see a big chunk of the total applications in the Android Market. After some tests and digging it [...]]]></description>
			<content:encoded><![CDATA[<p>Today I got the Over the Air update of my Nexus One phone to version 2.2.2. To my surprise I could not see some of my applications that were published in the Android Market. Neither could I see a big chunk of the total applications in the Android Market.</p>
<p>After some tests and digging it turned out that applications that have the &#8220;Copy Protection&#8221; turned on in the &#8220;Developer Console&#8221; would not be displayed in the Android Market on devices running version 2.2.2.</p>
<p>I have not tested this on devices with ver. 2.3 and 3.0, but I would suspect that the result would be the same.</p>
<p>For a long while the &#8220;Copy Protection&#8221; feature has been marked as &#8220;will be deprecated soon&#8221; by Google. No date or any other pointer has been published by Google as to when that will be. I guess we got the answer with this last OS update.</p>
<p>If you want your application to be available to all the devices running the latest OS versions, you will have to turn off the copy protection feature. Of course if your application is paid you would still want to make sure that only people that have purchased it will be able to run it. To do that, just implement the <a href="http://developer.android.com/guide/publishing/licensing.html" onclick="pageTracker._trackPageview('/outgoing/developer.android.com/guide/publishing/licensing.html?referer=');">licensing service</a> in your application.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/android-version-2-2-2-prevents-applications-with-copy-protection-turned-on-from-displaying-in-the-market/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android &#8211; Displaying Dialogs From Background Threads</title>
		<link>http://dimitar.me/android-displaying-dialogs-from-background-threads/</link>
		<comments>http://dimitar.me/android-displaying-dialogs-from-background-threads/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 04:39:01 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=1009</guid>
		<description><![CDATA[Having threads to do some heavy lifting and long processing in the background is pretty standard stuff. Very often you would want to notify or prompt the user after the background task has finished by displaying a Dialog. The displaying of the Dialog has to happen on the UI thread, so you would do that [...]]]></description>
			<content:encoded><![CDATA[<p>Having threads to do some heavy lifting and long processing in the background is pretty standard stuff. Very often you would want to notify or prompt the user after the background task has finished by displaying a Dialog.</p>
<p>The displaying of the Dialog has to happen on the UI thread, so you would do that either in the <em>Handler</em> object for the thread or in the <em>onPostExecute</em> method of an <em>AsyncTask</em> (which is a thread as well, just an easier way of implementing it). That is a textbook way of doing this and you would think that pretty much nothing wrong could go with this.</p>
<p>Surprisingly I found out that something CAN actually go wrong with this. After Google updated the Android Market and started giving crash reports to the developers I received the following exception:</p>
<p><em>android.view.WindowManager$BadTokenException: Unable to add window &#8212; token android.os.BinderProxy@447a6748 is not valid; is your activity running?<br />
at android.view.ViewRoot.setView(ViewRoot.java:468)<br />
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)<br />
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)<br />
at android.view.Window$LocalWindowManager.addView(Window.java:424)<br />
at android.app.Dialog.show(Dialog.java:239)<br />
at android.app.Activity.showDialog(Activity.java:2488)<br />
&#8230;<br />
at android.os.Handler.dispatchMessage(Handler.java:99)<br />
&#8230;</em></p>
<p>I only got a couple of these exceptions from thousands of installs, so I knew that was not anything that happens regularly or that it was easy to replicate.</p>
<p>Looking at the stack trace above it gives us a pretty good idea why it failed. It started in the <em>Handler</em> object, which naturally was called by a background thread after it finished its processing. The <em>Handler</em> instance tried to show a Dialog and before it could show it, it tried to set the <em>View</em> for it and then it failed with:</p>
<p><em>android.view.WindowManager$BadTokenException: Unable to add window &#8212; token android.os.BinderProxy@447a6748 is not valid; is your activity running?</em></p>
<p>The <em>447a6748</em> number is just a memory address of an object that no longer exists.</p>
<p>Note- do not get hung up on the exact number. It would be different with every execution.</p>
<p>Now we know why the application crashed, the only thing left is to figure out what caused it?</p>
<p>We know that background threads execute independently of the main UI thread. That means that the user could be interacting with the application during the time that the thread is doing its work under the covers. Well, what happens if the user hits the <em>&#8220;Back&#8221;</em> button on the device while the background thread is running and what happens to the Dialog that this thread is supposed to show? Well, if the timing is right the application will most likely crash with the above described error.</p>
<p>In other words what happens is that the <em>Activity</em> will be going through its destruction when the background thread finishes its work and tries to show a Dialog.</p>
<p>In this case it is almost certain that this should have been handled by the <em>Virtual Machine</em>. It should have recognized the fact that the <em>Activity</em> is in the process of finishing and not even attempted to show the Dialog. This is an oversight of the Google developers and it will probably be fixed some time in the future, but in the meantime the burden is on us to take care of this.</p>
<p>The fix to this is pretty simple. Just test if the <em>Activity</em> is going through its finishing phase before displaying the Dialog:</p>
<pre><code>private Handler myHandler = new Handler() {
  @Override
  public void handleMessage(Message msg) {
    switch (msg.what) {
      case DISPLAY_DLG:
        if (!isFinishing()) {
        showDialog(MY_DIALOG);
        }
      break;
    }
  }
};</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/android-displaying-dialogs-from-background-threads/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Android applications that use the MyLocationOverlay class crash on the new Droid X</title>
		<link>http://dimitar.me/applications-that-use-the-mylocationoverlay-class-crash-on-the-new-droid-x/</link>
		<comments>http://dimitar.me/applications-that-use-the-mylocationoverlay-class-crash-on-the-new-droid-x/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 18:44:20 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=959</guid>
		<description><![CDATA[Update: August 29, 2010 Tested this myself on a friend&#8217;s phone and this bug is definitively not fixed yet despite the recent Motorola updates! The burden is on you (the developer) to fix this if you want your applications to run on a Droid X. Update: August 23, 2010 Still getting reports that the update [...]]]></description>
			<content:encoded><![CDATA[<hr />
<em>Update: August 29, 2010</em><br />
Tested this myself on a friend&#8217;s phone and this bug is definitively not fixed yet despite the recent Motorola updates! The burden is on you (<em>the developer</em>) to fix this if you want your applications to run on a Droid X.<br />
<em>Update: August 23, 2010</em><br />
Still getting reports that the update issued by Motorola last month did not fix this issue!</p>
<hr />
<p>As soon as the new Motorola Droid X came out I started getting reports that my applications would crash on it.</p>
<p>The description I was getting from people was that the application would start, then it would show the Google map and start moving the map and zooming in on to their current location and then all of a sudden the app would crash. By crash I mean they get taken back to the phone&#8217;s home screen. No &#8220;Force Close&#8221; dialog pops up&#8230; nothing&#8230; just gets back to the home screen.</p>
<p>If both the GPS and the Wireless Networks are turned off from the Locations settings then the applications would work fine, but of course that means that the current location of the device would be impossible to find.</p>
<p>At this point I knew that the problem had to do with either the LocationManagers or the LocationOverlays but I had no way of finding out exactly what the problem was until I could get my hands on a Droid X phone and connect it to my computer to look at the execution stack.</p>
<p>Well it turns out the problem is with the default MyLocationOverlay class. The Droid X phones throw an exception when they try to draw the dot showing the location of the device:</p>
<pre><code>E/AndroidRuntime(10458): Uncaught handler: thread main exiting due to  uncaught exception
E/AndroidRuntime(10458): java.lang.ClassCastException:  android.graphics.drawable.BitmapDrawable
E/AndroidRuntime(10458): 	at com.google.android.maps.MyLocationOverlay.getLocationDot(MyLocationOverlay.java:180)
E/AndroidRuntime(10458): 	at com.google.android.maps.MyLocationOverlay.drawMyLocation(MyLocationOverlay.java:561)</code></pre>
<p>Another developer (<a href="http://www.droidforums.net/forum/droid-x-general-discussions/59840-does-my-app-crash-droid-x.html" onclick="pageTracker._trackPageview('/outgoing/www.droidforums.net/forum/droid-x-general-discussions/59840-does-my-app-crash-droid-x.html?referer=');">rgfind</a>l) who had the same problem like I did and who had already made the trip to the Verizon store gave me the above stack trace.</p>
<p>Several possible solutions popped into my head:</p>
<p>1. Stop using the MyLocationOverlay class and start relying only on the LocationManager classes and draw/redraw my current location onLocationChanged.<br />
2. Extend from MyLocationOverlay class and override the draw method.<br />
3. Stop supporting the Droid X.</p>
<p>None of these solutions are ideal with the last one being almost unacceptable.</p>
<p>Luckily the same developer also gave me a link to a solution implementing the 2nd option above, so I did not even have to code it myself. Apparently that is not the first time Motorola phones (Motorola Cliq and Motorola Dext) have a problem with this class. Most likely their builds are missing the drawable resource.</p>
<p>Anyway, the solution consists of the <a href="http://www.spectrekking.com/download/FixedMyLocationOverlay.java" onclick="pageTracker._trackPageview('/outgoing/www.spectrekking.com/download/FixedMyLocationOverlay.java?referer=');">.java file that implements the FixedMyLocationOverlay class</a>, which inherits from the default MyLocationOverlay class and overrides the drawMyLocation method. And a <a href="http://www.spectrekking.com/download/mylocation.png" onclick="pageTracker._trackPageview('/outgoing/www.spectrekking.com/download/mylocation.png?referer=');">.png file</a> with a dot that will be representing the current location on the map.</p>
<p>Just use this derived class FixedMyLocationOverlay instead of the default MyLocationOverlay. If you look at the implementation of the drawMyLocation method, you will see that if the phone has no problem it will use the default implementation of the parent class, but if it throws an exception it will use the custom code to draw the location.</p>
<p>I would think that there are a lot of applications in the Android Market right now that use the default MyLocationOverlay class and all of them will be crashing on the new Droid X until either Motorola gets their act together or the developers realize the issue and work around it.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/applications-that-use-the-mylocationoverlay-class-crash-on-the-new-droid-x/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Just Upgraded my Nexus One from Android 2.1 to Android 2.2</title>
		<link>http://dimitar.me/just-upgraded-my-nexus-one-from-android-2-1-to-android-2-2/</link>
		<comments>http://dimitar.me/just-upgraded-my-nexus-one-from-android-2-1-to-android-2-2/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 19:52:05 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=937</guid>
		<description><![CDATA[The latest Android OS version 2.2 (&#8220;Froyo&#8221;) was announced at the Google I/O conference on the 11th of May. As you already probably know it adds multiple enhancements like tethering, wifi hotspot functionality, full support for Flash, etc. Since I use my Nexus One phone for Android development, I did not want to download the [...]]]></description>
			<content:encoded><![CDATA[<p>The latest Android OS version 2.2 (&#8220;Froyo&#8221;) was announced at the Google I/O conference on the 11th of May. As you already probably know it adds multiple enhancements like tethering, wifi hotspot functionality, full support for Flash, etc. Since I use my Nexus One phone for Android development, I did not want to download the update from Google and then install it with adb. I just wanted to wait for the over the air update.</p>
<p>And to my surprise, the first time I looked at my phone this morning, I had this message on the screen:</p>
<div id="attachment_935" class="wp-caption aligncenter" style="width: 310px"><a href="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Upgrade_Message.png"><img src="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Upgrade_Message-300x225.png" alt="Android 2.2 Upgrade Message" title="Android_2.2_Upgrade_Message" width="300" height="225" class="size-medium wp-image-935" /></a><p class="wp-caption-text">Android 2.2 Upgrade Message</p></div>
<p>I was not sure how long it would take, so I just hit &#8220;Install Later&#8221;. Then a couple of hours later, when I was ready, I just went to Settings -> About Phone -> Software Update and hit &#8220;Restart &#038; Install&#8221;:</p>
<div id="attachment_936" class="wp-caption aligncenter" style="width: 235px"><a href="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Settings_SystemUpdates.png"><img src="http://dimitar.me/wp-content/uploads/2010/07/Android_2.2_Settings_SystemUpdates-225x300.png" alt="Android 2.2 Settings -&gt; About Phone -&gt; System Updates" title="Android_2.2_Settings_SystemUpdates" width="225" height="300" class="size-medium wp-image-936" /></a><p class="wp-caption-text">Android 2.2 Settings -> About Phone -> System Updates</p></div>
<p>The phone rebooted and started the upgrade. The whole process with the installation took less than 5 minutes.</p>
<p>I am not going to go into details what the features of Android 2.2 are. There are so many announcements and blog posts on this matter already out there&#8230;</p>
<p>But what I am going to say is that Android is the leading OS in the mobile phone market right now. I can say this definitively, since I have been using iPhones for the past 2 years. I have a 3G and a 3GS phones. I encourage any iPhone user to go and check out an Android device. Please do not look at the low end hardware that runs Android (like the Cliq, the old G1, etc.). Check out the HTC Evo, the HTC Incredible, the Nexus One etc. See for yourselves before you make your decision to get another phone and lock into a 2 year contract. I will mention only a few things you will discover on the Android device that your phone probably does not have right now:</p>
<ol>
<li>Turn by turn voice navigation</li>
<li>Built in tethering</li>
<li>Built in WiFi hotspot capability supporting multiple devices</li>
<li>Full support for Flash</li>
<li>Full blown multitasking on the OS level (no need for the programmer to do anything special)</li>
<li>Integrated speech recognition across the board. Voice input could be used anywhere in place of the text input.</li>
<li>Over the air updates and syncing. That means no iTunes or the like!</li>
</ol>
<p>And many other features that I do not want to get into details right now. I am sure you can fill in the gaps for yourselves&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/just-upgraded-my-nexus-one-from-android-2-1-to-android-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to connect your Android phone to Ubuntu to do development, testing, installations or tethering</title>
		<link>http://dimitar.me/how-to-connect-your-android-phone-to-ubuntu-to-do-developmenttestinginstallations-or-tethering/</link>
		<comments>http://dimitar.me/how-to-connect-your-android-phone-to-ubuntu-to-do-developmenttestinginstallations-or-tethering/#comments</comments>
		<pubDate>Wed, 12 May 2010 20:14:32 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=837</guid>
		<description><![CDATA[If you do any Android development in Ubuntu it is much better to test your applications on a real device rather than just relying on the emulator. If you just connect the phone to the computer through USB and run adb devices you will find out that your phone is not recognized: $ adb devices [...]]]></description>
			<content:encoded><![CDATA[<p>If you do any Android development in Ubuntu it is much better to test your applications on a real device rather than just relying on the emulator.</p>
<p>If you just connect the phone to the computer through USB and run adb devices you will find out that your phone is not recognized:</p>
<pre><code>$ adb devices
List of devices attached
???????????? no permissions
</code></pre>
<p>This is easily fixable in Ubuntu. You have to add a line to a file in the /etc/udev/rules.d directory.</p>
<p>What line in which file depends on the manufacturer and model of the device. You can find out the Vendor ID number and Product ID number of the device by running (after you connected it via USB of course):</p>
<pre><code>$ lsusb</code></pre>
<p>For example, if you had a Nexus One connected you would get:</p>
<p>Bus 002 Device 004: ID 18d1:4e12</p>
<p>In this case the Vendor Id is &#8220;18d1&#8243; and the Product ID is &#8220;4e12&#8243;. Please keep in mind that the Vendor ID for HTC changed from &#8220;0bb4&#8243; to &#8220;18d1&#8243;. The older HTC phones like the G1 have a Vendor ID of &#8220;0bb4&#8243;.</p>
<p>Here is how to set up some of the major Android phones:</p>
<p><span style="text-decoration: underline;"><strong>Step 1.</strong> Enable Unknown sources and  USB debugging:</span></p>
<p>Go to Settings -> Applications and check the Unknown sources check-box, then go to Development and enable the USB debugging.</p>
<p><span style="text-decoration: underline;"><strong>Step 2.</strong> Depending on your phone follow these instructions:</span></p>
<ul>
<li><strong>G1</strong><br />
Create/edit a file in /etc/udev/rules.d called 51-android.rules:</p>
<pre><code>$ sudo gedit /etc/udev/rules.d/51-android.rules</code></pre>
<p>Add the following line to it and save it:</p>
<p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;0bb4&#8243;, ATTRS{idProduct}==&#8221;0c01&#8243;, MODE=&#8221;0666&#8243;</li>
<li><strong>HTC Hero</strong>
<p>Add to the file (or create it if it does not exist- see above) /etc/udev/rules.d/51-android.rules the following line:</p>
<p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;0bb4&#8243;, ATTRS{idProduct}==&#8221;0c02&#8243;, MODE=&#8221;0666&#8243;</li>
<li><strong>HTC EVO</strong>
<p>Add to the file (or create it if it does not exist- see above) /etc/udev/rules.d/51-android.rules the following line:</p>
<p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;0bb4&#8243;, ATTRS{idProduct}==&#8221;0c8d&#8221;, MODE=&#8221;0666&#8243;</li>
<li><strong>HTC EVO Shift</strong>
<p>Add to the file (or create it if it does not exist- see above) /etc/udev/rules.d/51-android.rules the following line:</p>
<p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;0bb4&#8243;, ATTRS{idProduct}==&#8221;0ca5&#8243;, MODE=&#8221;0666&#8243;</li>
<li><strong>HTC ThunderBolt</strong>
<p>Add to the file (or create it if it does not exist- see above) /etc/udev/rules.d/51-android.rules the following line:</p>
<p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;0bb4&#8243;, ATTRS{idProduct}==&#8221;0ca4&#8243;, MODE=&#8221;0666&#8243;</li>
<li><strong>LG OPTIMUS LG-P506</strong>
<p>Add to the file (or create it if it does not exist- see above) /etc/udev/rules.d/51-android.rules the following line:</p>
<p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;1004&#8243;, ATTRS{idProduct}==&#8221;618e&#8221;, MODE=&#8221;0666&#8243;</li>
<li><strong>Motorola Xoom</strong>
<p>Add to the file (or create it if it does not exist- see above) /etc/udev/rules.d/51-android.rules the following line:</p>
<p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;22b8&#8243;, ATTRS{idProduct}==&#8221;70a9&#8243;, MODE=&#8221;0666&#8243;</li>
<li><strong>Motorola Droid</strong><br />
Create/edit a file in /etc/udev/rules.d called 10-motorola-droid.rules:</p>
<pre><code>$ sudo gedit /etc/udev/rules.d/10-motorola-droid.rules</code></pre>
<p>Add the following line to it and save it:</p>
<p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;22b8&#8243;, ATTRS{idProduct} ==&#8221;41db&#8221;, MODE=&#8221;0600&#8243;</li>
<li><strong>Nexus One</strong><br />
Create/edit a file in /etc/udev/rules.d called 99-android.rules:</p>
<pre><code>$ sudo gedit /etc/udev/rules.d/99-android.rules</code></pre>
<p>Add the following line to it and save it:</p>
<p>SUBSYSTEM==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;18d1&#8243;, SYMLINK+=&#8221;android_adb&#8221;, MODE=&#8221;0666&#8243;</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Step 3.</strong> Restart udev:</span></p>
<pre><code>$ sudo restart udev</code></pre>
<p>Check if the device is recognized:</p>
<pre><code>$ adb devices</code></pre>
<p>You may need to stop and start the adb server:</p>
<pre><code>$ adb kill-server
$ adb start-server</code></pre>
<p><strong>Update:</strong> Please note that some devices require to disconnect the usb cable at this point and then reconnecting it.</p>
<p>You should be good to go&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/how-to-connect-your-android-phone-to-ubuntu-to-do-developmenttestinginstallations-or-tethering/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
	</channel>
</rss>

