<?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>TenXperts Technologies</title>
	<atom:link href="http://www.tenxperts.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tenxperts.com</link>
	<description>Expertise + pragmatic approach = TenXperts Productivity</description>
	<lastBuildDate>Wed, 21 Sep 2011 17:16:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Returning Home in Android</title>
		<link>http://www.tenxperts.com/2011/09/21/returning-home-in-android/</link>
		<comments>http://www.tenxperts.com/2011/09/21/returning-home-in-android/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 10:39:43 +0000</pubDate>
		<dc:creator>mukul</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://www.tenxperts.com/?p=187</guid>
		<description><![CDATA[Several times, while using android apps, users have to navigate through multiple activities to achieve a final end result. Android handles backtracking through activities through its back button. However, there are cases where a back button isn&#8217;t ideal to the situation. Imagine the user pressing &#8220;back&#8221; 15 times to get to the main page of [...]]]></description>
			<content:encoded><![CDATA[<p>Several times, while using android apps, users have to navigate through multiple activities to achieve a final end result. Android handles backtracking through activities through its back button.</p>
<p>However, there are cases where a back button isn&#8217;t ideal to the situation. Imagine the user pressing &#8220;back&#8221; 15 times to get to the main page of your app. Or, in an eCommerce app, the user having access to the &#8220;make payment&#8221; screen once again after the payment has been successful.<span id="more-187"></span></p>
<p>In such cases, a way to redirect the user to return to the home screen is necessary. This is where android&#8217;s <strong><span style="color: #3366ff;"><em><code>FLAG_ACTIVITY_SINGLE_TOP</code></em></span></strong> and <strong><em><span style="color: #3366ff;"><code>FLAG_ACTIVITY_CLEAR_TOP</code></span></em></strong> intent flags come in handy.</p>
<p>The use case we consider today is where there are several activities A, B, C, D, E etc and the user navigates through these multiple times &#8211; A &gt; B &gt; C &gt; D &gt; E. After E, we need to return to B, but remove the whole activity stack so that only A and B remain.</p>
<p>Below is a simple tutorial on how to implement this.</p>
<p>Step 1:</p>
<p>In the AndroidManifest.xml of your application, identify the activity you want to return to. In my case, I call it MainActivity. In the corresponding &lt;activity&gt; tag, specify the launchMode attribute to singleTop.</p>
<pre name="code" class="html">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<!-- set the launchMode to singleTop -->
          <activity android:launchMode="singleTop" android:name=".MainActivity"></activity>
<!-- all other activities follow -->
</application>
</pre>
<p>Step 2:</p>
<p>If you want to navigate in a single click from activity E (eg: DeeplyNestedActivity) directly to activity B (eg: MainActivity) and close all other activities in between , then define a Button in the DeeplyNestedActivity and add an OnClickListener to it. In the onClick method of the button, add the following code -</p>
<pre name="code" class="java">
Button goHomeButton;
		goHomeButton = (Button) findViewById(R.id.go_home);
		goHomeButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(DeeplyNestedActivity.this, MainActivity.class);
		                intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
		                startActivity(intent);
			}
		});</pre>
<p>And DONE. Your app will navigate back to its home activity when this button is clicked.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenxperts.com/2011/09/21/returning-home-in-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Large images in android</title>
		<link>http://www.tenxperts.com/2011/07/13/working-with-large-images-in-android/</link>
		<comments>http://www.tenxperts.com/2011/07/13/working-with-large-images-in-android/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 07:22:14 +0000</pubDate>
		<dc:creator>mukul</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.tenxperts.com/?p=141</guid>
		<description><![CDATA[Android devices have a very small heap size. So, often while rendering large images (either from a drawable resource or from the assets folder) you could run out of memory. I faced such a situation recently, and after struggling with it for some time, i found that the best way to tackle extremely large images [...]]]></description>
			<content:encoded><![CDATA[<p>Android devices have a very small heap size. So, often while rendering large images (either from a drawable resource or from the assets folder) you could run out of memory. I faced such a situation recently, and after struggling with it for some time, i found that the best way to tackle extremely large images is to <span id="more-141"></span>split them into tiny pieces, place these pieces in your asset folder, and render them through a webview. The basic steps are outlined below</p>
<p>1) Image Splitting</p>
<p>I use Photoshop, so the method here is for photoshop users, there should be some online resources available for doing the same thing on GIMP.</p>
<p style="padding-left: 30px;">Load image in photoshop and select the splice tool (the tool looks like a small pen-knife)<br />
Right click on the image and choose &#8220;Divide Splice&#8221;. A dialog opens which asks you how many vertical and horizontal splices you require &#8211; i prefer choosing a size that makes each splice smaller than 320&#215;480.<br />
Once that is done, go to File &gt; Save for Web  (or Alt+Shift+Ctrl+S) &gt; hit the Save button and in the dialog that opens, choose &#8220;HTML and Images (*.html)&#8221; where it asks you to specify Save as Type.</p>
<p>A html page along with an image folder would have been created for you at the specified location.</p>
<p>2) Adding these to android assets</p>
<p>Place the html page (lets call it bigimage.html and the images folder in the assets folder of your android project), you can later access it from your application by specifying the path as <code>file:///android_asset/bigimage.html</code></p>
<p>3) Rendering the image</p>
<p>in the onCreate() method of your activity, create a WebView element and show the html page.</p>
<pre name="code" class="java">
		WebView webView = new WebView(this);

		setContentView(webView);

		try {
			webView.loadUrl("file:///android_asset/bigimage.html");
			webView.getSettings().setLoadsImagesAutomatically(true);
			webView.getSettings().setBuiltInZoomControls(true); // zooming
																// controls
			webView.setInitialScale(25); // sets the scale to 25% you may
											// specify whatever suits you best
		} catch (Exception e) {
			e.printStackTrace();
		}
