<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CUQMSX8zeyp7ImA9WhVTEEU.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688</id><updated>2012-02-24T03:36:28.183-08:00</updated><category term="Threading" /><category term="ProGard" /><category term="ADB" /><category term="SMS" /><category term="PathFileObserver" /><category term="ACTION_TIME_TICK" /><category term="CountDownTimer" /><category term="BOOT_COMPLETED" /><category term="Email" /><category term="Cygwin" /><category term="Image" /><category term="-wipe-data" /><category term="FileObserver" /><category term="Errors" /><category term="ContentObserver" /><category term="MMS" /><category term="Kindle Fire" /><category term="Contacts" /><category term="Java" /><category term="networking" /><category term="keytool" /><category term="Testing" /><category term="Import Outlook" /><category term="People" /><category term="IllegalStateException" /><category term="configuration" /><category term="FileInputStream" /><category term="Sound" /><category term="Eclipse" /><category term="Call" /><category term="MD5" /><category term="virtual devices" /><category term="serialize" /><category term="Android" /><category term="Animation" /><category term="Ant" /><category term="ANR" /><title>Android Bridge</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://androidbridge.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>46</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/AndroidBridge" /><feedburner:info uri="androidbridge" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CUYHRXo5fyp7ImA9WhRbFk4.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-4072534530058079915</id><published>2012-02-07T08:41:00.000-08:00</published><updated>2012-02-07T08:45:34.427-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-07T08:45:34.427-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="Kindle Fire" /><title>Wi-Fi Keep Alive / On for Kindle Fire</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wZPVQyxHHz058wp7hGJg7xGOsTQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wZPVQyxHHz058wp7hGJg7xGOsTQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wZPVQyxHHz058wp7hGJg7xGOsTQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wZPVQyxHHz058wp7hGJg7xGOsTQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I have uploaded my first app to Amazon App Store, Check it out here&lt;br /&gt;&lt;br /&gt;&lt;h1 class="parseasinTitle "&gt;&lt;a href="http://www.amazon.com/gp/product/B0074WB3IK/ref=cm_cd_asin_lnk"&gt;&lt;span id="btAsinTitle"&gt;Wi-Fi Keep Alive&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;&lt;br /&gt;It is a simple for kindle fire to keep the wi-fi connection always on even the device screen goes off. This might use some extra battery power to keep the Wi Fi up but it wont disconnect your streaming music :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-4072534530058079915?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/X-QCBodxc3Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/4072534530058079915/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2012/02/wi-fi-keep-alive.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/4072534530058079915?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/4072534530058079915?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/X-QCBodxc3Q/wi-fi-keep-alive.html" title="Wi-Fi Keep Alive / On for Kindle Fire" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2012/02/wi-fi-keep-alive.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEBRnwzcSp7ImA9WhRUGUQ.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-3659975098643972528</id><published>2012-01-31T00:26:00.000-08:00</published><updated>2012-01-31T00:30:57.289-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-31T00:30:57.289-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="keytool" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>debug.keystore keystore password ?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Kt2j0JtA_zTPf2LDLogO4wwSBr0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Kt2j0JtA_zTPf2LDLogO4wwSBr0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Kt2j0JtA_zTPf2LDLogO4wwSBr0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Kt2j0JtA_zTPf2LDLogO4wwSBr0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today when i wanted to play with Google Maps, i had to generate a new Certificate fingerprint to include Maps. To generate a new  Certificate  fingerprint you need to use the keytool that comes with the SDK, &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;so i executed this line in the CMD, &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;keytool -list -keystore .android/debug.keystore&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;but it's asking for a password, duh!  after few seacrches on google, I found out, it's &lt;b&gt;android&lt;/b&gt;, type android and you shall passed&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-3659975098643972528?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/CROzySBeLGY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/3659975098643972528/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2012/01/debugkeystore-keystore-password.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/3659975098643972528?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/3659975098643972528?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/CROzySBeLGY/debugkeystore-keystore-password.html" title="debug.keystore keystore password ?" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2012/01/debugkeystore-keystore-password.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMASXs6cSp7ImA9WhRWEUg.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-3674499128407192533</id><published>2011-12-29T02:20:00.000-08:00</published><updated>2011-12-29T02:27:28.519-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-29T02:27:28.519-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>How to add icons to Preference example in Android</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/M-mnuVcmZZYI90h1gU3nSXRNi3k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M-mnuVcmZZYI90h1gU3nSXRNi3k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/M-mnuVcmZZYI90h1gU3nSXRNi3k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M-mnuVcmZZYI90h1gU3nSXRNi3k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div&gt;If you are having a pain in the ass getting this to work. Download the example from &lt;a href="http://www.ziddu.com/download/17996784/preference_icon_example.zip.html"&gt;here&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;http://www.ziddu.com/download/17996784/preference_icon_example.zip.html&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-3674499128407192533?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/34cOGoak3Gg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/3674499128407192533/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/12/how-to-add-icons-to-preference-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/3674499128407192533?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/3674499128407192533?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/34cOGoak3Gg/how-to-add-icons-to-preference-in.html" title="How to add icons to Preference example in Android" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/12/how-to-add-icons-to-preference-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUABQ349fCp7ImA9WhRQE08.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-7501005391743794196</id><published>2011-12-07T22:57:00.000-08:00</published><updated>2011-12-07T23:02:32.064-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-07T23:02:32.064-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse" /><title>StackOverflow error in Eclipse ?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MaO9SpFpCnhiq4MNoJejgP2w1-Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MaO9SpFpCnhiq4MNoJejgP2w1-Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MaO9SpFpCnhiq4MNoJejgP2w1-Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MaO9SpFpCnhiq4MNoJejgP2w1-Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today, friend of mine &lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 32px; background-color: rgb(255, 255, 255); "&gt;Kitaro Nu&lt;/span&gt; shared this information with me.  &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This error is likely to happen if you have two library projects and they both refer each other. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p class="MsoListParagraph" style="margin-bottom: 0.0001pt; text-indent: -18pt; vertical-align: middle; "&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:12.0pt; font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Project A import project B  and Project B import Project A .&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-7501005391743794196?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/FUA_Ce_7E0I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/7501005391743794196/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/12/stackoverflow-error-in-eclipse.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/7501005391743794196?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/7501005391743794196?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/FUA_Ce_7E0I/stackoverflow-error-in-eclipse.html" title="StackOverflow error in Eclipse ?" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/12/stackoverflow-error-in-eclipse.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEESXo5cCp7ImA9WhRRF04.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-6619787496350532999</id><published>2011-12-01T02:47:00.000-08:00</published><updated>2011-12-01T02:50:08.428-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-01T02:50:08.428-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse" /><title>Unable to create editor ID org.eclipse.jdt.ui.PropertiesFileEditor: Editor could not be initialized. Java heap space</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LrPgE_5Ehemzc0SdwKXC64v1kkk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LrPgE_5Ehemzc0SdwKXC64v1kkk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LrPgE_5Ehemzc0SdwKXC64v1kkk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LrPgE_5Ehemzc0SdwKXC64v1kkk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today, after I took the latest version of a component and try to rebuild the work space i started to getting this error. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To solve this, &lt;/div&gt;&lt;div&gt;1. Had to close eclipse and restart&lt;/div&gt;&lt;div&gt;2. Run eclipse with clean command&lt;/div&gt;&lt;div&gt;\eclipse\eclipse.exe -clean&lt;/div&gt;&lt;div&gt;3. delete&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;  workspace\.metadata\.plugins\org.eclipse.jdt.core&lt;/div&gt;&lt;div&gt;  workspace\metadata\.plugins\org.eclipse.core.resources\.history&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;worked for me!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-6619787496350532999?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/Iq_jbfyot_k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/6619787496350532999/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/12/unable-to-create-editor-id.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/6619787496350532999?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/6619787496350532999?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/Iq_jbfyot_k/unable-to-create-editor-id.html" title="Unable to create editor ID org.eclipse.jdt.ui.PropertiesFileEditor: Editor could not be initialized. Java heap space" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/12/unable-to-create-editor-id.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcDRHs4eip7ImA9WhRRFUk.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-1807348853931921266</id><published>2011-11-28T21:00:00.000-08:00</published><updated>2011-11-28T21:04:35.532-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-28T21:04:35.532-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="serialize" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>How to encrypt a serializable class in Android</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AAXpaSyO-4cqDuRh24Duo1wnrH4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AAXpaSyO-4cqDuRh24Duo1wnrH4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AAXpaSyO-4cqDuRh24Duo1wnrH4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AAXpaSyO-4cqDuRh24Duo1wnrH4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;public boolean save(YourClass pref){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;boolean isSuccess = false;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;try {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;final File persistedFile = new File("/sdcard/sr.dat");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;if(persistedFile.exists())&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;persistedFile.delete();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;OutputStream file = new FileOutputStream(persistedFile);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;BufferedOutputStream  buffer = new BufferedOutputStream(file);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Cipher desCipher = getCipher(Cipher.ENCRYPT_MODE);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;CipherOutputStream cos = new CipherOutputStream(buffer, desCipher);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;    ObjectOutputStream oos = new ObjectOutputStream(cos);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;    oos.writeObject(pref);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;    oos.flush();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;    oos.close();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (IOException ex) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, ex.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;isSuccess = false;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (InvalidKeyException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;isSuccess = false;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (InvalidKeySpecException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;isSuccess = false;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (NoSuchAlgorithmException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;isSuccess = false;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (NoSuchPaddingException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;isSuccess = false;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return isSuccess;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;private Cipher getCipher(int opmode) throws InvalidKeyException, InvalidKeySpecException, NoSuchAlgorithmException, NoSuchPaddingException {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;byte key[] = "Aruna Tennakoon".getBytes();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    DESKeySpec desKeySpec = new DESKeySpec(key);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    SecretKey secretKey = keyFactory.generateSecret(desKeySpec);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    // Create Cipher&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    Cipher desCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    desCipher.init(opmode, secretKey);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;    return desCipher;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public Preference load(){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;Preference repo = null;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;try {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;final File persistedFile = File("/sdcard/sr.dat");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;if(!persistedFile.exists()) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;// sr is not created yet. Create one and return&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;return;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Cipher desCipher = getCipher(Cipher.DECRYPT_MODE);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;FileInputStream fis =  new FileInputStream(persistedFile.getAbsolutePath());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;    BufferedInputStream bis = new BufferedInputStream(fis);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;    CipherInputStream cis = new CipherInputStream(bis, desCipher);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;    ObjectInputStream ois = new ObjectInputStream(cis);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;    repo = (YourClass) ois.readObject();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;    &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;    ois.close();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (FileNotFoundException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (StreamCorruptedException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (IOException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (InvalidKeyException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (InvalidKeySpecException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (NoSuchAlgorithmException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (NoSuchPaddingException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.getMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;} catch (ClassNotFoundException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Log.d(TAG, e.printStackTrace());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return repo;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-1807348853931921266?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/Rw9I0HWoWBs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/1807348853931921266/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/11/how-to-encrypt-serializable-class-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/1807348853931921266?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/1807348853931921266?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/Rw9I0HWoWBs/how-to-encrypt-serializable-class-in.html" title="How to encrypt a serializable class in Android" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/11/how-to-encrypt-serializable-class-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YERH4zcCp7ImA9WhRREU0.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-5722019342780236800</id><published>2011-11-23T19:24:00.000-08:00</published><updated>2011-11-23T19:25:05.088-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-23T19:25:05.088-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="networking" /><title>how to get the ip address of android phone?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/bfDBgaotFT1ZU0COLG7VR78zelc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bfDBgaotFT1ZU0COLG7VR78zelc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/bfDBgaotFT1ZU0COLG7VR78zelc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bfDBgaotFT1ZU0COLG7VR78zelc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div&gt;    private String getLocalIpAddress() {&lt;/div&gt;&lt;div&gt;        try {&lt;/div&gt;&lt;div&gt;            for (Enumeration&lt;networkinterface&gt; en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {&lt;/networkinterface&gt;&lt;/div&gt;&lt;div&gt;                NetworkInterface intf = en.nextElement();&lt;/div&gt;&lt;div&gt;                for (Enumeration&lt;inetaddress&gt; enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {&lt;/inetaddress&gt;&lt;/div&gt;&lt;div&gt;                    InetAddress inetAddress = enumIpAddr.nextElement();&lt;/div&gt;&lt;div&gt;                    if (!inetAddress.isLoopbackAddress()) { return inetAddress.getHostAddress().toString(); }&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;        } catch (SocketException ex) {&lt;/div&gt;&lt;div&gt;            Log.e("ServerActivity", ex.toString());&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;        return null;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-5722019342780236800?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/MjDvd6ap-K4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/5722019342780236800/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/11/how-to-get-ip-address-of-android-phone.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5722019342780236800?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5722019342780236800?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/MjDvd6ap-K4/how-to-get-ip-address-of-android-phone.html" title="how to get the ip address of android phone?" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/11/how-to-get-ip-address-of-android-phone.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cAR3s4fyp7ImA9WhRSFU0.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-5253419422573511456</id><published>2011-11-16T19:30:00.000-08:00</published><updated>2011-11-16T19:37:26.537-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-16T19:37:26.537-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>'Conversion to Dalvik format failed with error 1' and 'java.lang.IllegalArgumentException: already added: '</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RBPZekevjgVmANhurkB7HQ6PvWQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RBPZekevjgVmANhurkB7HQ6PvWQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RBPZekevjgVmANhurkB7HQ6PvWQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RBPZekevjgVmANhurkB7HQ6PvWQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div&gt;Recently we moved to Android SDK tools Rev 15 , In my opinion it has may problems comparing to previous versions of the SDK and should stick with the previous version if you are developing a huge applications and have library projects referenced. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Today, I got this error and few hours of Googling found the solution,&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Remove the source folder link in Project properties-&amp;gt;Java Build Path-&amp;gt;Source&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Clean and add the projects back, You will see that it will add the projects as jar files under "Library Projects" not as project_src anymore. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-5253419422573511456?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/A4HYRSiUbIU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/5253419422573511456/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/11/conversion-to-dalvik-format-failed-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5253419422573511456?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5253419422573511456?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/A4HYRSiUbIU/conversion-to-dalvik-format-failed-with.html" title="'Conversion to Dalvik format failed with error 1' and 'java.lang.IllegalArgumentException: already added: '" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/11/conversion-to-dalvik-format-failed-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EARXY7fip7ImA9WhRTF08.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-5074563461153900094</id><published>2011-11-07T19:05:00.001-08:00</published><updated>2011-11-07T19:07:24.806-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-07T19:07:24.806-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Animation" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>How to do a simple visible animation in Android</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cRnyqCBX_wREPwVmpqoSJNtTuk4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cRnyqCBX_wREPwVmpqoSJNtTuk4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cRnyqCBX_wREPwVmpqoSJNtTuk4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cRnyqCBX_wREPwVmpqoSJNtTuk4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div&gt;public void showConfigurationBar() {&lt;/div&gt;&lt;div&gt;                  AnimationSet set = new AnimationSet(true);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                Animation animation = new AlphaAnimation(0.0f, 1.0f);&lt;/div&gt;&lt;div&gt;                  animation.setDuration(500);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                set.addAnimation(animation);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,&lt;/div&gt;&lt;div&gt;                                 Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                                1.0f, Animation.RELATIVE_TO_SELF, 0.0f);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                                &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                animation.setDuration(500);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                set.addAnimation(animation);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                RelativeLayout configBar = findViewById(R.id.baridhere&lt;id_of_the_control_here&gt;);&lt;/id_of_the_control_here&gt;&lt;/div&gt;&lt;div&gt;  configBar.setVisibility(View.VISIBLE);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; configBar.startAnimation(set);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;        }&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-5074563461153900094?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/G5XtQmF4cxo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/5074563461153900094/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/11/how-to-do-simple-visible-animation-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5074563461153900094?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5074563461153900094?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/G5XtQmF4cxo/how-to-do-simple-visible-animation-in.html" title="How to do a simple visible animation in Android" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/11/how-to-do-simple-visible-animation-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QFRHw4fyp7ImA9WhRTF08.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-1628842572676634250</id><published>2011-11-07T19:00:00.000-08:00</published><updated>2011-11-07T19:01:55.237-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-07T19:01:55.237-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MD5" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>How to generate a MD5 Hash in Android</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AUobJkLmv3nvac0Oaw7-qBg9lAQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AUobJkLmv3nvac0Oaw7-qBg9lAQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AUobJkLmv3nvac0Oaw7-qBg9lAQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AUobJkLmv3nvac0Oaw7-qBg9lAQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;b&gt;&lt;div&gt;&lt;div&gt;   public static String getMd5Hash(String input) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                try {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                        MessageDigest md = MessageDigest.getInstance("MD5");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                        byte[] messageDigest = md.digest(input.getBytes());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                        BigInteger number = new BigInteger(1, messageDigest);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                        String md5 = number.toString(16);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                        while (md5.length() &amp;lt; 32)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                                md5 = "0" + md5;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                        return md5;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                } catch (NoSuchAlgorithmException e) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                        Log.e("MD5", e.getLocalizedMessage());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                        return null;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;        }&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-1628842572676634250?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/gLVHgzloVwY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/1628842572676634250/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/11/how-to-create-md5-hash-in-android.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/1628842572676634250?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/1628842572676634250?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/gLVHgzloVwY/how-to-create-md5-hash-in-android.html" title="How to generate a MD5 Hash in Android" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/11/how-to-create-md5-hash-in-android.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQCRXY5fyp7ImA9WhRVEko.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-8331780530853112488</id><published>2011-11-01T02:56:00.001-07:00</published><updated>2012-01-11T00:59:24.827-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-11T00:59:24.827-08:00</app:edited><title>Eclipse Layout Editor Graphical Layout is not Showing or missing ?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Chu8YrIoH6gPWhbR6P-CulkLCVQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Chu8YrIoH6gPWhbR6P-CulkLCVQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Chu8YrIoH6gPWhbR6P-CulkLCVQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Chu8YrIoH6gPWhbR6P-CulkLCVQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: fixed-width, monospace; font-size: 12px; background-color: rgb(255, 255, 255); "&gt;Specify the Android Layout Editor as &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: fixed-width, monospace; font-size: 12px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); "&gt;the default for Android XML files under Preferences -&amp;gt; General- &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: fixed-width, monospace; font-size: 12px; background-color: rgb(255, 255, 255); "&gt;&amp;gt;Editors-&amp;gt;File Associations.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: fixed-width, monospace; font-size: 12px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); "&gt; &lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: fixed-width, monospace; font-size: 12px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: fixed-width, monospace; font-size: 12px; background-color: rgb(255, 255, 255); "&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 290px; height: 320px;" src="http://4.bp.blogspot.com/-y9gzJUrrRlc/Tw1Oxo2OGQI/AAAAAAAAAJM/a_G1MIS6sNc/s320/preference.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5696295718378936578" /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: fixed-width, monospace; font-size: 12px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: fixed-width, monospace; font-size: 12px; background-color: rgb(255, 255, 255); "&gt;1. If Android layout editor is missing Add Android Layout Editor and make it default.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: fixed-width, monospace; font-size: 12px; background-color: rgb(255, 255, 255); "&gt;2. Close eclipse and restart. Otherwise this will not work.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-8331780530853112488?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/Vyxdnw75nEE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/8331780530853112488/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/11/eclipse-layout-editor-not-showing.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/8331780530853112488?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/8331780530853112488?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/Vyxdnw75nEE/eclipse-layout-editor-not-showing.html" title="Eclipse Layout Editor Graphical Layout is not Showing or missing ?" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-y9gzJUrrRlc/Tw1Oxo2OGQI/AAAAAAAAAJM/a_G1MIS6sNc/s72-c/preference.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/11/eclipse-layout-editor-not-showing.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EMQng5fCp7ImA9WhRTEEs.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-8997683241789401984</id><published>2011-10-31T04:43:00.000-07:00</published><updated>2011-10-31T04:48:03.624-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-31T04:48:03.624-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="CountDownTimer" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>CountDownTimer Error: Can't create handler inside thread that has not called Looper.prepare()</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/14MNHcXLJ-81rjvAI6s5PhjIiac/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/14MNHcXLJ-81rjvAI6s5PhjIiac/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/14MNHcXLJ-81rjvAI6s5PhjIiac/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/14MNHcXLJ-81rjvAI6s5PhjIiac/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today I was getting this error "Can't create handler inside thread that has not called Looper.prepare()" in a CountDownTimer. All this time this code used to work perfectly but suddenly it stopped. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Problem is, in CountDownTimer.java (Android source code) it creates a &lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; white-space: pre; "&gt;mHandler &lt;/span&gt;inside the code which makes the caller should call the CountDownTimer class on UI thread which is not possible in my case. So I created a separate Timer class,&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Timer cTimer = new Timer();&lt;/div&gt;&lt;div&gt;private final static int START_FROM = 60;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;cTimer.scheduleAtFixedRate(new TimerTask() {&lt;/div&gt;&lt;div&gt;            int i = START_FROM ;&lt;/div&gt;&lt;div&gt;            public void run() {&lt;/div&gt;&lt;div&gt;                Log.d(TAG, "Comparison will start in:" + i--);&lt;/div&gt;&lt;div&gt;                if (i&amp;lt; 0) {&lt;/div&gt;&lt;div&gt;                &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;cTimer.cancel();&lt;/div&gt;&lt;div&gt;                &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;// Do something&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;        }, 0, 1000);&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-8997683241789401984?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/Zf-nvayfafk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/8997683241789401984/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/10/countdowntimer-error-cant-create.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/8997683241789401984?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/8997683241789401984?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/Zf-nvayfafk/countdowntimer-error-cant-create.html" title="CountDownTimer Error: Can't create handler inside thread that has not called Looper.prepare()" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/10/countdowntimer-error-cant-create.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ABRXczfSp7ImA9WhdaFU4.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-7195257167958774221</id><published>2011-10-25T03:32:00.000-07:00</published><updated>2011-10-25T03:49:14.985-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-25T03:49:14.985-07:00</app:edited><title>How to enable/disable Mobile Data on Android 2.3</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/paphHXh5cl5CVjrkRGV-I9funmA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/paphHXh5cl5CVjrkRGV-I9funmA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/paphHXh5cl5CVjrkRGV-I9funmA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/paphHXh5cl5CVjrkRGV-I9funmA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today, colleague asked me whether i know how to enable and disable mobile internet on Android ? Actually, I was curious about this for sometime and never had the time to look into how to do this. So this is how to do it. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I tired it on  Android 2.3 i tried this code and it worked! When I looked into Android source code I saw this method is available 2.2 R1 up.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;private boolean getMobileDataEnabled() {&lt;/div&gt;&lt;div&gt;        try {&lt;/div&gt;&lt;div&gt;            Method method = connectivityManager.getClass().getMethod("getMobileDataEnabled");&lt;/div&gt;&lt;div&gt;            return (Boolean) method.invoke(connectivityManager);&lt;/div&gt;&lt;div&gt;        } catch (Exception e) {&lt;/div&gt;&lt;div&gt;            e.printStackTrace();&lt;/div&gt;&lt;div&gt;            return false;&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    private void setMobileDataEnabled(boolean on) {&lt;/div&gt;&lt;div&gt;        try {&lt;/div&gt;&lt;div&gt;            Method method = connectivityManager.getClass().getMethod("setMobileDataEnabled", boolean.class);&lt;/div&gt;&lt;div&gt;            method.invoke(connectivityManager, on);&lt;/div&gt;&lt;div&gt;        } catch (NoSuchMethodException e) {&lt;/div&gt;&lt;div&gt;            e.printStackTrace();&lt;/div&gt;&lt;div&gt;        } catch (Exception e) {&lt;/div&gt;&lt;div&gt;            e.printStackTrace();&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are using 2.2 R1 or later try &lt;a href="http://stackoverflow.com/questions/3644144/how-to-disable-mobile-data-on-android"&gt;this &lt;/a&gt;code. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-7195257167958774221?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/uVVepmkcLQY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/7195257167958774221/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/10/how-to-enabledisable-mobile-data-on.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/7195257167958774221?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/7195257167958774221?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/uVVepmkcLQY/how-to-enabledisable-mobile-data-on.html" title="How to enable/disable Mobile Data on Android 2.3" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/10/how-to-enabledisable-mobile-data-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUADR3syfip7ImA9WhdaEE8.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-3998750896671297186</id><published>2011-10-19T04:25:00.000-07:00</published><updated>2011-10-19T04:29:36.596-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-19T04:29:36.596-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="Contacts" /><title>android.content.OperationApplicationException: wrong number of rows: 0</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/t7Y9fBekMrganY_b6GHttxz9GD4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/t7Y9fBekMrganY_b6GHttxz9GD4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/t7Y9fBekMrganY_b6GHttxz9GD4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/t7Y9fBekMrganY_b6GHttxz9GD4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today I got this error tying to update a contact in Android 2.3 Nexus S device which was working fine on Motorola Milestone (Android 2.1 - update 1). Reason was I was getting the "withExpectedCount" parameter as 1 &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;ops.add(ContentProviderOperation. newInsert(addCallerIsSyncAdapterParameter(ContactsContract.Data.CONTENT_URI))&lt;/div&gt;&lt;div&gt;.withValue(ContactsContract.Data.RAW_CONTACT_ID, contact.getId())&lt;/div&gt;&lt;div&gt;.withValue(ContactsContract.Data.MIMETYPE, CommonDataKinds.Phone.CONTENT_ITEM_TYPE)&lt;/div&gt;&lt;div&gt;.withValue(CommonDataKinds.Phone.NUMBER, phone)&lt;/div&gt;&lt;div&gt;.withValue(CommonDataKinds.Phone.TYPE, cm.getType()).withExpectedCount(1).build());&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When i removed it it worked fine .. Looks like if the original and updating content values are same it does not update the row :|&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-3998750896671297186?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/_oV45Cya7ps" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/3998750896671297186/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/10/androidcontentoperationapplicationexcep.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/3998750896671297186?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/3998750896671297186?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/_oV45Cya7ps/androidcontentoperationapplicationexcep.html" title="android.content.OperationApplicationException: wrong number of rows: 0" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/10/androidcontentoperationapplicationexcep.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UNSXk9eSp7ImA9WhdUEUw.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-266323552526213286</id><published>2011-09-27T01:11:00.000-07:00</published><updated>2011-09-27T01:14:58.761-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-27T01:14:58.761-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>How to brick your android device?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wF0y8fZs8lz9O5oCYgP24JJVUV8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wF0y8fZs8lz9O5oCYgP24JJVUV8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wF0y8fZs8lz9O5oCYgP24JJVUV8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wF0y8fZs8lz9O5oCYgP24JJVUV8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today, While I was digging into android source code, I found this.  Never tried it. Drop me a message here if you do.&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 255); font-family: monospace; white-space: pre; background-color: rgb(255, 255, 255); font-size: medium; "&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   &gt;&lt;b&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;package com.android.server;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;import android.content.Context;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;import android.content.Intent;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;import android.content.BroadcastReceiver;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;import android.os.SystemService;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;import android.util.Log;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;public class BrickReceiver extends BroadcastReceiver {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;    @Override&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;    public void onReceive(Context context, Intent intent) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;        Log.w("BrickReceiver", "!!! BRICKING DEVICE !!!");&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;        SystemService.start("brick");&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;    }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style="white-space: pre; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="white-space: pre; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.netmite.com/android/mydroid/frameworks/base/services/java/com/android/server/BrickReceiver.java"&gt;http://www.netmite.com/android/mydroid/frameworks/base/services/java/com/android/server/BrickReceiver.java&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-266323552526213286?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/KMA6qFaBlOA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/266323552526213286/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/09/how-to-brick-your-android-device.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/266323552526213286?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/266323552526213286?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/KMA6qFaBlOA/how-to-brick-your-android-device.html" title="How to brick your android device?" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/09/how-to-brick-your-android-device.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAAQHo9eSp7ImA9WhdVF0o.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-5225962541888167483</id><published>2011-09-23T03:12:00.000-07:00</published><updated>2011-09-23T03:12:21.461-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-23T03:12:21.461-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="configuration" /><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>How to debug Android source code in Eclipse?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AsEK3Mg9icpGAK-s_M6E2DuaB3w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AsEK3Mg9icpGAK-s_M6E2DuaB3w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AsEK3Mg9icpGAK-s_M6E2DuaB3w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AsEK3Mg9icpGAK-s_M6E2DuaB3w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today, I wanted to know what's going on inside Android because it was keep throwing an exception . So i wanted to check how to debug an Android application right from Eclipse IDE. When I googled I found this link,&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://android.opensourceror.org/2010/01/18/android-source/"&gt;http://android.opensourceror.org/2010/01/18/android-source/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
but it says how to debug a single version of android eg. Cupcake.  Now problem is how to debug multiple versions of Android ?&lt;br /&gt;
&lt;br /&gt;
it's easy.&lt;br /&gt;
&lt;br /&gt;
all you have to do is open  the .project in notepad&lt;br /&gt;
\workspace\.metadata\.plugins\org.eclipse.jdt.core\.org.eclipse.jdt.core.external.folders&lt;br /&gt;
&lt;br /&gt;
and another &lt;link&gt;&lt;/link&gt; element to the &lt;linkedresources&gt; section.&lt;br /&gt;&lt;/linkedresources&gt;&lt;br /&gt;
&lt;pre&gt;&lt;projectdescription&gt;&lt;name&gt;&lt;/name&gt;
&lt;link&gt;&lt;/link&gt;
         &lt;name&gt;.link0&lt;/name&gt;
         &lt;type&gt;2&lt;/type&gt;
         &lt;location&gt;C:/Aruna/Android/android-sdk_r08-windows/android-sdk-windows/Cupcake&lt;/location&gt;
  
     &lt;link&gt;&lt;/link&gt;
         &lt;name&gt;.link1&lt;/name&gt;
         &lt;type&gt;2&lt;/type&gt;
         &lt;location&gt;C:/Aruna/Android/android-sdk_r08-windows/android-sdk-windows/Donut&lt;/location&gt;
  
