<?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; Tech Tips</title>
	<atom:link href="http://www.techjini.com/blog/category/tech-tips/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>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>Code for resumable download</title>
		<link>http://www.techjini.com/blog/2011/03/17/code-for-resumable-download/</link>
		<comments>http://www.techjini.com/blog/2011/03/17/code-for-resumable-download/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 07:50:36 +0000</pubDate>
		<dc:creator>Avidnyat</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[techjini]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[TechJini Solutions]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=442</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/03/17/code-for-resumable-download/' addthis:title='Code for resumable download '  ><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>Another piece of code for PHP developers, useful in open source development. Following is the function for application that needs<a href="http://www.techjini.com/blog/2011/03/17/code-for-resumable-download/" 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/03/17/code-for-resumable-download/' addthis:title='Code for resumable download ' ><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/03/17/code-for-resumable-download/' addthis:title='Code for resumable download '  ><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>Another piece of code for PHP developers, useful in open source development.</p>
<p>Following is the function for application that needs functionality of resumable download.</p>
<p>public static function dl_file_resumable($file, $is_resume=TRUE)<br />
{<br />
//First, see if the file exists<br />
if (!is_file($file))<br />
{<br />
die(&#8220;<strong>404 File not found!</strong>&#8220;);<br />
}</p>
<p>//Gather relevent info about file<br />
$size = filesize($file);<br />
$fileinfo = pathinfo($file);</p>
<p>//workaround for IE filename bug with multiple periods / multiple dots in filename<br />
//that adds square brackets to filename &#8211; eg. setup.abc.exe becomes setup[1].abc.exe<br />
$filename = (strstr($_SERVER['HTTP_USER_AGENT'], &#8216;MSIE&#8217;)) ?<br />
preg_replace(&#8216;/\./&#8217;, &#8216;%2e&#8217;, $fileinfo['basename'], substr_count($fileinfo['basename'], &#8216;.&#8217;) &#8211; 1) :<br />
$fileinfo['basename'];</p>
<p>$file_extension = strtolower($path_info['extension']);</p>
<p>//This will set the Content-Type to the appropriate setting for the file<br />
switch($file_extension)<br />
{<br />
case &#8216;zip&#8217;: $ctype=&#8217;application/zip&#8217;; break;<br />
default:    $ctype=&#8217;application/force-download&#8217;;<br />
}</p>
<p>//check if http_range is sent by browser (or download manager)<br />
if($is_resume &amp;&amp; isset($_SERVER['HTTP_RANGE']))<br />
{<br />
list($size_unit, $range_orig) = explode(&#8216;=&#8217;, $_SERVER['HTTP_RANGE'], 2);<br />
if ($size_unit == &#8216;bytes&#8217;)<br />
{<br />
//multiple ranges could be specified at the same time, but for simplicity only serve the first range<br />
//http://tools.ietf.org/id/draft-ietf-http-range-retrieval-00.txt<br />
list($range_from, $extra_ranges) = explode(&#8216;,&#8217;, $range_orig, 2);<br />
}<br />
else<br />
{<br />
$range_from = &#8221;;<br />
}<br />
}<br />
else<br />
{<br />
$range_from = &#8221;;<br />
}</p>
<p>//figure out download piece from range (if set)<br />
list($seek_start, $seek_end) = explode(&#8216;-&#8217;, $range_from, 2);</p>
<p>//set start and end based on range (if set), else set defaults<br />
//also check for invalid ranges.<br />
$seek_end = (empty($seek_end)) ? ($size &#8211; 1) : min(abs(intval($seek_end)),($size &#8211; 1));<br />
$seek_start = (empty($seek_start) || $seek_end  0 || $seek_end &lt; ($size &#8211; 1))<br />
{<br />
header(&#8216;HTTP/1.1 206 Partial Content&#8217;);<br />
}</p>
<p>header(&#8216;Accept-Ranges: bytes&#8217;);<br />
header(&#8216;Content-Range: bytes &#8216;.$seek_start.&#8217;-&#8217;.$seek_end.&#8217;/&#8217;.$size);<br />
}</p>
<p>//headers for IE Bugs (is this necessary?)<br />
//header(&#8220;Cache-Control: cache, must-revalidate&#8221;);<br />
//header(&#8220;Pragma: public&#8221;);</p>
<p>header(&#8216;Content-Type: &#8216; . $ctype);<br />
header(&#8216;Content-Disposition: attachment; filename=&#8221;&#8216; . $filename . &#8216;&#8221;&#8216;);<br />
header(&#8216;Content-Length: &#8216;.($seek_end &#8211; $seek_start + 1));</p>
<p>//open the file<br />
$fp = fopen($file, &#8216;rb&#8217;);<br />
//seek to start of missing part<br />
fseek($fp, $seek_start);</p>
<p>//start buffered download<br />
while(!feof($fp))<br />
{<br />
//reset time limit for big files<br />
set_time_limit(0);<br />
print(fread($fp, 1024*8));<br />
flush();<br />
ob_flush();<br />
}</p>
<p>fclose($fp);<br />
}</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/03/17/code-for-resumable-download/' addthis:title='Code for resumable download ' ><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/03/17/code-for-resumable-download/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>To get data from POST body in PHP</title>
		<link>http://www.techjini.com/blog/2011/03/17/to-get-data-from-post-body-in-php/</link>
		<comments>http://www.techjini.com/blog/2011/03/17/to-get-data-from-post-body-in-php/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 07:24:18 +0000</pubDate>
		<dc:creator>Avidnyat</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[techjini]]></category>
		<category><![CDATA[TechJini Solutions]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=438</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2011/03/17/to-get-data-from-post-body-in-php/' addthis:title='To get data from POST body in PHP '  ><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>This may look a very simple and small piece of code, but it took me ages to work on this<a href="http://www.techjini.com/blog/2011/03/17/to-get-data-from-post-body-in-php/" 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/03/17/to-get-data-from-post-body-in-php/' addthis:title='To get data from POST body in PHP ' ><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/03/17/to-get-data-from-post-body-in-php/' addthis:title='To get data from POST body in PHP '  ><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>This may look a very simple and small piece of code, but it took me ages to work on this one and get it in a proper format hence thought of sharing it with all. I used this line of code to get the data from POST body. I hope this will help you with your <a href="http://www.techjini.com/services-webapplication.html">PHP Development</a>.</p>
<p>file_get_contents(&#8216;php://input&#8217;);</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2011/03/17/to-get-data-from-post-body-in-php/' addthis:title='To get data from POST body in PHP ' ><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/03/17/to-get-data-from-post-body-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to HTML 5 (part 1 of 10)</title>
		<link>http://www.techjini.com/blog/2010/12/10/introduction-to-html-5/</link>
		<comments>http://www.techjini.com/blog/2010/12/10/introduction-to-html-5/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 10:07:34 +0000</pubDate>
		<dc:creator>Avidnyat</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[India]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[techjini]]></category>
		<category><![CDATA[Bangalore based web development companies]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[TechJini Solutions]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=203</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2010/12/10/introduction-to-html-5/' addthis:title='Introduction to HTML 5 (part 1 of 10) '  ><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>HTML 5 HTML is always considered as one of the important aspects of web development. Here, we are discussing about<a href="http://www.techjini.com/blog/2010/12/10/introduction-to-html-5/" 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/12/10/introduction-to-html-5/' addthis:title='Introduction to HTML 5 (part 1 of 10) ' ><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/12/10/introduction-to-html-5/' addthis:title='Introduction to HTML 5 (part 1 of 10) '  ><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><strong>HTML 5</strong></p>
<p>HTML is always considered as one of the important aspects of <a href="http://www.techjini.com/services-webapplication.html">web development</a>. Here, we are discussing about HTML5.</p>
<p>HTML5 which is currently under development is the next major revision of the HTML standard. Like its immediate Predecessors HTML4.01 and XHTML 1.1 , HTML5 is a standard for structuring and presenting content on world wide web.</p>
<p>This new standard incorporates features like video playback , drag and drop , geolocation, data storage , visiting websites offline , forms and many more.</p>
<p>Here is a brief history of HTML5.</p>
<p> HTML5 which is currently under development is the next major revision of the HTML standard.</p>
<p> There was never any such thing as HTML 1</p>
<p> The first official specification was HTML 2.0, published by the IETF, the Internet Engineering Task Force.</p>
<p> Later on the role of the IETF was superceded by the W3C, the World Wide Web Consortium, where subsequent iterations of the HTML standard have been published.</p>
<p> In the latter half of nineties HTML 4.01 was published.</p>
<p> After HTML 4.01, the next revision to the language was called XHTML 1.0</p>
<p> The content of the XHTML 1.0 specification was identical to that of HTML 4.01. No new elements or attributes were added.</p>
<p> The only difference was in the syntax of the language.</p>
<p> Valid XHTML 1.0 document requires all tags and attributes to be in lowercase. All attributes must be quoted.All elements must have a closing tag.</p>
<p> These rules were similar to that of XML.So they were moving towards XML more.</p>
<p> Then the W3C published XHTML 1.1.</p>
<p> It seemed as if the W3C were losing touch with the day-to-day reality of publishing on the web as they were moving towards XML.</p>
<p> They began working on XHTML 2</p>
<p> XHTML 2 wasn’t going to be backwards compatible with existing web content or even previous versions of HTML</p>
<p> Representatives from Opera, Apple and Mozilla were unhappy with this direction.</p>
<p> They formed their own group: the Web Hypertext Application Technology Working Group, or WHATWG</p>
<p> They started working on HTML Standard and came out with new revision HTML5</p>
<p>The W3C uses a consensus-based approach: issues are raised, discussed, and voted on. </p>
<p>At the WHATWG, issues are also raised and discussed, but the final decision on what<br />
goes into a specification rests with the editor. The editor is Ian Hickson.</p>
<p> While HTML5 was being developed at the WHATWG, the W3C continued working on XHTML 2</p>
<p> Later on W3C admitted that the attempt to move the web from HTML to XML just wasn’t working.</p>
<p> Rather than start from scratch, they wisely decided that the work of the WHATWG should be used as the basis for any future version of HTML.</p>
<p> Later on W3C announced that they will stop working on XHTML 2 and they will support WHATWG.</p>
<p> There are two groups working on HTML5. The WHATWG is creating an HTML5 specification using its process of “commit then review.” The W3C HTML Working Group is taking that specification and putting it through its process of “review then<br />
commit.” </p>
<p><strong><a href="http://techjini.com">TechJini Solutions</a></strong><br />
TechJini Solutions is Bangalore, India based company working in the areas of software product engineering services and creating next generation software products that bring real business value. We take pride in our philosophy of taking on challenging problems and providing innovative and outstanding solutions. We are proud to develop applications on different mobile/tablet platforms including iPhone, iPad, BlackBerry and Android. </p>
<p>Next time, we will look at Forms in HTML 5. Feel free to email me for more details – avidnyat@techjini.com</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2010/12/10/introduction-to-html-5/' addthis:title='Introduction to HTML 5 (part 1 of 10) ' ><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/12/10/introduction-to-html-5/feed/</wfw:commentRss>
		<slash:comments>3</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>Capturing the direct links for google analytics.</title>
		<link>http://www.techjini.com/blog/2010/11/10/capturing-the-direct-links-for-google-analytics/</link>
		<comments>http://www.techjini.com/blog/2010/11/10/capturing-the-direct-links-for-google-analytics/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 06:43:48 +0000</pubDate>
		<dc:creator>Harsha</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[web 2.0]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[seo tips]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/?p=238</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2010/11/10/capturing-the-direct-links-for-google-analytics/' addthis:title='Capturing the direct links for google analytics. '  ><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>Capturing the direct links for google analytics. There are many occasions where one wants to know how many clicks were<a href="http://www.techjini.com/blog/2010/11/10/capturing-the-direct-links-for-google-analytics/" 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/10/capturing-the-direct-links-for-google-analytics/' addthis:title='Capturing the direct links for google analytics. ' ><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/10/capturing-the-direct-links-for-google-analytics/' addthis:title='Capturing the direct links for google analytics. '  ><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><!-- P { margin-bottom: 0.08in; }A:link {  } --><span style="font-size: medium"><strong>Capturing the direct links for google analytics.</strong></span></p>
<p><span style="font-size: small">There are many occasions where one wants to know how many clicks were attracted by a direct link . It could be a link to download some app or pdf or any other direct link. It is general assumption that we need to have a page with google analytics code for google to capture the visit to the page.</span></p>
<p><span style="font-size: small">Often to achieve this, a page with google analytics code is created for all direct links and then that page redirects to the actual target. However, there is a simpler way to achieve this, using javascript.</span></p>
<p><span style="font-size: small">If the page having the link already has google&#8217;s analytics code embedded, then all you have to do is to use onclick event on &lt;a&gt; tag to call pagetracker function, for example,</span></p>
<p><span style="font-size: small">&lt;a href=”http:</span><span style="color: #000080"><span style="text-decoration: underline"><span style="font-size: small">\\www.yoursite.com\docs\help.pdf</span></span></span><span style="font-size: small">” onclick=”javascript: </span>pageTracker._trackPageview(&#8216;help_pdf&#8217;);” &gt;Help&lt;/a&gt;</p>
<p>In the snippet above, help_pdf will be your reference to search for when looking over reports in the google analytics admin page.</p>
<p>If you want to do more than just track the link, then you can have a javascript function in the page with your logic and a call to above function, for example,</p>
<pre>function trackDirectLinks(linkName) {

	//your logic here

	//if analytics code is not embedded in the page, then paste it here.

	var pageTracker=_gat._getTracker("UA-xxxxx-x");
    	pageTracker._trackPageview(page);
}</pre>
<p>And call this function in your links,</p>
<p><span style="font-size: small">&lt;a href=”http:</span><span style="color: #000080"><span style="text-decoration: underline"><span style="font-size: small">\\www.yoursite.com\docs\help.pdf</span></span></span><span style="font-size: small">” onclick=”javascript: trackDirectLinks</span>(&#8216;help_pdf&#8217;);” &gt;Help&lt;/a&gt;</p>
<p>Check in the analytics if the link is getting captured. The results are almost realtime, for me, I had to wait for 15-20 mins before the results in the analytics got updated.</p>
<p>If you don&#8217;t see them, then one probable reason apart from hundred other syntax related errors could be that you are using the older version of google analytics code. Copy the latest version (its been around for quite a while now) of analytics code from analytics page and replace all your old code. The advantage of using newer code is you can place it anywhere in your page not necessarily at the bottom, as it uses asynchronous calls which does not block loading of your page content until the call is finished. All browsers support these calls.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2010/11/10/capturing-the-direct-links-for-google-analytics/' addthis:title='Capturing the direct links for google analytics. ' ><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/10/capturing-the-direct-links-for-google-analytics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>quicktip: Working with strings.xml in Android and little bit about @</title>
		<link>http://www.techjini.com/blog/2010/02/20/quicktip-working-with-stringsxml-in-android-and-little-bit-about/</link>
		<comments>http://www.techjini.com/blog/2010/02/20/quicktip-working-with-stringsxml-in-android-and-little-bit-about/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 19:56:25 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/2010/02/20/quicktip-working-with-stringsxml-in-android-and-little-bit-about/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2010/02/20/quicktip-working-with-stringsxml-in-android-and-little-bit-about/' addthis:title='quicktip: Working with strings.xml in Android and little bit about @ '  ><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>Very simple so straight to the point. BAD: In your xmls - &#60;Button android:id="@+id/buy_button" android:text="Buy Me" /&#62; In your java<a href="http://www.techjini.com/blog/2010/02/20/quicktip-working-with-stringsxml-in-android-and-little-bit-about/" 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/02/20/quicktip-working-with-stringsxml-in-android-and-little-bit-about/' addthis:title='quicktip: Working with strings.xml in Android and little bit about @ ' ><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/02/20/quicktip-working-with-stringsxml-in-android-and-little-bit-about/' addthis:title='quicktip: Working with strings.xml in Android and little bit about @ '  ><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>Very simple so straight to the point.</p>
<p>BAD:<br />
<code><br />
In your xmls<br />
- &lt;Button android:id="@+id/buy_button" android:text="Buy Me" /&gt;</p>
<p>In your java code<br />
- myButton.setText("Second Button");<br />
</code></p>
<p>GOOD:</p>
<p>Define your strings in strings.xml (You can name it anything) and place it in &#8216;res/values&#8217; folder</p>
<p><code><br />
&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
&lt;resources><br />
	&lt;string name="buy_button"&gt;Buy&lt;/string&gt;<br />
&lt;/resources&gt;<br />
</code></p>
<p>and then</p>
<p><code><br />
- &lt;Button android:id="@+id/buy_button" android:text="<strong><em>@string/buy_button</em></strong>" /&gt;<br />
- myButton.setText(this.getString(R.string.buy_button));<br />
</code></p>
<p>Syntax for using a &#8216;resource&#8217; in a xml or code is :<br />
package.R.resource_type.resource_name<br />
and<br />
@[package:]resource_type/resource_name</p>
<p>NOTE: package here does not mean &#8216;java package&#8217; but package == application, so if you are accessing a resource which is defined in your own app you can skip it. Thats why we use @strings/name or directly R.strings.name. Similarly to use resources defined by android we will use @android:string/name or android.R.string.name</p>
<p>For converting R.string.id to String you can either use getString(int) or getString(int, Object&#8230;) for adding dynamic values.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2010/02/20/quicktip-working-with-stringsxml-in-android-and-little-bit-about/' addthis:title='quicktip: Working with strings.xml in Android and little bit about @ ' ><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/02/20/quicktip-working-with-stringsxml-in-android-and-little-bit-about/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>quicktip: How to convert a view to an image (android)</title>
		<link>http://www.techjini.com/blog/2010/02/10/quicktip-how-to-convert-a-view-to-an-image-android/</link>
		<comments>http://www.techjini.com/blog/2010/02/10/quicktip-how-to-convert-a-view-to-an-image-android/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 07:51:33 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.techjini.com/blog/2010/02/10/quicktip-how-to-convert-a-view-to-an-image-android/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.techjini.com/blog/2010/02/10/quicktip-how-to-convert-a-view-to-an-image-android/' addthis:title='quicktip: How to convert a view to an image (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>This is a quick tip to convert or draw your view on a canvas so that you can either show<a href="http://www.techjini.com/blog/2010/02/10/quicktip-how-to-convert-a-view-to-an-image-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/2010/02/10/quicktip-how-to-convert-a-view-to-an-image-android/' addthis:title='quicktip: How to convert a view to an image (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/2010/02/10/quicktip-how-to-convert-a-view-to-an-image-android/' addthis:title='quicktip: How to convert a view to an image (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>This is a quick tip to convert or draw your view on a canvas so that you can either show it as preview or use it for any drag &#8211; drop kind of operation. Very simple and self explanatory so just posting the code</p>
<p><code><br />
View viewToBeConverted;</p>
<p>Bitmap viewBitmap = Bitmap.createBitmap(viewToBeConverted.getWidth(), viewToBeConverted.getHeight(),Bitmap.Config.ARGB_8888);<br />
Canvas canvas = new Canvas(viewBitmap);</p>
<p>viewToBeConverted.draw(canvas);<br />
</code></p>
<p>Thats it, now you can use &#8216;viewBitmap&#8217; as a normal image. You can change a few parameters to create different kinds of image, for eg when you drag your app icon on bring it on the trash can to drop it becomes red etc</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.techjini.com/blog/2010/02/10/quicktip-how-to-convert-a-view-to-an-image-android/' addthis:title='quicktip: How to convert a view to an image (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/2010/02/10/quicktip-how-to-convert-a-view-to-an-image-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