</pre>
<p>Thats it, the rendering is superfast and no more out of memory errors. I parsed an image that was 3500&#215;1500 px in less than a second.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenxperts.com/2011/07/13/working-with-large-images-in-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Good android tutorials</title>
		<link>http://www.tenxperts.com/2011/06/21/some-good-android-tutorials/</link>
		<comments>http://www.tenxperts.com/2011/06/21/some-good-android-tutorials/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 05:09:20 +0000</pubDate>
		<dc:creator>mukul</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.tenxperts.com/?p=55</guid>
		<description><![CDATA[The google support for each feature in the android platform is pretty exhaustive and their Developer site is a treasure trove of information and tutorials. In addition to these resources, while understanding the platform i came across some great tutorials. Google now uses the stackoverflow android tag as an additional forum for answering developer queries. [...]]]></description>
			<content:encoded><![CDATA[<p>The google support for each feature in the android platform is pretty exhaustive and their <a href="http://developer.android.com">Developer site</a> is a treasure trove of information and tutorials. In addition to these resources, while understanding the platform i came across some great tutorials.<span id="more-55"></span></p>
<p>Google now uses the <a href="http://stackoverflow.com/questions/tagged/android">stackoverflow android tag</a> as an additional forum for answering developer queries.</p>
<p>Presented here is a list of tutorials/resources that I had come across during my study of the various aspects of android.</p>
<p>1) Starting with the most basic -</p>
<p><a href="http://www.brighthub.com/mobile/google-android/articles/37151.aspx">Installing an apk file on the google android phone</a><br />
<a href="http://developer.android.com/guide/developing/device.html#setting-up">and using various hardware devices</a></p>
<p>2) Maps in android</p>
<p><a href="http://developer.android.com/guide/tutorials/views/hello-mapview.html">A hello world tutorial</a><br />
<a href="http://chrisblunt.com/2010/08/12/android-map-view-double-taps-and-overlay-markers/">Detecting and zooming on doubletaps in a map</a><br />
<a href="http://www.anddev.org/google_driving_directions_-_mapview_overlayed-t826.html">Driving directions</a></p>
<p>3) Auto-start, background threads and push notifications</p>
<p><a href="http://www.anddev.org/autostart-t1565.html">Auto Start</a><br />
<a href="http://tokudu.com/2010/how-to-implement-push-notifications-for-android/">Push-notifications</a><br />
<a href="http://www.coderanch.com/t/435293/Android/Mobile/Running-background-Services-schedule">Background-services</a><br />
<a href="http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html">Multithreading</a></p>
<p>4) REST</p>
<p><a href="http://www.josecgomez.com/2010/04/30/android-accessing-restfull-web-services-using-json/">Part 1 – getting the json data</a><br />
<a href="http://www.josecgomez.com/2010/05/03/android-putting-custom-objects-in-listview/">Part 2 – parsing the objects created to a custom adapter</a><br />
<a href="http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview">Part 3 – Lazy loading of images</a></p>
<p><a href="http://senior.ceng.metu.edu.tr/2009/praeda/2009/01/11/a-simple-restful-client-at-android/">Another REST example</a></p>
<p>5) SOAP</p>
<p><a href="http://seesharpgears.blogspot.com/2010/10/ksoap-android-web-service-tutorial-with.html">SOAP using the KSOAP-2 library</a></p>
<p>6) MVC in android</p>
<p><a href="http://mindtherobot.com/blog/675/android-architecture-message-based-mvc/">MVC</a></p>
<p>More links and useful tutorials will be posted here as and when i explore newer features of this wonderful platform. Next stop – apps for android using <a href="http://ofps.oreilly.com/titles/9781449383268/">HTML/CSS and JavaScript</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenxperts.com/2011/06/21/some-good-android-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://www.tenxperts.com/2011/06/21/welcome/</link>
		<comments>http://www.tenxperts.com/2011/06/21/welcome/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 05:02:07 +0000</pubDate>
		<dc:creator>kamal</dc:creator>
				<category><![CDATA[TenXperts]]></category>

		<guid isPermaLink="false">http://www.tenxperts.com/?p=46</guid>
		<description><![CDATA[Welcome to our blog. Here we will be regularly posting information about our work on new and interesting technologies, trends and best practices.]]></description>
			<content:encoded><![CDATA[<p>Welcome to our blog. Here we will be regularly posting information about our work on new and interesting technologies, trends and best practices.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenxperts.com/2011/06/21/welcome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