&lt;comment&gt;&lt;/comment&gt;&lt;projects&gt;&lt;/projects&gt;&lt;buildspec&gt;&lt;/buildspec&gt;&lt;natures&gt;
&lt;/natures&gt;
&lt;linkedresources&gt;&lt;/linkedresources&gt;&lt;/projectdescription&gt;&lt;/pre&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-5225962541888167483?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/hxupC2XFpOA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/5225962541888167483/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/09/how-to-debug-android-source-code-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5225962541888167483?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5225962541888167483?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/hxupC2XFpOA/how-to-debug-android-source-code-in.html" title="How to debug Android source code in Eclipse?" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/09/how-to-debug-android-source-code-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QAR3s4fip7ImA9WhRREU0.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-7114562008394253320</id><published>2011-09-23T03:10:00.000-07:00</published><updated>2011-11-23T19:29:06.536-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-23T19:29:06.536-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="IllegalStateException" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>IllegalStateException: Couldn't init cursor window</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DI0W1GFiNjHxXGI4LAOQcJck4go/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DI0W1GFiNjHxXGI4LAOQcJck4go/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DI0W1GFiNjHxXGI4LAOQcJck4go/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DI0W1GFiNjHxXGI4LAOQcJck4go/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today one of our application started getting this exception.&lt;br /&gt;&lt;blockquote&gt;java.lang.IllegalStateException: Couldn't init cursor window     at android.database.CursorWindow.native_init(Native Method)     at android.database.CursorWindow.&lt;init&gt;(CursorWindow.java:41)     at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:277)     at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)&lt;/init&gt;&lt;/blockquote&gt;After few hours of googling, I found the solution to this problem. Solution is to close the Cursor after after you are done!This exception is thrown here  &lt;br /&gt;&lt;blockquote&gt;&lt;blockquote&gt;if (!window-&amp;gt;initBuffer(localOnly)) {        jniThrowException(env, "java/lang/IllegalStateException", "Couldn't init cursor window");        delete window;        return;    }&lt;/blockquote&gt;&lt;/blockquote&gt;localOnly is defined in&lt;br /&gt;&lt;blockquote&gt;CursorWindow.h &lt;/blockquote&gt;as&lt;br /&gt;&lt;blockquote&gt;#define MAX_WINDOW_SIZE (1024 * 1024)&lt;/blockquote&gt;So, There are two possible causes to throw this exception. 1. Your mobile phone is out of memory.2. You are fetching something out of the database more than 1M. If there is a logical way to divide your queries into discrete chunks, you could do incremental queries and use &lt;a href="http://developer.android.com/reference/android/database/CursorJoiner.html"&gt;CursorJoiner &lt;/a&gt;to stitch them together that might help you if you are dealing with big chuck of data.  &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So lesson learned, Close the cursor in a try finally block&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cursor cursor;&lt;/div&gt;&lt;div&gt;try {&lt;/div&gt;&lt;div&gt;  cursor.open();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;finally{&lt;/div&gt;&lt;div&gt;if(cursor.isOpen()) {&lt;/div&gt;&lt;div&gt; cursor.close();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-7114562008394253320?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/AVcww46xKvk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/7114562008394253320/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/09/illegalstateexception-couldnt-init.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/7114562008394253320?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/7114562008394253320?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/AVcww46xKvk/illegalstateexception-couldnt-init.html" title="IllegalStateException: Couldn't init cursor window" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/09/illegalstateexception-couldnt-init.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUEQXYzeip7ImA9WhdWFE0.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-1907552326813595791</id><published>2011-09-07T08:04:00.000-07:00</published><updated>2011-09-07T08:10:00.882-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-07T08:10:00.882-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Error retrieving parent for item: No resource found that matches the given name 'android:WindowTitleBackground'.</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lHzqhbc8LKXXGypdwOa5-BwFw5Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lHzqhbc8LKXXGypdwOa5-BwFw5Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lHzqhbc8LKXXGypdwOa5-BwFw5Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lHzqhbc8LKXXGypdwOa5-BwFw5Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today while trying to compile a project I got for &lt;a href="https://github.com/thanksmister/CustomTitleBar"&gt;github &lt;/a&gt; I got this error. &lt;br /&gt;&lt;br /&gt;Error retrieving parent for item: No resource found that matches the given name 'android:WindowTitleBackground'.&lt;br /&gt;&lt;br /&gt;It's so annoying because it worked perfectly in one machine and on my laptop it did not. When I was almost given up I thought of replacing the platform tools with old platform tools and it worked!!&lt;br /&gt;&lt;br /&gt;Download the revision 11 tools from &lt;a href="http://dl.google.com/android/repository/tools_r11-windows.zip"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;http://dl.google.com/android/repository/tools_r11-windows.zip&lt;br /&gt;&lt;br /&gt;and rename your platform-tools folder in android-sdk-windows and paste this there. That should work!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-1907552326813595791?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/dQf5UZ_hmCQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/1907552326813595791/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/09/error-retrieving-parent-for-item-no.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/1907552326813595791?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/1907552326813595791?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/dQf5UZ_hmCQ/error-retrieving-parent-for-item-no.html" title="Error retrieving parent for item: No resource found that matches the given name 'android:WindowTitleBackground'." /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/09/error-retrieving-parent-for-item-no.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8NQHg7eip7ImA9WhdXEE8.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-1903460070361970825</id><published>2011-08-22T06:45:00.000-07:00</published><updated>2011-08-22T06:48:11.602-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-22T06:48:11.602-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>How call a method/function inside a APK file in Android?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-d6XSiucQU7hpU5gB09a-VAcE6Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-d6XSiucQU7hpU5gB09a-VAcE6Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-d6XSiucQU7hpU5gB09a-VAcE6Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-d6XSiucQU7hpU5gB09a-VAcE6Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today I came across this piece of code and thought of sharing it with others. 
&lt;br /&gt;
&lt;br /&gt;PathClassLoader c = new PathClassLoader("/system/app/Mms.apk", getClassLoader());
&lt;br /&gt;Class.forName("com.android.mms.util.ContactInfoCache", true, c)
&lt;br /&gt;    .getMethod("init", Context.class).invoke(null, context);
&lt;br /&gt;Class.forName("com.android.mms.transaction.MessagingNotification", true, c)
&lt;br /&gt;    .getMethod("updateAllNotifications", Context.class).invoke(null, context);
&lt;br /&gt;
&lt;br /&gt;This piece of code will trigger Android new message arrival notification. Interesting ... &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-1903460070361970825?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/vEfb6owna8E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/1903460070361970825/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/08/how-call-methodfunction-inside-apk-file.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/1903460070361970825?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/1903460070361970825?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/vEfb6owna8E/how-call-methodfunction-inside-apk-file.html" title="How call a method/function inside a APK file in Android?" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/08/how-call-methodfunction-inside-apk-file.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYCQXY8fip7ImA9WhdRFU8.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-2680747508345484835</id><published>2011-08-04T22:39:00.000-07:00</published><updated>2011-08-04T22:46:00.876-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-04T22:46:00.876-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Type The method compareTo(Request) of type Request must override a superclass method ? haa?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/brbU9kOtx1_euDR3nQtOFIGHPsQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/brbU9kOtx1_euDR3nQtOFIGHPsQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/brbU9kOtx1_euDR3nQtOFIGHPsQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/brbU9kOtx1_euDR3nQtOFIGHPsQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;We were working on Eclipse Galileo  and moved to the new version Indigo but some of the projects that were working fine in Galileo started trowing this exception. Problem is in Galileo Java compiler compliance is set to JRE 1.6 but in Indigo it's set to 1.5 for some reason. &lt;br /&gt;&lt;br /&gt;So to fix this error you need to change the compliance to 1.6 back, To do this, Go to your Window -&gt; Preferences -&gt; Java -&gt; Compiler -&gt; Set to 1.6 and set the java compiler level to 1.6 and also make sure you select JRE 1.6 to execute your program from eclipse.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-2680747508345484835?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/GVQR2F_mkgs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/2680747508345484835/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/08/type-method-comparetorequest-of-type.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/2680747508345484835?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/2680747508345484835?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/GVQR2F_mkgs/type-method-comparetorequest-of-type.html" title="Type The method compareTo(Request) of type Request must override a superclass method ? haa?" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/08/type-method-comparetorequest-of-type.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8NQnk-fCp7ImA9WhdREUQ.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-2279273198386527674</id><published>2011-08-01T04:18:00.000-07:00</published><updated>2011-08-01T04:24:53.754-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-01T04:24:53.754-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="ContentObserver" /><title>Android ContentObserver not getting notify ?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Xg_KDUHAhVzaB4owPbsFoHBN6K8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Xg_KDUHAhVzaB4owPbsFoHBN6K8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Xg_KDUHAhVzaB4owPbsFoHBN6K8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Xg_KDUHAhVzaB4owPbsFoHBN6K8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today, I ran into a problem where my content observer is not getting notify when I delete something. After hours of searching I realized, sometime you need to set the &lt;br /&gt;notifyForDescendents parameter as true. Weird but it worked!&lt;br /&gt;&lt;br /&gt;Eg.&lt;br /&gt;&lt;br /&gt;registerContentObserver(uri, true, observer);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-2279273198386527674?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/niyze7tePnI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/2279273198386527674/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/08/android-contentobserver-not-getting.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/2279273198386527674?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/2279273198386527674?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/niyze7tePnI/android-contentobserver-not-getting.html" title="Android ContentObserver not getting notify ?" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/08/android-contentobserver-not-getting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcCSXo4eip7ImA9WhdREUQ.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-5525744160277472617</id><published>2011-08-01T03:48:00.000-07:00</published><updated>2011-08-01T03:54:28.432-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-01T03:54:28.432-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ACTION_TIME_TICK" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>How to use ACTION_TIME_TICK broadcast  ?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/suN-TlXWN2CFVR3fE3sL8aBWonQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/suN-TlXWN2CFVR3fE3sL8aBWonQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/suN-TlXWN2CFVR3fE3sL8aBWonQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/suN-TlXWN2CFVR3fE3sL8aBWonQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today, I was looking into how to track change notification to the camera folder in Android. While Googling for this, I came across ACTION_TIME_TICK broadcast event. &lt;br /&gt;&lt;br /&gt;Android Doc says&lt;br /&gt;public static final String ACTION_TIME_TICK&lt;br /&gt;The current time has changed. Sent every minute. You can not receive this through components declared in manifests, only by exlicitly registering for it with Context.registerReceiver().&lt;br /&gt;&lt;br /&gt;Sometimes we use a backgroud timer in our application to check for something in a continues loop but I think listening to this event is much better approach, but you have to make sure it's thread safe.&lt;br /&gt;&lt;br /&gt;How to use.&lt;br /&gt;&lt;br /&gt; @Override&lt;br /&gt; public void onCreate(){&lt;br /&gt;  super.onCreate();&lt;br /&gt;  &lt;br /&gt;  registerReceiver(&lt;br /&gt;    new ThikReceiver(), &lt;br /&gt;    new IntentFilter(Intent.ACTION_TIME_TICK));  &lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class ThikReceiver extends BroadcastReceiver {&lt;br /&gt;&lt;br /&gt; @Override&lt;br /&gt; public void onReceive(Context context, Intent intent) {&lt;br /&gt;  if(intent.getAction().compareTo(Intent.ACTION_TIME_TICK) == 0)&lt;br /&gt;    // Do something&lt;br /&gt;  else&lt;br /&gt;    // Do something else&lt;br /&gt; }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-5525744160277472617?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/yNXWI7ZeKuQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/5525744160277472617/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/08/how-to-use-actiontimetick-broadcast.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5525744160277472617?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5525744160277472617?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/yNXWI7ZeKuQ/how-to-use-actiontimetick-broadcast.html" title="How to use ACTION_TIME_TICK broadcast  ?" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/08/how-to-use-actiontimetick-broadcast.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUERHs7cSp7ImA9WhdSGU4.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-7774340522189912154</id><published>2011-07-29T02:30:00.000-07:00</published><updated>2011-07-29T02:36:45.509-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-29T02:36:45.509-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Threading" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>How to create a thread in android without hurting the UI</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4iEQb_8Zo-oRt6XT9-w0Un6SWtI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4iEQb_8Zo-oRt6XT9-w0Un6SWtI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4iEQb_8Zo-oRt6XT9-w0Un6SWtI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4iEQb_8Zo-oRt6XT9-w0Un6SWtI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Sometimes when we want to do something out of the ordinary like pushing something to the server while user is playing a game or checking emails we create Threads. If you do not set the thread priority to low this might hurt the UI performance. &lt;br /&gt;&lt;br /&gt;Correct way to do is to call setPriority in the thread class. &lt;br /&gt;&lt;br /&gt;SomeTaskThread someTaskThread = new SomeTaskThread();&lt;br /&gt;someTaskThread.setPriority(Thread.NORM_PRIORITY-1); //Make the background thread low priority. This way it will not affect the UI performance&lt;br /&gt;someTaskThread.start();&lt;br /&gt;&lt;br /&gt;or you can use AsyncTask class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-7774340522189912154?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/CTb9F9IpRUs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/7774340522189912154/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/07/how-to-create-thread-in-android-without.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/7774340522189912154?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/7774340522189912154?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/CTb9F9IpRUs/how-to-create-thread-in-android-without.html" title="How to create a thread in android without hurting the UI" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/07/how-to-create-thread-in-android-without.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMCRHc-fCp7ImA9WhdTGUU.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-5200046944072862354</id><published>2011-07-18T04:23:00.001-07:00</published><updated>2011-07-18T04:27:45.954-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-18T04:27:45.954-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Testing" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Unable to find instrumentation target package ? duh!</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/SARr6GX5w4E5AJ2_O2EeK0tJG_Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SARr6GX5w4E5AJ2_O2EeK0tJG_Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/SARr6GX5w4E5AJ2_O2EeK0tJG_Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SARr6GX5w4E5AJ2_O2EeK0tJG_Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today I was trying to write some test cases after i got inspired by this &lt;a href="http://www.gubatron.com/blog/2010/05/02/how-to-do-unit-testing-on-android-with-eclipse/"&gt;link&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Problem was I was keep getting "Unable to find instrumentation target package" Error and not sure how to fix it. Well there are few ways to fix this problem. Easy way out is:&lt;br /&gt;&lt;br /&gt;1.Double click on the AndroidManifest.xml&lt;br /&gt;&lt;br /&gt;Delete any "instrumentation" tags&lt;br /&gt;&lt;br /&gt;2.Goto Instrumentation Tab&lt;br /&gt;3.Click Add&lt;br /&gt;4.Select  Instrumentation&lt;br /&gt;5. Select the name and target package. &lt;br /&gt;&lt;br /&gt;This should work. Trying to add the Instrumentation manually is a nightmare. &lt;br /&gt;&lt;br /&gt;Hope this will help to someone else&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-5200046944072862354?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/ZG9Z2Dqu5rY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/5200046944072862354/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/07/unable-to-find-instrumentation-target.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5200046944072862354?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/5200046944072862354?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/ZG9Z2Dqu5rY/unable-to-find-instrumentation-target.html" title="Unable to find instrumentation target package ? duh!" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/07/unable-to-find-instrumentation-target.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MGQHg8eCp7ImA9WhZaF0s.&quot;"><id>tag:blogger.com,1999:blog-1089315940126984688.post-9014131870785319993</id><published>2011-07-03T23:32:00.000-07:00</published><updated>2011-07-03T23:37:01.670-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-03T23:37:01.670-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ANR" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>How do I investigate an Application Not Responding (ANR) in Android?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/w9zTYxnr644ZzHM6cIV7G3q9jio/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/w9zTYxnr644ZzHM6cIV7G3q9jio/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/w9zTYxnr644ZzHM6cIV7G3q9jio/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/w9zTYxnr644ZzHM6cIV7G3q9jio/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today I got an ANR error and it's really annoying because you know you have done something wrong and not sure where to look for to find out the problem. &lt;br /&gt;&lt;br /&gt;When I googled, I found this on StackOverFlow. &lt;br /&gt;&lt;br /&gt;"An ANR happens when some long operation takes place in the "main" thread. This is the event loop thread, and if it is busy, Android cannot process any further GUI events in the application, and thus throws up an ANR dialog." - From Stackoverflow&lt;br /&gt;&lt;br /&gt;so, how to diagnose the problem, it's easy, &lt;br /&gt;&lt;br /&gt;adb shell cat /data/anr/traces.txt&lt;br /&gt;&lt;br /&gt;will drump all the appplication not responding traces to the command prompt. (Make sure to change the command prompt buffer size otherwise you can not see the full log out)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1089315940126984688-9014131870785319993?l=androidbridge.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AndroidBridge/~4/-70-1l7sSYo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://androidbridge.blogspot.com/feeds/9014131870785319993/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://androidbridge.blogspot.com/2011/07/how-do-i-investigate-application-not.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/9014131870785319993?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1089315940126984688/posts/default/9014131870785319993?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AndroidBridge/~3/-70-1l7sSYo/how-do-i-investigate-application-not.html" title="How do I investigate an Application Not Responding (ANR) in Android?" /><author><name>Aruna Tennakoon</name><uri>http://www.blogger.com/profile/13691654998632008962</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://androidbridge.blogspot.com/2011/07/how-do-i-investigate-application-not.html</feedburner:origLink></entry></feed>

