<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Start IT up &#187; android</title>
	<atom:link href="http://www.techjini.com/blog/category/android/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techjini.com/blog</link>
	<description>The blog of TechJini Solutions</description>
	<lastBuildDate>Fri, 30 Dec 2011 10:31:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Insert and modify Contact in Android</title>
		<link>http://www.techjini.com/blog/2011/10/31/insert-and-modify-contact-in-android/</link>
		<comments>http://www.techjini.com/blog/2011/10/31/insert-and-modify-contact-in-android/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 12:51:13 +0000</pubDate>
		<dc:creator>Shweta</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[android contact api]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=668</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/10/31/insert-and-modify-contact-in-android/' addthis:title='Insert and modify Contact in Android '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Android 2.0 provides new Contact API, which is defined in  android.provider.ContactsContract.  After some try on contact api I found a<a href="http://www.techjini.com/blog/2011/10/31/insert-and-modify-contact-in-android/" class="searchmore">Read the Rest...</a><div class="clr"></div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/10/31/insert-and-modify-contact-in-android/' addthis:title='Insert and modify Contact in Android ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/10/31/insert-and-modify-contact-in-android/' addthis:title='Insert and modify Contact in Android '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><div>Android 2.0 provides new Contact API, which is defined in  android.provider.ContactsContract.  After some try on contact api I found a better and easy solution for insertion and modification of contact.</div>
<p><code> </code></p>
<div><strong>Insert contact -</strong></div>
<p><code> </code></p>
<div><code>Intent addContactIntent = new Intent(Intent.ACTION_INSERT,		ContactsContract.Contacts.CONTENT_URI);</code></div>
<p><code> </code></p>
<div><code>addContactIntent.putExtra(ContactsContract.Intents.Insert.NAME,</code></div>
<p><code> </code></p>
<div><code>"xyz");</code></div>
<p><code> </code></p>
<div><code>addContactIntent.putExtra(ContactsContract.Intents.Insert.EMAIL,</code></div>
<p><code> </code></p>
<div><code>"abc@gmail.com");</code></div>
<p><code> </code></p>
<div><code>addContactIntent.putExtra(ContactsContract.Intents.Insert.PHONE,"012345678");</code></div>
<p><code></p>
<div>startActivity(addContactIntent);</div>
<p></code></p>
<div>ACTION_INSERT will start .EditContact activity.</div>
<p><code> </code></p>
<div><strong>Edit contacts -</strong></div>
<div>
<ul>
<li><strong>If _ID of contact is known</strong> -</li>
</ul>
</div>
<p><code> </code></p>
<div><code>Intent intent = new Intent(Intent.ACTION_EDIT);</code></div>
<p><code> </code></p>
<div><code>intent.setData(ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, _ID));</code></div>
<p><code> </code></p>
<div><code>startActivity(intent);</code></div>
<p><code> </code></p>
<div>
<ul>
<li><strong>If _ID of contact is not known -</strong></li>
</ul>
</div>
<div><strong>i)</strong> Find out conatct _ID by phone number .</div>
<div><code>// CONTENT_FILTER_URI allow to search contact by phone number</code></div>
<p><code> </code></p>
<div><code>Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(getPhone()));</code></div>
<p><code> </code></p>
<div><code>// This query will return NAME and ID of conatct, associated with phone //number.</code></div>
<p><code> </code></p>
<div><code>Cursor mcursor = getContentResolver().query(lookupUri,new String[] { PhoneLookup.DISPLAY_NAME, PhoneLookup._ID                    },null, null, null);</code></div>
<p><code> </code></p>
<div><code>//Now retrive _ID from query result</code></div>
<p><code> </code></p>
<div><code>long idPhone = 0;</code></div>
<p><code></p>
<div>try {</div>
<div>if (mcursor != null) {</div>
<div>if (mcursor.moveToFirst()) {</div>
<div>idPhone = Long.valueOf(mcursor.getString(mcursor			.getColumnIndex(PhoneLookup._ID)));</div>
<div>Log.d("", "Contact id::" + idPhone);</div>
<div>}</div>
<div>}</div>
<div>} finally {</div>
<div>mcursor.close();</div>
<div>}</div>
<p></code></p>
<div><strong>ii)</strong> Then Edit contact</div>
<p><code> </code></p>
<div><code>if (idPhone &gt; 0) {</code></div>
<p><code></p>
<div>Intent intent = new Intent(Intent.ACTION_EDIT);</div>
<div>intent.setData(ContentUris.withAppendedId(	ContactsContract.Contacts.CONTENT_URI, idPhone));</div>
<div>startActivity(intent);</div>
<div>} else {</div>
<div>Toast.makeText(getApplicationContext(), "contact not in list",</div>
<div>Toast.LENGTH_SHORT).show();</div>
<div>}</div>
<p></code></p>
<div>You can also search _ID by partial name, for this instead of PhoneLookup.CONTENT_FILTER_URI use ContactsContract.Contacts.CONTENT_FILTER_URI</div>
<div>To work with contact, you have to define special permission in AndroidManifest.xml .</div>
<p><code> </code></p>
<div><code>&lt;uses-permission android:name="android.permission.READ_CONTACTS" /&gt;</code></div>
<p><code> </code></p>
<div><code>&lt;uses-permission android:name="android.permission.WRITE_CONTACTS" /&gt;</code></div>
<p><code> </code></p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/10/31/insert-and-modify-contact-in-android/' addthis:title='Insert and modify Contact in Android ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.techjini.com/blog/2011/10/31/insert-and-modify-contact-in-android/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Historical timeline charts related to computer/electronics</title>
		<link>http://www.techjini.com/blog/2011/10/10/historical-timeline-charts-related-to-computerelectronics/</link>
		<comments>http://www.techjini.com/blog/2011/10/10/historical-timeline-charts-related-to-computerelectronics/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 05:41:48 +0000</pubDate>
		<dc:creator>Samir</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=642</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/10/10/historical-timeline-charts-related-to-computerelectronics/' addthis:title='Historical timeline charts related to computer/electronics '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Android iPhone Apple Mac Bill Gates Linux Windows CE Various Mobile OS Excel Photoshop Intel Sony Nokia Social Media Search<a href="http://www.techjini.com/blog/2011/10/10/historical-timeline-charts-related-to-computerelectronics/" class="searchmore">Read the Rest...</a><div class="clr"></div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/10/10/historical-timeline-charts-related-to-computerelectronics/' addthis:title='Historical timeline charts related to computer/electronics ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/10/10/historical-timeline-charts-related-to-computerelectronics/' addthis:title='Historical timeline charts related to computer/electronics '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><table align="center"><!--Android Section--></p>
<tbody>
<tr>
<th rowspan="6">Android</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/android-phone-timeline.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/android-phone-timeline.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/android-phone-timeline1-150x100.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/android-phone-timeline.png"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_Timeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_Timeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_Timeline1.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_Timeline.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/android-timeline-2.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/android-timeline-2.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/android-timeline-21-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/android-timeline-2.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_App.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_App.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_App1.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_App.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Rise-Of-Android.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Rise-Of-Android.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/Rise-Of-Android1.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Rise-Of-Android.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_SDK_Timeline.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_SDK_Timeline.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_SDK_Timeline1-150x100.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Android_SDK_Timeline.png"> </a></th>
</tr>
<p><!--iPhone Section--></p>
<tr>
<th>iPhone</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/iphone-timeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/iphone-timeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/iphone-timeline1-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/iphone-timeline.jpg"> </a></th>
</tr>
<p><!--Apple Section--></p>
<tr>
<th rowspan="3">Apple</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple-timeline-final.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple-timeline-final.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple-timeline-final1-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple-timeline-final.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple_evolution.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple_evolution.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple_evolution1.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple_evolution.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple-comp-timeline.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple-comp-timeline.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple-comp-timeline1-150x100.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/apple-comp-timeline.png"> </a></th>
</tr>
<p><!--Mac Section--></p>
<tr>
<th rowspan="3">Mac</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Macbook_Timeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Macbook_Timeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/Macbook_Timeline1-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Macbook_Timeline.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/mac-timeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/mac-timeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/mac-timeline1-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/mac-timeline.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/MacOStimeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/MacOStimeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/MacOStimeline1-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/MacOStimeline.jpg"> </a></th>
</tr>
<p><!--Bill Gates Section--></p>
<tr>
<th>Bill Gates</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/bill-gates-timeline3.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/bill-gates-timeline3.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/bill-gates-timeline31-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/bill-gates-timeline3.jpg"> </a></th>
</tr>
<p><!--Linux Section--></p>
<tr>
<th rowspan="2">Linux</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/44218linuxdistrotimelinqv0.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/44218linuxdistrotimelinqv0.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/44218linuxdistrotimelinqv01-150x100.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/44218linuxdistrotimelinqv0.png"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/linuxdistrotimeline-7.2.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/linuxdistrotimeline-7.2.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/linuxdistrotimeline-7.21.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/linuxdistrotimeline-7.2.png"> </a></th>
</tr>
<p><!--Windows CE Section--></p>
<tr>
<th>Windows CE</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Windows_CE_Timeline.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Windows_CE_Timeline.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/Windows_CE_Timeline1-150x100.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Windows_CE_Timeline.png"> </a></th>
</tr>
<p><!--Various Mobile OS Section--></p>
<tr>
<th>Various Mobile OS</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/iphone_android_Timeline.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/iphone_android_Timeline.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/iphone_android_Timeline1.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/iphone_android_Timeline.png"> </a></th>
</tr>
<p><!--Excel Section--></p>
<tr>
<th>Excel</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/microsoft-excel-timeline.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/microsoft-excel-timeline.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/microsoft-excel-timeline1.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/microsoft-excel-timeline.png"> </a></th>
</tr>
<p><!--Photoshop Section--></p>
<tr>
<th>Photoshop</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/definitive-photoshop-timeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/definitive-photoshop-timeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/definitive-photoshop-timeline1-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/definitive-photoshop-timeline.jpg"> </a></th>
</tr>
<p><!--Intel Section--></p>
<tr>
<th>Intel</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/computer-timeline.gif"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/computer-timeline.gif"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/computer-timeline1.gif" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/computer-timeline.gif"> </a></th>
</tr>
<p><!--Sony Section--></p>
<tr>
<th rowspan="2">Sony</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/sonytimelinehd2.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/sonytimelinehd2.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/sonytimelinehd21-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/sonytimelinehd2.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Trinitron-Timeline2.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Trinitron-Timeline2.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/Trinitron-Timeline21-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Trinitron-Timeline2.jpg"> </a></th>
</tr>
<p><!--Nokia Section--></p>
<tr>
<th>Nokia</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Nokia_timeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Nokia_timeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/Nokia_timeline1.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Nokia_timeline.jpg"> </a></th>
</tr>
<p><!--Social Media Section--></p>
<tr>
<th rowspan="3">Social Media</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/socialMediaTL_05.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/socialMediaTL_05.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/socialMediaTL_051-150x100.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/socialMediaTL_05.png"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/social_networking_timeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/social_networking_timeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/social_networking_timeline1.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/social_networking_timeline.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/social_media_timeline-779402.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/social_media_timeline-779402.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/social_media_timeline-7794021.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/social_media_timeline-779402.jpg"> </a></th>
</tr>
<p><!--Search Engines Section--></p>
<tr>
<th>Search Engines</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/search-engine-timeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/search-engine-timeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/search-engine-timeline1-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/search-engine-timeline.jpg"> </a></th>
</tr>
<p><!--Programming Languages Section--></p>
<tr>
<th>Programming Languages</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/tongues-cleaner.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/tongues-cleaner.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/tongues-cleaner1-150x100.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/tongues-cleaner.png"> </a></th>
</tr>
<p><!--W3C(Internet) Section--></p>
<tr>
<th>W3C(Internet)</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/W3C_Timeline.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/W3C_Timeline.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/W3C_Timeline1-150x100.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/W3C_Timeline.png"> </a></th>
</tr>
<p><!--Game Technology Section--></p>
<tr>
<th rowspan="2">Game Technology</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/video-game-timeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/video-game-timeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/video-game-timeline1-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/video-game-timeline.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/gameboy-timeline-HD.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/gameboy-timeline-HD.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/gameboy-timeline-HD1-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/gameboy-timeline-HD.jpg"> </a></th>
</tr>
<p><!--NFS Game Section--></p>
<tr>
<th>NFS Car Racing Game</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/NFS_Timeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/NFS_Timeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/NFS_Timeline1-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/NFS_Timeline.jpg"> </a></th>
</tr>
<p><!--CellPhone Section--></p>
<tr>
<th>CellPhone</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Cellphones-Timeline3.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Cellphones-Timeline3.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/Cellphones-Timeline31-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Cellphones-Timeline3.jpg"> </a></th>
</tr>
<p><!--Electronics Section--></p>
<tr>
<th rowspan="2">Electronics</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/205_Timeline.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/205_Timeline.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/205_Timeline1-150x100.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/205_Timeline.png"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/CE-TimeLine.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/CE-TimeLine.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/CE-TimeLine1.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/CE-TimeLine.jpg"> </a></th>
</tr>
<p><!--Universe(Space) Section--></p>
<tr>
<th rowspan="2">Universe(Space)</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Universe_Timeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Universe_Timeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/Universe_Timeline1.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Universe_Timeline.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/CosmicTimeline.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/CosmicTimeline.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/CosmicTimeline1-150x100.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/CosmicTimeline.jpg"> </a></th>
</tr>
<p><!--Software Section--></p>
<tr>
<th rowspan="2">Software</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Google_Vs_MS_Vs_Apple.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Google_Vs_MS_Vs_Apple.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/Google_Vs_MS_Vs_Apple1.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/Google_Vs_MS_Vs_Apple.jpg"> </a></th>
</tr>
<tr>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/SoftWareWar.png"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/SoftWareWar.png"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/SoftWareWar1.png" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/SoftWareWar.png"> </a></th>
</tr>
<p><!--Hardware Section--></p>
<tr>
<th>Hardware</th>
<th><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/computer-hardware-chart1.jpg"></a></p>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/computer-hardware-chart1.jpg"> <img src="http://www.techjini.com/blog/wp-content/uploads/2011/10/computer-hardware-chart11.jpg" border="0" alt="" /> </a></div>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2011/10/computer-hardware-chart1.jpg"> </a></th>
</tr>
</tbody>
</table>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/10/10/historical-timeline-charts-related-to-computerelectronics/' addthis:title='Historical timeline charts related to computer/electronics ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.techjini.com/blog/2011/10/10/historical-timeline-charts-related-to-computerelectronics/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Innovative Test Cases and Expected Results for Accelerometer, Compass And GPS</title>
		<link>http://www.techjini.com/blog/2011/09/30/innovative-test-cases-and-expected-results-for-accelerometer-compass-and-gps/</link>
		<comments>http://www.techjini.com/blog/2011/09/30/innovative-test-cases-and-expected-results-for-accelerometer-compass-and-gps/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 11:10:04 +0000</pubDate>
		<dc:creator>Samir</dc:creator>
				<category><![CDATA[Android Tablets]]></category>
		<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile Technology]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/2011/09/30/innovative-test-cases-and-expected-results-for-accelerometer-compass-and-gps/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/09/30/innovative-test-cases-and-expected-results-for-accelerometer-compass-and-gps/' addthis:title='Innovative Test Cases and Expected Results for Accelerometer, Compass And GPS '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>In current mobile technology, we use accelerometer, compass and GPS in latest mobile models. Here some innovative test cases and<a href="http://www.techjini.com/blog/2011/09/30/innovative-test-cases-and-expected-results-for-accelerometer-compass-and-gps/" class="searchmore">Read the Rest...</a><div class="clr"></div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/09/30/innovative-test-cases-and-expected-results-for-accelerometer-compass-and-gps/' addthis:title='Innovative Test Cases and Expected Results for Accelerometer, Compass And GPS ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/09/30/innovative-test-cases-and-expected-results-for-accelerometer-compass-and-gps/' addthis:title='Innovative Test Cases and Expected Results for Accelerometer, Compass And GPS '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>In current mobile technology, we use accelerometer, compass and GPS in latest mobile models. Here some innovative test cases and expected results of those components, when we test in some places like in the space, on any other planet, satellite, center of gravity of earth and center of magnetic field of earth. Those cases are discussed as following:</p>
<p>1. In space: In space, accelerometer, compass and GPS will not work. because accelerometer and compass have required gravity and magnetic field respectively. But when we use accelerometer and compass nearer any planet, then we get relative values as that planet&#8217;s field with some accuracy. and GPS will not work, if we are close to any other planet excluding earth. Because for GPS usage, we require human invented working satellites.</p>
<p>2. On any other planet (excluding earth): Still GPS will not work in any other planet. and we get relative values of accelerometer and compass as that planet.</p>
<p>3. On center of gravity of earth: We cannot predict results for accelerometer and GPS. It is possible that we get garbage values for accelerometer. and compass will work proper because location of center of gravity and location of center of magnetic field of earth are different.</p>
<p>4. On center of magnetic field of earth: In this case, we get garbage values for compass and get proper values for accelerometer and GPS. But still It is possible that if there is any relationship between gravity and magnetic field, then we get unknown results for accelerometer.</p>
<p>For all those cases, I expect results based on physics theories, but still we cannot guess exact results. Those all will work on so many parameters, planet atmosphere and other theories.</p>
<p>-Samir Solanki</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/09/30/innovative-test-cases-and-expected-results-for-accelerometer-compass-and-gps/' addthis:title='Innovative Test Cases and Expected Results for Accelerometer, Compass And GPS ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.techjini.com/blog/2011/09/30/innovative-test-cases-and-expected-results-for-accelerometer-compass-and-gps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nine Patch Images useful for android</title>
		<link>http://www.techjini.com/blog/2011/09/29/nine-patch-images-useful-for-android-2/</link>
		<comments>http://www.techjini.com/blog/2011/09/29/nine-patch-images-useful-for-android-2/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 13:05:34 +0000</pubDate>
		<dc:creator>Shweta</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[Nine patch]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=525</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/09/29/nine-patch-images-useful-for-android-2/' addthis:title='Nine Patch Images useful for android '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Android devices come in different screen sizes and density, often making it very difficult for developer to design an application<a href="http://www.techjini.com/blog/2011/09/29/nine-patch-images-useful-for-android-2/" class="searchmore">Read the Rest...</a><div class="clr"></div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/09/29/nine-patch-images-useful-for-android-2/' addthis:title='Nine Patch Images useful for android ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/09/29/nine-patch-images-useful-for-android-2/' addthis:title='Nine Patch Images useful for android '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><div>Android devices come in different screen sizes and density, often making it very difficult for developer to design an application for all screen sizes. Use of nine patch images can be very helpful for them. Mostly nine patch images are used as background for Buttons, Texts, Frames. Android provide a tool for creating nine patch images. It is available in android-sdk/tools directory named as draw9patch.</div>
<div>What is nine patch?</div>
<div>Nine patch images are simply PNG images with 9 patches as explained in figure -</div>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/09/nine_patch.png"><img class="aligncenter size-medium wp-image-527" src="http://www.techjini.com/blog/wp-content/uploads/2011/09/nine_patch-300x264.png" alt="" width="210" height="185" /></a></div>
<div>1,3,7,9 &#8211; Not scalable area</div>
<div>2 &#8211; Horizontal scalable area</div>
<div>4 &#8211; Vertical scale area</div>
<div>6,8 &#8211; Text Area</div>
<div>For scaling purpose you have to give guideline for both area(2,4). Otherwise converted nine patch image will not be proper nine patch.</div>
<div>ex -</div>
<div><a href="http://www.techjini.com/blog/wp-content/uploads/2011/09/nine-patch-example2.png"><img class="aligncenter size-medium wp-image-526" src="http://www.techjini.com/blog/wp-content/uploads/2011/09/nine-patch-example2-300x177.png" alt="" width="300" height="177" /></a></div>
<div>So basically the intersection of horizontal and vertical guideline&#8217;s pixels will replicate. Guidelines for text area is optional.</div>
<div>Nine patch images can not be scale down, so use of mdpi images are baseline for dp scaling(Ignoring ldpi). Here is a link to learn how to draw nine patch images- http://developer.android.com/guide/developing/tools/draw9patch.html</div>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/09/29/nine-patch-images-useful-for-android-2/' addthis:title='Nine Patch Images useful for android ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.techjini.com/blog/2011/09/29/nine-patch-images-useful-for-android-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Batch Insert to SQLite database on Android</title>
		<link>http://www.techjini.com/blog/2011/06/29/batch-insert-to-sqlite-database-on-android/</link>
		<comments>http://www.techjini.com/blog/2011/06/29/batch-insert-to-sqlite-database-on-android/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 12:05:01 +0000</pubDate>
		<dc:creator>Meghana</dc:creator>
				<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=455</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/06/29/batch-insert-to-sqlite-database-on-android/' addthis:title='Batch Insert to SQLite database on Android '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Database operations are slow and in a situation where thousands of records have to be inserted, inserting each record consumes<a href="http://www.techjini.com/blog/2011/06/29/batch-insert-to-sqlite-database-on-android/" class="searchmore">Read the Rest...</a><div class="clr"></div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/06/29/batch-insert-to-sqlite-database-on-android/' addthis:title='Batch Insert to SQLite database on Android ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/06/29/batch-insert-to-sqlite-database-on-android/' addthis:title='Batch Insert to SQLite database on Android '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>Database operations are slow and in a situation where thousands of records have to be inserted, inserting each record consumes a lot of time and affects the performance of the application. In such situations,batch insert saves some overhead. A significant amount of time can be saved if batch inserts are made in a single transaction.</p>
<p>SQLite provides three simple methods in SQLiteDatabase class :<br />
beginTransaction();<br />
setTransactionSuccessful();<br />
endTransaction();</p>
<p>These methods can be used to make all the insert calls in the same batch in a single transaction. Transactions are used  when there is a  need to perform a series of queries that either all complete or all fail. When a SQLite transaction fails an exception will be thrown. Start a transaction by calling the beginTransaction() method. Perform the database operations and then call the setTransactionSuccessful() to commit the transaction. Once the transaction is complete call the endTransaction() function.</p>
<p>A sample example code is shown below:</p>
<p>// Begin the transaction<br />
db.beginTransaction();<br />
try{<br />
for each record in the list{<br />
ContentValues contentValues=new ContentValues();<br />
contentValues.put(COLUMN_NAME,record);<br />
db.insert(TABLE_NAME,null,contentValues);</p>
<p>}<br />
// Transaction is successful and all the records have been inserted<br />
db.setTransactionSuccessful();<br />
}catch(Exception e){<br />
Log.e(“Error in transaction”,e.toString());<br />
}finally{<br />
//End the transaction<br />
db.endTransaction();<br />
}</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/06/29/batch-insert-to-sqlite-database-on-android/' addthis:title='Batch Insert to SQLite database on Android ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.techjini.com/blog/2011/06/29/batch-insert-to-sqlite-database-on-android/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to change foreground &amp; background colors in a webview.</title>
		<link>http://www.techjini.com/blog/2011/04/19/how-to-change-foreground-background-colors-in-a-webview/</link>
		<comments>http://www.techjini.com/blog/2011/04/19/how-to-change-foreground-background-colors-in-a-webview/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 09:20:49 +0000</pubDate>
		<dc:creator>Ravi</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[techjini]]></category>
		<category><![CDATA[android tips]]></category>
		<category><![CDATA[android tutorial]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=471</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/04/19/how-to-change-foreground-background-colors-in-a-webview/' addthis:title='How to change foreground &#38; background colors in a webview. '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>At times we need to change the font or background color of the webview in Android to make it more<a href="http://www.techjini.com/blog/2011/04/19/how-to-change-foreground-background-colors-in-a-webview/" class="searchmore">Read the Rest...</a><div class="clr"></div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/04/19/how-to-change-foreground-background-colors-in-a-webview/' addthis:title='How to change foreground &#38; background colors in a webview. ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/04/19/how-to-change-foreground-background-colors-in-a-webview/' addthis:title='How to change foreground &amp; background colors in a webview. '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>At times we need to change the font or background color of the webview in <a href="http://www.techjini.com/services-android.html">Android </a>to make it more readable or to conform to a design of your app. This post will show how simple it can be to almost always achieve the result. The latter is more simple as webview provides an API :</p>
<pre><a title="http://developer.android.com/reference/android/webkit/WebView.html#setBackgroundColor(int)" href="http://">setBackgroundColor (int color)</a></pre>
<p>What one must note is if the HTML contains a value for the background it will override the color we set. The same is true for the foreground color too.</p>
<p>For the foreground color we make use of CSS to set the color and add it to the content we want to display in a div element wrapping the html we need to display. Here is the sample code</p>
<pre>private final String htmlbegin = "&lt;div style=\"color:#FFFFFF ;  \"&gt;";
private final String htmlend = " &lt;/div&gt;";
private final String htmlBody = "&lt;p&gt;Summary&lt;/p&gt;"
	+ "&lt;p&gt;Strong text&lt;/strong&gt; Somemore text"
	+ "and the final line&lt;/p&gt;";
WebView body;

@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.main);

	body = (WebView) findViewById(R.id.message_body);
	body.setBackgroundColor(0);

	// body.setDef
	body.loadDataWithBaseURL("", htmlbegin + htmlBody + htmlend,
		"text/html", "utf-8", "");
}</pre>
<p>As I stated before any css inside the html will override our css settings.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/04/19/how-to-change-foreground-background-colors-in-a-webview/' addthis:title='How to change foreground &amp; background colors in a webview. ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.techjini.com/blog/2011/04/19/how-to-change-foreground-background-colors-in-a-webview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Retrieving Current Network Status in Android</title>
		<link>http://www.techjini.com/blog/2011/04/07/retrieving-current-network-status-in-android/</link>
		<comments>http://www.techjini.com/blog/2011/04/07/retrieving-current-network-status-in-android/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 05:42:15 +0000</pubDate>
		<dc:creator>Ravi</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[techjini]]></category>
		<category><![CDATA[anddev]]></category>
		<category><![CDATA[android tips]]></category>
		<category><![CDATA[TechJini Solutions]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=459</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/04/07/retrieving-current-network-status-in-android/' addthis:title='Retrieving Current Network Status in Android '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Here is a quick snippet of code which will help us in getting the current status of an Android device’s<a href="http://www.techjini.com/blog/2011/04/07/retrieving-current-network-status-in-android/" class="searchmore">Read the Rest...</a><div class="clr"></div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/04/07/retrieving-current-network-status-in-android/' addthis:title='Retrieving Current Network Status in Android ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/04/07/retrieving-current-network-status-in-android/' addthis:title='Retrieving Current Network Status in Android '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>Here is a quick snippet of code which will help us in getting the current status of an <a title="Android" href="http://www.techjini.com/services-android.html" target="_blank">Android</a> device’s data connection.  We make use of the<strong><em><a title="ConnectivityManager" href="http://developer.android.com/reference/android/net/ConnectivityManager.html" target="_blank"> ConnectivityManager</a></em></strong> class to get current active network information. We try to catch a NullPointerException which is thrown by the isConnected method when there is no active data connection.</p>
<pre>/**
 * Returns availability of a data connection
 * @param mContext
 *            Context of app
 * @return True is data connection is available , false otherwise
 */
public static boolean isDataConnectionOn(Context mContext) {
	ConnectivityManager connectionManager = (ConnectivityManager) mContext
			.getSystemService(Context.CONNECTIVITY_SERVICE);
	try {
		if (connectionManager.getActiveNetworkInfo().isConnected()) {
			Log.d("ConStatus", "Data Connection On");
			return true;
		} else {
			Log.d("ConStatus", "Data Connection off");
			return false;
		}
	} catch (NullPointerException e) {
		// No Active Connection
		Log.d("ConStatus", "No Active Connection");
		return false;
	}
}</pre>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/04/07/retrieving-current-network-status-in-android/' addthis:title='Retrieving Current Network Status in Android ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.techjini.com/blog/2011/04/07/retrieving-current-network-status-in-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Steps For Publishing Application On Android Market</title>
		<link>http://www.techjini.com/blog/2010/11/25/steps-for-publishing-application-in-android-market/</link>
		<comments>http://www.techjini.com/blog/2010/11/25/steps-for-publishing-application-in-android-market/#comments</comments>
		<pubDate>Thu, 25 Nov 2010 12:47:50 +0000</pubDate>
		<dc:creator>Bindu</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[techjini]]></category>
		<category><![CDATA[android development]]></category>
		<category><![CDATA[android tips]]></category>
		<category><![CDATA[android tutorial]]></category>
		<category><![CDATA[mobile development]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=330</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2010/11/25/steps-for-publishing-application-in-android-market/' addthis:title='Steps For Publishing Application On Android Market '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Make your application non debuggable Remove the android:debuggable="true" attribute from the &#60;application&#62; element of the manifest. Remove log files, backup<a href="http://www.techjini.com/blog/2010/11/25/steps-for-publishing-application-in-android-market/" class="searchmore">Read the Rest...</a><div class="clr"></div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2010/11/25/steps-for-publishing-application-in-android-market/' addthis:title='Steps For Publishing Application On Android Market ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2010/11/25/steps-for-publishing-application-in-android-market/' addthis:title='Steps For Publishing Application On Android Market '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><ol style="padding-left: 30px"><span style="color: #eb613d"><span style="text-decoration: underline"><strong>Make 	your application non debuggable</strong></span></span></ol>
<ul style="padding-left: 30px">
<li>Remove the 	<code>android:debuggable="true"</code> attribute from the <code>&lt;application&gt;</code> element of the manifest.</li>
<li>Remove log files, 	backup files, and other unnecessary files from the application 	project.</li>
<li>Check for private or proprietary data and remove it as necessary.</li>
</ul>
<ol style="padding-left: 30px"><span style="color: #eb613d"><span style="text-decoration: underline"><strong>Deactivate 	any calls to </strong></span></span><code><a href="http://developer.android.com/reference/android/util/Log.html"><span style="color: #eb613d"><span style="text-decoration: underline"><strong>Log</strong></span></span></a></code><span style="color: #eb613d"><span style="text-decoration: underline"><strong> methods in the source code. </strong></span></span></ol>
<ul style="padding-left: 30px">
<li>Is in your 	possession</li>
<li>Represents the 	personal, corporate, or organizational entity to be identified with 	the application</li>
<li>Has a validity period that exceeds the expected 	lifespan of the application or application suite. A validity period 	of more than 25 years is recommended.</li>
<li>If you plan to publish your application(s) on 	Android Market, note that a validity period ending after 22 October 	2033 is a requirement. You can not upload an application if it is 	signed with a key whose validity expires before that date.</li>
<li><em><strong>Is not the debug key generated by the 	Android SDK tools. </strong></em></li>
</ul>
<ul style="padding-left: 30px"><span style="color: #9999ff"><span style="font-size: medium"><em><span style="text-decoration: underline"><strong>Steps 	for creating the private key</strong></span></em></span></span></p>
<li><em>Set the 	following paths for the environmental varialbles</em><span style="color: #008000"> <em>JAVA_HOME:  C:\Program Files\Java\jdk1.6.0_20</em></span><span style="color: #008000"> <em>PATH:  C:\Program Files\Java\jdk1.6.0_20\bin</em></span>
<p><em>(this value 	changes depending on where we have stored the jdk)</em></li>
<li>Right click on the project and do the 	following<span style="color: #008000"> <em>Androidtools&gt;export signed application&gt;next&gt;select 	create new keystore&gt;next&gt;next&gt;finish.</em></span></li>
<li><em>Open command 	prompt and type the following.Set the path to where the keystore is 	stored </em><span style="color: #008000"><em>C:\Documents 	and Settings\bindu\Desktop&gt;keytool -list -alias [aliasname]  	-keystore [keystorename]</em></span></li>
<li><em>We now have 	obtained the fingerprint</em></li>
<li><em>Now open the 	following link and enter the obtained finger print</em><a href="http://code.google.com/android/maps-api-signup.html"><span style="color: #0000ff"><em> http://code.google.com/android/maps-api-signup.html</em></span></a></li>
<li>Now we have the 	private key in your google account.</li>
</ul>
<ol style="padding-left: 30px"><span style="color: #eb613d"> </span><span style="color: #eb613d"><span style="text-decoration: underline"><strong>Register for a Maps 	API Key,if your application is using Map View element</strong></span></span></ol>
<ol style="padding-left: 30px"><span style="color: #000000"> </span><span style="color: #000000">If 	your application uses one or more Mapview elements, you will need to 	register your application with the Google Maps service and obtain a 	Maps API Key, before your MapView(s) will be able to retrieve data 	from Google Maps. To do so, you supply an MD5 fingerprint of your 	signer certificate to the Maps service.</p>
<p></span><span style="color: #000000"> </span><span style="color: #eb613d"><span style="text-decoration: underline"><strong>Obfuscating the code</strong></span></span>We can use tools like ant and progaurd to 	obfuscate the code. Detailed steps for this is given 	in blog. <span style="color: #0000ff"> </span><a href="http://android-developers.blogspot.com/"><span style="color: #0000ff"><span style="text-decoration: underline">http://android-developers.blogspot.com/</span></span></a></ol>
<ol style="padding-left: 30px"><span style="color: #eb613d"> </span><span style="color: #eb613d"><span style="text-decoration: underline"><strong>Licensing the 	application</strong></span></span><span style="color: #eb613d"> </span>After we finish all the above steps 	refer the following link to publish the application in the android 	market. <span style="color: #0000ff"><span style="text-decoration: underline">http://developer.android.com/guide/publishing/licensing.html</span></span><br />
<span style="color: #0000ff"> </span></p>
<p><span style="color: #0000ff"><span style="text-decoration: underline"><br />
</span></span></ol>
<ol style="padding-left: 30px"><span style="color: #0000ff"> </span></ol>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2010/11/25/steps-for-publishing-application-in-android-market/' addthis:title='Steps For Publishing Application On Android Market ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.techjini.com/blog/2010/11/25/steps-for-publishing-application-in-android-market/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Customized PopOver for MapView</title>
		<link>http://www.techjini.com/blog/2010/11/23/creating-a-customized-popover-for-mapview/</link>
		<comments>http://www.techjini.com/blog/2010/11/23/creating-a-customized-popover-for-mapview/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 13:44:03 +0000</pubDate>
		<dc:creator>Meghana</dc:creator>
				<category><![CDATA[India]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[techjini]]></category>
		<category><![CDATA[android development]]></category>
		<category><![CDATA[android tips]]></category>
		<category><![CDATA[android tutorial]]></category>
		<category><![CDATA[mobile development]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=304</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2010/11/23/creating-a-customized-popover-for-mapview/' addthis:title='Creating a Customized PopOver for MapView '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>The android developers tutorial guides to create an app that shows a map the user can use to zoom and<a href="http://www.techjini.com/blog/2010/11/23/creating-a-customized-popover-for-mapview/" class="searchmore">Read the Rest...</a><div class="clr"></div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2010/11/23/creating-a-customized-popover-for-mapview/' addthis:title='Creating a Customized PopOver for MapView ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2010/11/23/creating-a-customized-popover-for-mapview/' addthis:title='Creating a Customized PopOver for MapView '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>The android developers tutorial guides to create an app that shows a map the user can use to zoom and add overlay items that mark points of interest. Suppose the user wants to display the location of the overlay items that were added,as a callout bubble, a customized layout has to be created and added as a subview of the mapView.</p>
<p><strong>Creating a layout:</strong><br />
Create a new xml file in Layout folder,say popOver.xml.</p>
<p><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;FrameLayout xmlns:android=&#8221;http://schemas.android.com/apk/res/android&#8221;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">android:id=&#8221;@+id/mapBubbleWrap&#8221;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">android:layout_width=&#8221;wrap_content&#8221; </span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">android:layout_height=&#8221;wrap_content&#8221; &gt;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;LinearLayout android:orientation=&#8221;horizontal&#8221; android:layout_width=&#8221;wrap_content&#8221; android:layout_height=&#8221;wrap_content&#8221; android:id=&#8221;@+id/bubble_container&#8221;&gt;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;FrameLayout android:layout_width=&#8221;wrap_content&#8221; android:layout_height=&#8221;wrap_content&#8221;&gt;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;ImageView android:layout_width=&#8221;wrap_content&#8221; android:layout_height=&#8221;wrap_content&#8221; </span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">android:id=&#8221;@+id/dialogimage&#8221; android:src=&#8221;@drawable/popup_leftpointer&#8221;/&gt;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;ImageView android:layout_width=&#8221;wrap_content&#8221; android:layout_height=&#8221;wrap_content&#8221; android:paddingLeft=&#8221;10dip&#8221; android:paddingTop=&#8221;7dip&#8221;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">android:id=&#8221;@+id/dialogimage1&#8243;/&gt;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;/FrameLayout&gt;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;FrameLayout android:layout_width=&#8221;wrap_content&#8221; android:layout_height=&#8221;wrap_content&#8221; android:background=&#8221;@drawable/popup_middlebg&#8221;&gt;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;TextView android:id=&#8221;@+id/mapBubble&#8221; </span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">android:layout_width=&#8221;wrap_content&#8221; </span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">android:layout_height=&#8221;wrap_content&#8221; </span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">android:gravity=&#8221;center&#8221; android:paddingTop=&#8221;7dip&#8221;/&gt;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;/FrameLayout&gt;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;ImageView android:layout_width=&#8221;wrap_content&#8221; android:layout_height=&#8221;wrap_content&#8221; android:id=&#8221;@+id/dialogimage2&#8243; </span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">android:src=&#8221;@drawable/popup_right&#8221; /&gt;</span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;/LinearLayout&gt; </span></span></p>
<p lang="en-US"><span style="font-family: Times New Roman,sans-serif"><span style="font-size: small">&lt;/FrameLayout&gt;</span></span></p>
<p>The above xml code just contains the image of the popover that is to be displayed onTap of the overlay item. I have 3 images joined together to form a single popover image. One can use a single image and add a text displaying the location inside it. However, 2 images and a text is being displayed in popover so 3 images are being used.</p>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2010/11/popup_leftpointer4.png"><img class="alignnone size-full wp-image-307" src="http://www.techjini.com/blog/wp-content/uploads/2010/11/popup_leftpointer4.png" alt="" width="85" height="77" /></a></p>
<p>Figure(A)</p>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2010/11/popup_middlebg2.png"><img class="alignnone size-full wp-image-308" src="http://www.techjini.com/blog/wp-content/uploads/2010/11/popup_middlebg2.png" alt="" width="20" height="77" /></a></p>
<p>Figure(B)</p>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2010/11/popup_right2.png"><img class="alignnone size-full wp-image-309" src="http://www.techjini.com/blog/wp-content/uploads/2010/11/popup_right2.png" alt="" width="65" height="77" /></a></p>
<p>Figure(C)</p>
<p>I have used the figure(B) to display the text(location), the left pointer points the top of the item marker.</p>
<p><a href="http://www.techjini.com/blog/wp-content/uploads/2010/11/popover.png"><img class="alignnone size-full wp-image-311" src="http://www.techjini.com/blog/wp-content/uploads/2010/11/popover.png" alt="" width="138" height="99" /></a></p>
<p>Figure(D)</p>
<p>Figure(D) shows how the popover will look once we add the above view in the mapview.</p>
<p>Adding the customized view in the MapView</p>
<p>Then,in the MapOverLay class that extends ItemizedOverlay,in the overridden OnTap method, inflate the popOver.xml layout.i.e. protected boolean onTap(int index)</p>
<p>First, we have to get the location of the overlay item. This is done by the getProjection method of the MapView class.</p>
<p>Point point = map.getProjection().toPixels(item.getPoint(), null);</p>
<p>- getProjection() gets a projection for converting between screen-pixel coordinates and latitude/longitude coordinates.</p>
<p>- item is the overlay item (Overlay item = (Overlay) getItem(index);)</p>
<p>Now,we know where we have to place the customized view on the screen. But the point we have got will place the popover on the marker. We need to place it on top of the marker. To get the marker image&#8217;s height and width ,use getIntrinsicHeight and getIntrincsicWidth.<br />
height=marker.getIntrinsicHeight();<br />
width=marker.getIntrinsicWidth();</p>
<p>The customized view now has to be moved a few pixels above that corresponds to the marker height and displaced a few pixels in the x-direction that is half the marker&#8217;s width.</p>
<p>Set the LayoutParams of the layout that is being inflated.</p>
<p>LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT,<br />
LayoutParams.WRAP_CONTENT, point.x &#8211; width/2, point.y<br />
- height, 0);<br />
layout.setLayoutParams(params);</p>
<p>Now,add the view to the mapView.</p>
<p>mapView.addView(layout);</p>
<p>The x and y parameters being set in the LayoutParams depends on the kind of image being used as the popover. The image that I have used has a pointer that has to be displayed in the middle of the marker and it won&#8217;t be set in the middle of the marker if I use the above logic of setting the x and y parameters of the LayoutParams to half the width of the marker and the full height of the marker. If I do so,the left corner of the image will be displayed on the marker as shown. So use it according to the image being used. <a href="http://www.techjini.com/blog/wp-content/uploads/2010/11/wrongPopover1.png"><img class="alignnone size-full wp-image-325" src="http://www.techjini.com/blog/wp-content/uploads/2010/11/wrongPopover1.png" alt="" width="167" height="86" /></a></p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2010/11/23/creating-a-customized-popover-for-mapview/' addthis:title='Creating a Customized PopOver for MapView ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.techjini.com/blog/2010/11/23/creating-a-customized-popover-for-mapview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bangalore Android Developers having fun with Arduino and Amarino</title>
		<link>http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/</link>
		<comments>http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 13:31:32 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[India]]></category>
		<category><![CDATA[Startup]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[fun]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=226</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/' addthis:title='Bangalore Android Developers having fun with Arduino and Amarino '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Here are some of the pictures from Bangalore Android Developers / User group&#8217;s dev event. Theme: Have fun with Arduino<a href="http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/" class="searchmore">Read the Rest...</a><div class="clr"></div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/' addthis:title='Bangalore Android Developers having fun with Arduino and Amarino ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/' addthis:title='Bangalore Android Developers having fun with Arduino and Amarino '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>Here are some of the pictures from Bangalore Android Developers / User group&#8217;s dev event.</p>
<p>Theme: Have fun with Arduino and Amarino toolkit<br />
Location: TechJini Solutions<br />
Participants: <a href="http://twitter.com/sudarmuthu">Sudar</a> (Our kit sponsor), <a href="http://twitter.com/amrita_chanda">Amrita</a>, <a href="http://twitter.com/krishnashetty">Krishna</a>, <a href="http://twitter.com/schoudhary">Sandeep</a> (our guide 2), <a href="http://twitter.com/anil_pugalia">Anil</a> (our guide 1) and <a href="http://twitter.com/amit0">Amit</a></p>

<a href='http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/2e5ik2q/' title='2e5ik2q'><img width="150" height="150" src="http://www.techjini.com/blog/wp-content/uploads/2010/07/2e5ik2q-150x150.jpg" class="attachment-thumbnail" alt="" title="2e5ik2q" /></a>
<a href='http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/25k055e/' title='25k055e'><img width="150" height="150" src="http://www.techjini.com/blog/wp-content/uploads/2010/07/25k055e-150x150.jpg" class="attachment-thumbnail" alt="" title="25k055e" /></a>
<a href='http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/243ia7m/' title='243ia7m'><img width="150" height="150" src="http://www.techjini.com/blog/wp-content/uploads/2010/07/243ia7m-150x150.jpg" class="attachment-thumbnail" alt="" title="243ia7m" /></a>
<a href='http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/t62rk9/' title='t62rk9'><img width="150" height="150" src="http://www.techjini.com/blog/wp-content/uploads/2010/07/t62rk9-150x150.jpg" class="attachment-thumbnail" alt="" title="t62rk9" /></a>

<p>For next event please sign up at http://www.meetup.com/blrdroid/</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/' addthis:title='Bangalore Android Developers having fun with Arduino and Amarino ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.techjini.com/blog/2010/07/31/bangalore-android-developers-having-fun-with-arduino-and-amarino/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

