<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Google Android Lovers</title><description></description><managingEditor>noreply@blogger.com (Chaunri)</managingEditor><pubDate>Thu, 18 Dec 2025 01:47:46 -0800</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">152</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://google-androidlovers.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle/><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>Android Developer for developing android application and game Tools Help</title><link>http://google-androidlovers.blogspot.com/2015/11/android-developer-for-developing.html</link><category>android developer blog</category><category>beginners Tutorials</category><category>tools</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Sat, 28 Nov 2015 23:22:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-8476124199786490065</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h1 itemprop="name"&gt;
&lt;/h1&gt;
&lt;div id="jd-content"&gt;


    &lt;div class="jd-descr" itemprop="articleBody"&gt;
    The Android SDK includes a variety of tools that help you develop mobile
applications for the Android platform. The tools are classified into two groups: SDK tools
and platform tools. SDK tools are platform independent and are required no matter which
Android platform you are developing on. Platform tools are customized to support the features of the
latest Android platform.&lt;br /&gt;



&lt;h2 id="tools-sdk" style="margin-bottom: 0px;"&gt;
SDK Tools&lt;/h2&gt;
&lt;hr /&gt;
The SDK tools are installed with the SDK starter package and are periodically updated.
The SDK tools are required if you are developing Android applications. The most important SDK tools
include the Android SDK Manager (&lt;code&gt;android sdk&lt;/code&gt;), the AVD Manager (&lt;code&gt;android
avd&lt;/code&gt;) the emulator (&lt;code&gt;emulator&lt;/code&gt;), and the Dalvik Debug Monitor Server
(&lt;code&gt;ddms&lt;/code&gt;). A short summary of some frequently-used SDK tools is provided below.&lt;br /&gt;




&lt;h3 id="tools-virtual-device"&gt;
Virtual Device Tools&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/avd-manager.html"&gt;Android Virtual Device Manager&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;The AVD Manager provides a graphical user interface in which you can create
        and manage Android Virtual Devices (AVDs) that run in the Android Emulator. &lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/emulator.html"&gt;Android Emulator (emulator)&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;A QEMU-based device-emulation tool that you can use to debug and test
        your applications in an actual Android run-time environment.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/mksdcard.html"&gt;mksdcard&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Helps you create a disk image that you can use with the emulator, to simulate the presence
        of an external storage card (such as an SD card).&lt;/dd&gt;&lt;/dl&gt;
&lt;h3 id="tools-development"&gt;
Development Tools&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/android.html"&gt;android&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Lets you manage AVDs, projects, and the installed components of the SDK.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/hierarchy-viewer.html"&gt;Hierarchy Viewer (hierarchyviewer)&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Provides a visual representation of the layout's View hierarchy with performance information
        for each node in the layout, and a magnified view of the display to closely examine the
        pixels in your layout.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/lint.html"&gt;lint&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;The Android &lt;code&gt;lint&lt;/code&gt; tool is a static code analysis tool that checks your Android
        project source files for potential bugs and optimization improvements.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/sdk-manager.html"&gt;SDK Manager&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Lets you manage SDK packages, such as installed platforms and system images.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/sqlite3.html"&gt;sqlite3&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Lets you access the SQLite data files created and used by Android applications.&lt;/dd&gt;&lt;/dl&gt;
&lt;h3 id="tools-debugging"&gt;
Debugging Tools&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/adb.html"&gt;adb&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with
        an emulator instance or connected Android-powered device. It also provides access to the
        device shell.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/shell.html"&gt;ADB Shell Commands&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Learn the commands available for advanced command-line operations.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/debugging/ddms.html"&gt;Dalvik Debug Monitor
Server (ddms)&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Lets you debug Android applications.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/monitor.html"&gt;Device Monitor&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Android Device Monitor is a stand-alone tool that provides a graphical user interface for
        several Android application debugging and analysis tools.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/dmtracedump.html"&gt;dmtracedump&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Generates graphical call-stack diagrams from trace log files. The tool uses the
Graphviz Dot utility to create the graphical output, so you need to install Graphviz before
running &lt;code&gt;dmtracedump&lt;/code&gt;. For more information on using &lt;code&gt;dmtracedump&lt;/code&gt;, see &lt;a href="http://developer.android.com/tools/debugging/debugging-tracing.html#dmtracedump"&gt;Profiling
with Traceview and dmtracedump&lt;/a&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/hprof-conv.html"&gt;hprof-conv&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Converts the HPROF file that is generated by the Android SDK tools to a standard format so
you can view the file in a profiling tool of your choice.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/systrace.html"&gt;Systrace&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Lets you analyze the execution of your application in the context of system processes,
    to help diagnose display and performance issues.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/traceview.html"&gt;traceview&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Provides a graphical viewer for execution logs saved by your application.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/systrace.html"&gt;Systrace&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Lets you analyze the execution of your application in the context of system processes,
    to help diagnose display and performance issues.&lt;/dd&gt;&lt;/dl&gt;
&lt;h3 id="tools-build"&gt;
Build Tools&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/jobb.html"&gt;JOBB&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Allows you to build encrypted and unencrypted
    &lt;a href="http://developer.android.com/google/play/expansion-files.html"&gt;APK expansion files&lt;/a&gt; in Opaque
    Binary Blob (OBB) format.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/proguard.html"&gt;ProGuard&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Shrinks, optimizes, and obfuscates your code by removing unused code and renaming
classes, fields, and methods with semantically obscure names.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/zipalign.html"&gt;zipalign&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Optimizes &lt;code&gt;.apk&lt;/code&gt; files by ensuring that all uncompressed data starts with a
particular alignment relative to the start of the file. This should always be used to align .apk
files after they have been signed.&lt;/dd&gt;&lt;/dl&gt;
&lt;h3 id="tools-image"&gt;
Image Tools&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/draw9patch.html"&gt;Draw 9-patch&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Allows you to easily create a &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/graphics/NinePatch.html"&gt;NinePatch&lt;/a&gt;&lt;/code&gt; graphic using a
WYSIWYG editor. It also previews stretched versions of the image, and highlights the area in which
content is allowed.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/vector-asset-studio.html"&gt;Vector Asset Studio&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Helps you add material icons and import Scalable Vector Graphic (SVG) files into your
    Android Studio project as a drawable resource.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/etc1tool.html"&gt;etc1tool&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;A command line utility that lets you encode PNG images to the ETC1 compression standard and
    decode ETC1 compressed images back to PNG.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/gltracer.html"&gt;Tracer for OpenGL ES&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Allows you to capture OpenGL ES commands and frame by frame images to help you understand
    how your graphics commands are being executed.&lt;/dd&gt;&lt;/dl&gt;
&lt;h2 id="tools-platform" style="margin-bottom: 0px;"&gt;
Platform Tools&lt;/h2&gt;
&lt;hr /&gt;

The platform tools are typically updated every time you install a new SDK platform. Each update
of the platform tools is backward compatible with older platforms. Usually, you directly use only
one of the platform tools—the &lt;a href="http://developer.android.com/intl/vi/tools/help/adb.html"&gt;Android Debug Bridge (&lt;code&gt;adb&lt;/code&gt;)&lt;/a&gt;.
Android Debug Bridge is a versatile tool that lets you manage the state of an emulator instance or
Android-powered device. You can also use it to install an Android application (.apk) file on a
device.&lt;br /&gt;


The other platform tools, such as &lt;a href="http://developer.android.com/guide/components/aidl.html"&gt;aidl&lt;/a&gt;,
&lt;code&gt;aapt&lt;/code&gt;, &lt;code&gt;dexdump&lt;/code&gt;, and &lt;code&gt;dx&lt;/code&gt;, are typically called by the Android
build tools or Android Development Tools (ADT), so you rarely need to invoke these tools directly.
As a general rule, you should rely on the build tools or the ADT plugin to call them as needed.&lt;br /&gt;


&lt;div class="note"&gt;
&lt;strong&gt;Note:&lt;/strong&gt; The Android SDK provides additional shell tools that can
be accessed through &lt;code&gt;adb&lt;/code&gt;, such as &lt;a href="http://developer.android.com/tools/help/bmgr.html"&gt;bmgr&lt;/a&gt; and
&lt;a href="http://developer.android.com/tools/help/logcat.html"&gt;logcat&lt;/a&gt;.&lt;/div&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/bmgr.html"&gt;bmgr&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;A shell tool you can use to interact with the Backup Manager on Android devices supporting
    API Level 8 or greater.&lt;/dd&gt;
&lt;dt&gt;&lt;a href="http://developer.android.com/tools/help/logcat.html"&gt;logcat&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;Provides a mechanism for collecting and viewing system debug output.&lt;/dd&gt;&lt;dd&gt;&amp;nbsp;&lt;/dd&gt;&lt;dd&gt;source: official android developer website: &lt;a href="http://developer.android.com/"&gt;http://developer.android.com&lt;/a&gt; &lt;/dd&gt;&lt;/dl&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>Best Android Training Destination</title><link>http://google-androidlovers.blogspot.com/2013/02/best-android-training-destination.html</link><category>Android Bootcamp</category><category>Android Training</category><category>Lynda.com</category><category>Udemy.com</category><category>www.edumobile.org</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Mon, 18 Feb 2013 12:44:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-4670012492126683568</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;div class="widget-content"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://marakana.com/training/android/" style="margin-left: 1em; margin-right: 1em;"&gt;
&lt;img alt="Android Training Courses" height="300" id="Image2_img" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisZPuzddX7wn0yjpC7ovwvl66faYDAIkXR7hHAhytRwOcvfl4Y6w3h9TnCKtZL6CFc3Wk0PSAjK88oVIEEVeHOpO1p21Vc5sBGrOcMGFhVEpLFqTwFM95LxcLqboTq47FOirnIby7rFh3U/s310/android-bootcamp.png" width="300" /&gt;
&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="caption"&gt;Android Bootcamp Training Courses at &lt;a href="http://marakana.com/training/android/"&gt;http://marakana.com/training/android/&lt;/a&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="widget-content"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://developer.android.com/training/index.html" style="margin-left: 1em; margin-right: 1em;"&gt;
&lt;img alt="Android Official Training Tutorials" height="300" id="Image1_img" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikvay_whpDEIg78sS5ZqLtC7UlDj0yokNnRNEDeUf8hfo-2driMOS7DMdYV4gnqvIQsF3rlRX_BR7Q-4Gyt92nTmZkxyts7jDQyUmoZ3AxAsDz68OxOF_ossFE38JFwrcsJDNBn0egQ2zL/s310/traing+android.jpg" width="300" /&gt;
&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="caption"&gt;Android Official Training Tutorials at &lt;a href="http://www.developer.android.com/"&gt;www.developer.android.com&lt;/a&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="widget-content"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.udemy.com/android-training/" style="margin-left: 1em; margin-right: 1em;"&gt;
&lt;img alt="Android Official Training Tutorials" height="300" id="Image1_img" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSBt_BTvE9UCpZtsIgF54Vdn9Z0rSJX0ryasihAYgUDby0ZQMfC6S8Z58osLCelHRTEHABtz0dSFAeh5EBf-SH3eL1A6zei_7mC_KcVASkID-yKhgd0QfshNC6Xn6ZjD1aIkwnu5GS_Iie/s1600/udemy.png" width="300" /&gt;
&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="caption"&gt;Android Udemy Training at &lt;a href="http://www.udemy.com/android-training%20"&gt;www.udemy.com/android-training &lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="widget-content"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.bignerdranch.com/classes/android" style="margin-left: 1em; margin-right: 1em;"&gt;
&lt;img alt="Android Official Training Tutorials" height="300" id="Image1_img" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZbJwiCYR8_RdS1_eqvmW65hyphenhyphenId7c1hauiNIOrE_KdH4O80mBUSUVJOR8Lg1R5x4m70T9HMBLx3rvnMUiBu1NrSfKNZdlhUKrqCmxHui4o_c72n3cOj05RXTB8PFeMKs5D6LjyWwNkE6h-/s1600/gI_0_0_bnrlogo1.jpg" width="300" /&gt;
&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="caption"&gt; Big Neard Anch at &lt;a href="http://www.bignerdranch.com/"&gt;http://www.bignerdranch.com&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="widget-content"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.edumobile.org/android-course.html" style="margin-left: 1em; margin-right: 1em;"&gt;
&lt;img alt="Android Official Training Tutorials" height="300" id="Image1_img" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSoo9YaAfLW9wCLaNsRrDISbTEgfrX4pWySZ-sN43Nh1KN2iUa4ykSlLdg7_4r4AG2TdtiSbmOHxTmHDAA-hVNl5C7yMS3DzxE0ZHQ5hNldTPC15oyjHE7jmjqOq59egs73vlUzF5__5GB/s1600/master-android-development-from-an-easy-step-by-step-online.png" width="300" /&gt;
&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="caption"&gt;Android Tutorial and Android Development Course for Beginners at &lt;a href="http://www.edumobile.org/android-course.html"&gt;www.edumobile.org &lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="widget-content"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99528" style="margin-left: 1em; margin-right: 1em;"&gt;
&lt;img alt="Android Official Training Tutorials" height="300" id="Image1_img" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpguI4_bGXmpyxyh_U1L7aGKORm8wYuk6YpdWZ-a7_VNeRAutyq87LYd1x2aKKpQWveRwVYlF2DC33oTa43mezVz8w9J-Yn4MKNSNN1W1f-KwkJDuZav6tOYvGH0PMZq0Spj78JDR8VnKZ/s1600/ierstes.jpg" width="300" /&gt;
&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="caption"&gt;Complete Android Development Training at &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99528"&gt;www.intertech.com&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="widget-content"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.lynda.com/Android-training-tutorials/947-0.html" style="margin-left: 1em; margin-right: 1em;"&gt;
&lt;img alt="Android Official Training Tutorials" height="300" id="Image1_img" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4zHxKg9kZTufDHO5fDSZSblgndk7s92zls0QAZG29xXGixcRE5Mjl96dbJlDAJ6VJpsbRd__Ui4goMWqzal7BLHCy0YwHsJI3V4klE97ScfEzpV-XwiqwqXgnJBz-MutnKh-_ff5gteYn/s1600/lynda.jpg" width="300" /&gt;
&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="caption"&gt;Android App Development with Java Essential Training with &lt;i&gt;Lee Brimelow&lt;/i&gt; at &lt;a href="http://www.lynda.com/Android-training-tutorials/947-0.html"&gt;www.lynda.com&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisZPuzddX7wn0yjpC7ovwvl66faYDAIkXR7hHAhytRwOcvfl4Y6w3h9TnCKtZL6CFc3Wk0PSAjK88oVIEEVeHOpO1p21Vc5sBGrOcMGFhVEpLFqTwFM95LxcLqboTq47FOirnIby7rFh3U/s72-c/android-bootcamp.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">9</thr:total></item><item><title>Most Common Q &amp; A  in Android</title><link>http://google-androidlovers.blogspot.com/2013/02/most-common-q-in-android.html</link><category>beginners Tutorials</category><category>Q and A</category><category>Stackoverflow</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Mon, 18 Feb 2013 12:34:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-2095397057626218601</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="text-align: left;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNWBGsj1O_aAs3WhgfgCDwIWrtC1T9wBaxxWW3PT9k3mrLxV2R42s5s0bGZOyUJ8LKORjLx_aaoF5OIvkLUMAj7Afu8QW8tkStXdkzkFB5PPt-W-Cm53EB2GdbsOSXY_R0VOMO8Zlm4jpd/s1600/dre.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNWBGsj1O_aAs3WhgfgCDwIWrtC1T9wBaxxWW3PT9k3mrLxV2R42s5s0bGZOyUJ8LKORjLx_aaoF5OIvkLUMAj7Afu8QW8tkStXdkzkFB5PPt-W-Cm53EB2GdbsOSXY_R0VOMO8Zlm4jpd/s1600/dre.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: black; color: white; text-align: left;"&gt;
&lt;span style="font-size: large;"&gt;Android Most usable Q and A site:- &lt;a href="http://stackoverflow.com/questions/tagged/android"&gt;&lt;span style="color: #9fc5e8;"&gt;StackOverFlow&lt;/span&gt; &lt;/a&gt;and &lt;a href="http://android.stackexchange.com/" style="color: #9fc5e8;"&gt;Android Enthusiasts&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: black; color: white; text-align: left;"&gt;
&lt;span style="font-size: large;"&gt;Google discussions:- &lt;a href="https://groups.google.com/forum/?fromgroups#%21forum/android-developers"&gt;&lt;span style="color: #9fc5e8;"&gt;Android Developer&lt;/span&gt;&amp;nbsp;&lt;/a&gt; and &amp;nbsp;&lt;a href="https://groups.google.com/forum/?fromgroups#%21forum/android-discuss" style="color: #9fc5e8;"&gt; Android Discuss&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: #f3f3f3; color: black; text-align: left;"&gt;
&lt;span style="font-size: large;"&gt;&lt;span style="background-color: blue;"&gt;&lt;u&gt;&lt;i&gt;&lt;span style="background-color: white;"&gt;Top vote at stackoverflow&lt;/span&gt;&lt;/i&gt;&lt;/u&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;


&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/4382178/android-sdk-installation-doesnt-find-jdk"&gt;“Debug certificate expired” error in Eclipse Android&amp;nbsp; &lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;
&amp;nbsp;&lt;a href="http://stackoverflow.com/questions/4382178/android-sdk-installation-doesnt-find-jdk"&gt; Android SDK installation doesn't find JDK&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;
&amp;nbsp;&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/2025282/difference-of-px-dp-dip-and-sp-in-android"&gt;Difference of px, dp, dip and sp in android&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;
&amp;nbsp; &lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/1554099/slow-android-emulator"&gt;Slow Android emulator&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;

&amp;nbsp;&amp;nbsp; &lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/101754/is-there-any-way-to-run-python-on-android"&gt;Is there any way to run Python on Android?&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;

&amp;nbsp;&amp;nbsp; &lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/151777/how-do-i-save-an-android-applications-state"&gt;How do I save an Android application's state?&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;
&amp;nbsp;
&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/522312/best-practices-for-unit-testing-android-apps"&gt;Best practices for unit testing Android apps&amp;nbsp;&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;

&amp;nbsp; &lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/1109022/how-to-close-hide-the-android-soft-keyboard"&gt;How to close/hide the Android Soft Keyboard?&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;

&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/1482586/comparison-between-corona-phonegap-titanium"&gt;Comparison between Corona, Phonegap, Titanium&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;

&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/1678122/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips"&gt;'Must Override a Superclass Method' Errors after importing a&amp;nbsp; project into Eclipse&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;

&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/937313/android-basic-gesture-detection"&gt;Android - basic gesture detection&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;

&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview"&gt;Android - How do I do a lazy load of images in ListView&amp;nbsp;&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;

&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/456211/activity-restart-on-rotation-android"&gt;Activity restart on rotation Android&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;
&amp;nbsp;
&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon"&gt;Quitting an application - is that frowned upon?&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;
&amp;nbsp;
&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/1555109/stop-edittext-from-gaining-focus-at-activity-startup"&gt;Stop EditText from gaining focus at Activity startup?&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;

&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/1521640/standard-android-button-with-a-different-color"&gt;Standard Android Button with a different color&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;
&amp;nbsp;
&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/2680827/conversion-to-dalvik-format-failed-with-error-1-on-external-jar"&gt;“Conversion to Dalvik format failed with error 1” on external JAR&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;

&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id"&gt;Is there a unique Android device ID?&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;
&amp;nbsp;
&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/601503/how-do-i-obtain-crash-data-from-my-android-application"&gt;How do I obtain crash-data from my Android application?&lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3 style="text-align: left;"&gt;

&lt;a class="question-hyperlink" href="http://stackoverflow.com/questions/424752/any-good-graphing-packages-for-android"&gt;Any good graphing packages for Android? &lt;/a&gt;&lt;/h3&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style="text-align: left;"&gt;

 &lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;

 &lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;

 &lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;

 &lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;

 &lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;

 &lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;

 &lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;

 &lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;

 &lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;

 &lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;

 &lt;/h3&gt;
&lt;h3 style="text-align: left;"&gt;

&amp;nbsp; &lt;/h3&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNWBGsj1O_aAs3WhgfgCDwIWrtC1T9wBaxxWW3PT9k3mrLxV2R42s5s0bGZOyUJ8LKORjLx_aaoF5OIvkLUMAj7Afu8QW8tkStXdkzkFB5PPt-W-Cm53EB2GdbsOSXY_R0VOMO8Zlm4jpd/s72-c/dre.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Adding Events to the User’s Calendar </title><link>http://google-androidlovers.blogspot.com/2012/09/adding-events-to-users-calendar.html</link><category>Begineer</category><category>Calendar</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Mon, 17 Sep 2012 04:03:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-8948633196358740413</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZz482AVoIpR4fkgemqKJdPwZeUmahcI4So8sFFYTjyRTSoSkg35zKAEZy6YbEFjRDGBP__Fcnf4dNcWXu7IlOSBySgDJB7Q3CMuQTDQhY3Hxk4pN2w-sguFqQK4dx0RMdeOT1vBSh2l2-/s1600/android_calendar.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZz482AVoIpR4fkgemqKJdPwZeUmahcI4So8sFFYTjyRTSoSkg35zKAEZy6YbEFjRDGBP__Fcnf4dNcWXu7IlOSBySgDJB7Q3CMuQTDQhY3Hxk4pN2w-sguFqQK4dx0RMdeOT1vBSh2l2-/s320/android_calendar.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
The latest version of the Android SDK, code-named Ice Cream Sandwich,
 reached developers this week. For the first time, the SDK provides 
access to the Calendar application in a legitimate fashion. One of the 
most common tasks that developers often want to be able to do is create 
new events in the user’s calendar, so today we’ll show you how.&lt;br /&gt;

&lt;span id="more-8363"&gt;&lt;/span&gt;&lt;br /&gt;

The Calendar is a common application that users rely upon on their 
Android devices. Applications can access the Calendar using the new APIs
 available in Android 4.0. Adding new events to the Calendar is simple 
and requires no special application permissions. &lt;br /&gt;

Note: The user is responsible for configuring the Calendar 
application with the appropriate Calendar accounts (e.g. Microsoft 
Exchange).&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes you have a project that supports Android 4.0 (API 
Level 14 compatible) and that you are compiling with the latest tools. 
It also assumes that you’ve properly configured the Calendar application
 on the Android emulator &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Create the Calendar Intent&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In order to prompt the user to create a calendar event in their 
existing calendar, you’ll need to create the appropriate intent. This 
intent will launch the Calendar application with a screen that allows 
them to create a new event. The user must confirm this event and can add
 or change any of the event data associated with the event. &lt;br /&gt;

The intent to create a calendar event is shown below:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="java plain"&gt;Intent calIntent = &lt;/code&gt;&lt;code class="java keyword"&gt;new&lt;/code&gt; &lt;code class="java plain"&gt;Intent(Intent.ACTION_INSERT); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="java plain"&gt;calIntent.setData(CalendarContract.Events.CONTENT_URI);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="java plain"&gt;startActivity(calIntent);&amp;nbsp; &lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
This code simply launches the intent. It does not set any of the calendar data associated with the event.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Seeding Calendar Details&lt;/b&gt;&lt;br /&gt;
You can seed the information associated with a calendar event by 
supplying a number of intent extras. Extras can be used to describe 
event details, the date and time of the event, as well as calendar event
 settings like whether the event can be seen by others and whether it is
 busy or available time. The typical calendar event settings are all 
available as Extras. For example, the following intent call supplies 
some title and description information about an event:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="java plain"&gt;Intent calIntent = &lt;/code&gt;&lt;code class="java keyword"&gt;new&lt;/code&gt; &lt;code class="java plain"&gt;Intent(Intent.ACTION_INSERT); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="java plain"&gt;calIntent.setType(&lt;/code&gt;&lt;code class="java string"&gt;"vnd.android.cursor.item/event"&lt;/code&gt;&lt;code class="java plain"&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(Events.TITLE, &lt;/code&gt;&lt;code class="java string"&gt;"My House Party"&lt;/code&gt;&lt;code class="java plain"&gt;); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(Events.EVENT_LOCATION, &lt;/code&gt;&lt;code class="java string"&gt;"My Beach House"&lt;/code&gt;&lt;code class="java plain"&gt;); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(Events.DESCRIPTION, &lt;/code&gt;&lt;code class="java string"&gt;"A Pig Roast on the Beach"&lt;/code&gt;&lt;code class="java plain"&gt;); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="java plain"&gt;startActivity(calIntent);&amp;nbsp; &lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
Here we set the title, location, and description access for the event 
using the appropriate intent Extras. These fields will be set in a form 
that displays for the user to confirm the event in their calendar.&amp;nbsp;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp;Seeding Calendar Dates and Times&lt;/b&gt;&lt;br /&gt;
Calendar events are associated with specific dates and times. Some 
events have a specific time window and others are “all day” events. You 
can specify the date and time of an event using extras as well.&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="java plain"&gt;Intent calIntent = &lt;/code&gt;&lt;code class="java keyword"&gt;new&lt;/code&gt; &lt;code class="java plain"&gt;Intent(Intent.ACTION_INSERT); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="java plain"&gt;calIntent.setType(&lt;/code&gt;&lt;code class="java string"&gt;"vnd.android.cursor.item/event"&lt;/code&gt;&lt;code class="java plain"&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(Events.TITLE, &lt;/code&gt;&lt;code class="java string"&gt;"My House Party"&lt;/code&gt;&lt;code class="java plain"&gt;); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(Events.EVENT_LOCATION, &lt;/code&gt;&lt;code class="java string"&gt;"My Beach House"&lt;/code&gt;&lt;code class="java plain"&gt;); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(Events.DESCRIPTION, &lt;/code&gt;&lt;code class="java string"&gt;"A Pig Roast on the Beach"&lt;/code&gt;&lt;code class="java plain"&gt;); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="java plain"&gt;GregorianCalendar calDate = &lt;/code&gt;&lt;code class="java keyword"&gt;new&lt;/code&gt; &lt;code class="java plain"&gt;GregorianCalendar(&lt;/code&gt;&lt;code class="java value"&gt;2012&lt;/code&gt;&lt;code class="java plain"&gt;, &lt;/code&gt;&lt;code class="java value"&gt;7&lt;/code&gt;&lt;code class="java plain"&gt;, &lt;/code&gt;&lt;code class="java value"&gt;15&lt;/code&gt;&lt;code class="java plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(CalendarContract.EXTRA_EVENT_ALL_DAY, &lt;/code&gt;&lt;code class="java keyword"&gt;true&lt;/code&gt;&lt;code class="java plain"&gt;); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;calDate.getTimeInMillis()); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;calDate.getTimeInMillis()); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
&lt;code class="java plain"&gt;startActivity(calIntent);&amp;nbsp; &lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
Here we set the event to be an all day event on a specific date. You can
 also set much more fine-grained events by simply using the two extras 
for the beginning and ending time.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;Event Configuration Details&lt;/b&gt;&lt;br /&gt;
There are several other intent extras you can seed as well. These 
include whether or not others can see the event (access level) and 
whether or not the time should be shown as busy or available 
(availability) &lt;br /&gt;

You could set these extras as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(Events.ACCESS_LEVEL, Events.ACCESS_PRIVATE); &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(Events.AVAILABILITY, Events.AVAILABILITY_BUSY &lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&amp;nbsp;Here we include an extra setting to set the access of this event in the 
calendar to private. We set the availability during the event’s time 
period to busy (no other events can overlap).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;Configuring Recurring Events&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
here are one-time events, like our pig roast, and then there are 
recurring events, like by-weekly meetings. You can seed the recurrence 
rule using an intent extra, like this:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;code class="java plain"&gt;calIntent.putExtra(Events.RRULE, “FREQ=WEEKLY;COUNT=&lt;/code&gt;&lt;code class="java value"&gt;10&lt;/code&gt;&lt;code class="java plain"&gt;;WKST=SU;BYDAY=TU,TH”);&lt;/code&gt; &lt;/blockquote&gt;
The RRULE intent extra takes a standard iCalendar recurrence rule format (see &lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065"&gt;RFC 5544&lt;/a&gt;
 for details). For example, the one above creates a recurrence rule for 
an event that occurs every Tuesday and Thursday for 5 weeks.&lt;br /&gt;
&lt;br /&gt;
The Calendar application has been available on the Android platform for a
 long time, but there have been no documented APIs for accessing it: 
until now. Android 4.0 (API Level 14) includes a full Calendar content 
provider which can be used to access the user’s calendar information, 
provided the application has the appropriate permissions. However, one 
of the simplest and most common tasks, adding a new event to a user’s 
calendar, requires no special permissions and is very easy to implement.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Sources:- &lt;a href="http://mobile.tutsplus.com/tutorials/android/android-essentials-adding-events-to-the-user%E2%80%99s-calendar/"&gt;http://mobile.tutsplus.com&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZz482AVoIpR4fkgemqKJdPwZeUmahcI4So8sFFYTjyRTSoSkg35zKAEZy6YbEFjRDGBP__Fcnf4dNcWXu7IlOSBySgDJB7Q3CMuQTDQhY3Hxk4pN2w-sguFqQK4dx0RMdeOT1vBSh2l2-/s72-c/android_calendar.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Making the Android UI Fast and Efficient by Romain Guy</title><link>http://google-androidlovers.blogspot.com/2012/09/making-android-ui-fast-and-efficient-by.html</link><category>Begineer</category><category>UI/Application</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Mon, 17 Sep 2012 03:49:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-5538741992708681654</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="text-align: center;"&gt;
&lt;b style="color: blue;"&gt;&lt;span style="font-size: large;"&gt;Making the Android UI Fast and Efficient by Romain Guy&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="0" height="360" src="http://www.youtube.com/embed/UApv-ZMJ51g?feature=player_detailpage" width="640"&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/UApv-ZMJ51g/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>10 Attractive android tutorials for developers</title><link>http://google-androidlovers.blogspot.com/2012/09/10-attractive-android-tutorials-for.html</link><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Sat, 8 Sep 2012 02:11:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-8835125128860075175</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;strong&gt;10 Attractive android tutorials for developers&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;I selected some pretty cool and amazing tutorials for developers who
 going to learn how to make applications for android. For beginners and 
advanced developers. Some are Tutorials for drawing, some are for using 
location service, another – using SDK. Hope you find it Useful !&lt;br /&gt;
&lt;h3&gt;
&lt;a href="http://developer.android.com/resources/tutorials/opengl/opengl-es20.html" rel="nofollow" target="_blank"&gt;1. OpenGL ES 2.0&lt;/a&gt;&lt;/h3&gt;
This tutorial shows you how to create a simple Android application 
that uses the OpenGL ES 2.0 API to perform some basic graphics 
operations.&lt;br /&gt;
&lt;img alt="OpenGL ES" height="192" src="http://www.script-tutorials.com/demos/145/img1.jpg" width="640" /&gt;&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://www.vogella.de/articles/Android/article.html" rel="nofollow" target="_blank"&gt;2. Android Development Tutorial&lt;/a&gt;&lt;/h3&gt;
This tutorial describes how to create Android applications with Eclipse. This is very long tutorial, but also most detailed.&lt;br /&gt;
&lt;img alt="Android Development Tutorial" height="238" src="http://www.script-tutorials.com/demos/145/img2.jpg" width="640" /&gt;&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://android-tutorial.com/android-sdk-tutorial/" rel="nofollow" target="_blank"&gt;3. Android SDK Tutorial – Learn how to install Android SDK&lt;/a&gt;&lt;/h3&gt;
Tutorial describes how to install the Android SDK and set up your development environment for the first time.&lt;br /&gt;
&lt;img alt="Android SDK Tutorial" height="413" src="http://www.script-tutorials.com/demos/145/img3.jpg" width="640" /&gt;&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://www.helloandroid.com/tutorials/using-facebook-sdk-android-development-part-2" rel="nofollow" target="_blank"&gt;4. Using Facebook SDK in Android development&lt;/a&gt;&lt;/h3&gt;
In this tutorial I show you an android application, which logging in to Facebook, then get the Facebook ID.&lt;br /&gt;
&lt;img alt="Using Facebook SDK" height="176" src="http://www.script-tutorials.com/demos/145/img4.jpg" width="640" /&gt;&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://www.tutorialforandroid.com/2010/11/drawing-with-canvas-in-android-saving.html" rel="nofollow" target="_blank"&gt;5. Drawing with Canvas in Android, Saving your drawings&lt;/a&gt;&lt;/h3&gt;
This is one of tutorials from series of topics for drawing with canvas on android.&lt;br /&gt;
&lt;img alt="Drawing with Canvas" src="http://www.script-tutorials.com/demos/145/img5.jpg" /&gt;&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://www.javacodegeeks.com/2011/02/android-google-maps-tutorial.html" rel="nofollow" target="_blank"&gt;6. Android Google Maps Tutorial&lt;/a&gt;&lt;/h3&gt;
In this tutorial we will see how to incorporate Google Maps into an Android app.&lt;br /&gt;
&lt;img alt="Android Google Maps Tutorial" height="207" src="http://www.script-tutorials.com/demos/145/img6.jpg" width="640" /&gt;&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://marakana.com/forums/android/examples/311.html" rel="nofollow" target="_blank"&gt;7. Android location service example&lt;/a&gt;&lt;/h3&gt;
This tutorial will help you to start using location services (in 
particular: LocationManager class to get user location and Geocoder to 
translate location into addresses) and Google Maps on Android.&lt;br /&gt;
&lt;img alt="Android location service example" height="186" src="http://www.script-tutorials.com/demos/145/img7.jpg" width="640" /&gt;&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://www.higherpass.com/Android/Tutorials/Working-With-Android-Contacts/" rel="nofollow" target="_blank"&gt;8. Working With Android Contacts&lt;/a&gt;&lt;/h3&gt;
Learn to work with the Android contacts database. Basic knowledge of 
accessing SQLite in Android along with using Cursors is expected.&lt;br /&gt;
&lt;img alt="Working With Android Contacts" height="315" src="http://www.script-tutorials.com/demos/145/img8.jpg" width="640" /&gt;&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://www.tutorials-android.com/learn/How_to_calculate_the_distance_between_two_GPS_coordinates.rhtml" rel="nofollow" target="_blank"&gt;9. How to calculate the distance between two GPS coordinates?&lt;/a&gt;&lt;/h3&gt;
A simple function that takes two GPS coordinates as input and outputs the distance between them in meter. &lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://www.codeproject.com/KB/android/AndroidLiveWallpaper.aspx" rel="nofollow" target="_blank"&gt;10. How To Create Android Live Wallpaper&lt;/a&gt;&lt;/h3&gt;
In this article tells how to create live wallpaper from scratch. 
Step-by-step, we will create live wallpaper that would output TV test 
pattern on out home screen.&lt;br /&gt;
&lt;img alt="How To Create Android Live Wallpaper" height="429" src="http://www.script-tutorials.com/demos/145/img10.png" width="640" /&gt;&lt;br /&gt;
&lt;br /&gt;
Sources:- &lt;a href="http://www.script-tutorials.com/10-attractive-android-tutorials-for-developers/"&gt;http://www.script-tutorials.com/10-attractive-android-tutorials-for-developers/&lt;/a&gt; &lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>How to make  Bi directional view flipper in android</title><link>http://google-androidlovers.blogspot.com/2012/09/how-to-make-bi-directional-view-flipper.html</link><category>Begineer</category><category>Bi direction View Flipper</category><category>ViewFlipper</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Wed, 5 Sep 2012 22:39:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-8199251843280195695</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Simple &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/widget/ViewAnimator.html"&gt;ViewAnimator&lt;/a&gt;&lt;/code&gt; that will animate between two or more views
 that have been added to it.  Only one child is shown at a time.  If
 requested, can automatically flip between each child at a regular interval. &lt;a href="http://developer.android.com/reference/android/widget/ViewFlipper.html"&gt;more&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "ca-pub-9376094276645501";
/* Ads */
google_ad_slot = "0148243539";
google_ad_width = 336;
google_ad_height = 280;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Now first you have make &lt;b&gt;view_test.xml&lt;/b&gt;&lt;br /&gt;
&lt;pre style="border: 0px solid black;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre style="border: 0px solid black;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:&lt;span class="IL_AD" id="IL_AD12"&gt;orientation&lt;/span&gt;="&lt;span class="IL_AD" id="IL_AD11"&gt;vertical&lt;/span&gt;" &amp;gt;

 &amp;lt;TextView
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:text="@string/hello" /&amp;gt;
  &amp;lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="&lt;span class="IL_AD" id="IL_AD1"&gt;horizontal&lt;/span&gt;"&amp;gt;
      &amp;lt;Button
       android:id="@+id/previous"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:layout_weight="1"
       android:text="previous"/&amp;gt;
      &amp;lt;Button
       android:id="@+id/next"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:layout_weight="1"
       android:text="next"/&amp;gt;
  &amp;lt;/LinearLayout&amp;gt;


 &amp;lt;ViewFlipper
     android:id="@+id/flipper"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"&amp;gt;
  
     &amp;lt;LinearLayout
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:orientation="vertical"&amp;gt;
         &amp;lt;ImageView
             android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:src="@drawable/ic_launcher"/&amp;gt;
     &amp;lt;/LinearLayout&amp;gt;
  
     &amp;lt;LinearLayout
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:orientation="vertical"
         android:gravity="&lt;span class="IL_AD" id="IL_AD2"&gt;center&lt;/span&gt;"
         android:background="#C0C0C0"&amp;gt;
         &amp;lt;ImageView
             android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:src="@drawable/ic_launcher"/&amp;gt;
         &amp;lt;ImageView
             android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:src="@drawable/ic_launcher"/&amp;gt;
     &amp;lt;/LinearLayout&amp;gt;
  
     &amp;lt;LinearLayout
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:orientation="horizontal"
         android:gravity="center"
         android:background="#A0A0A0"&amp;gt;
         &amp;lt;ImageView
             android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:src="@drawable/ic_launcher"/&amp;gt;
         &amp;lt;ImageView
             android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:src="@drawable/ic_launcher"/&amp;gt;
     &amp;lt;/LinearLayout&amp;gt;
  
 &amp;lt;/ViewFlipper&amp;gt;
&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
then you also make this two animation xml file too. like this&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;/res/anim/flipin_reverse.xml &lt;/b&gt;&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre style="border: 0px solid black;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;set xmlns:android="http://schemas.android.com/apk/res/android"
 android:interpolator="@android:anim/overshoot_interpolator"&amp;gt;
 &amp;lt;translate
     android:fromXDelta="-100%p"
     android:toXDelta="0"
     android:duration="500"/&amp;gt;
&amp;lt;/set&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="border: 0px solid black;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;pre style="border: 0px solid black;"&gt;&lt;b&gt;/res/anim/flipout_reverse.xml&lt;/b&gt;&lt;/pre&gt;
&lt;pre style="border: 0px solid black;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;code&gt;&lt;span style="color: black;"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style="color: black;"&gt;&amp;lt;set xmlns:android="http://schemas.android.com/apk/res/android"&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style="color: black;"&gt; android:interpolator="@android:anim/overshoot_interpolator"&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style="color: black;"&gt; &amp;lt;translate&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style="color: black;"&gt;     android:fromXDelta="0"&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style="color: black;"&gt;     android:toXDelta="100%p"&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style="color: black;"&gt;     android:duration="500"/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style="color: black;"&gt;&amp;lt;/set&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/blockquote&gt;
&lt;pre style="border: 0px solid black;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&amp;nbsp;Then Main java file&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style="border: 0px solid black;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre style="border: 0px solid black;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;public class BiDirectionTest extends Activity {
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.view_test);
  
     final ViewFlipper page = (ViewFlipper)findViewById(R.id.flipper);
     Button btnNext = (Button)findViewById(R.id.next);
     Button btnPrevious = (Button)findViewById(R.id.previous);
  
     final Animation animFlipInForeward = AnimationUtils.loadAnimation(this, R.anim.flipin);
     final Animation animFlipOutForeward = AnimationUtils.loadAnimation(this, R.anim.flipout);
     final Animation animFlipInBackward = AnimationUtils.loadAnimation(this, R.anim.flipin_reverse);
     final Animation animFlipOutBackward = AnimationUtils.loadAnimation(this, R.anim.flipout_reverse);
  
     btnNext.setOnClickListener(&lt;span class="IL_AD" id="IL_AD3"&gt;new Button&lt;/span&gt;.OnClickListener(){

   @Override
   public void onClick(View arg0) {
    page.setInAnimation(animFlipInForeward);
    page.setOutAnimation(animFlipOutForeward);
    page.showNext();
    
   }});
  
     btnPrevious.setOnClickListener(new Button.OnClickListener(){

   @Override
   public void onClick(View arg0) {
    page.setInAnimation(animFlipInBackward);
    page.setOutAnimation(animFlipOutBackward);
    page.showPrevious();
    
   }});
 }
}&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;pre style="border: 0px solid black;"&gt;&lt;b&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&amp;nbsp;Sources from&lt;a href="http://www.developer.android.com/"&gt; www.developer.android.com&lt;/a&gt;&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;/pre&gt;
&amp;nbsp;another sources:- &lt;a href="http://android-er.blogspot.com/2012/02/bi-direction-viewflipper.html"&gt;http://android-er.blogspot.com/2012/02/bi-direction-viewflipper.html&lt;/a&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Android tab and tab host tutorials</title><link>http://google-androidlovers.blogspot.com/2012/09/android-tab-and-tab-host-tutorials.html</link><category>Begineer</category><category>Layouts</category><category>Tab Layout</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Mon, 3 Sep 2012 01:40:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-3931613601736701537</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: small;"&gt;The &lt;a href="http://developer.android.com/reference/android/widget/TabWidget.html"&gt;TabWidget &lt;/a&gt;itself does not do much except contain a list of tab&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: small;"&gt;labels that exist within the parent &lt;a href="http://developer.android.com/reference/android/widget/TabHost.html"&gt;TabHost&lt;/a&gt;.
&amp;nbsp;Basically it is nothing but a set of labels that the user clicks&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: small;"&gt;&amp;nbsp;in order to select a specific tab. The actual content of each tab&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: small;"&gt;&amp;nbsp;is to be held by the 2&lt;sup&gt;nd&lt;/sup&gt; object in the &lt;a href="http://developer.android.com/reference/android/widget/TabHost.html"&gt;TabHost&lt;/a&gt; i.e. a &lt;a href="http://developer.android.com/reference/android/widget/FrameLayout.html"&gt;FrameLayout&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: small;"&gt;Hence both the &lt;a href="http://developer.android.com/reference/android/widget/TabWidget.html"&gt;TabWidget&lt;/a&gt; and &lt;a href="http://developer.android.com/reference/android/widget/FrameLayout.html"&gt;FrameLayout&lt;/a&gt; need to be present on each tab.&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: small;"&gt;&amp;nbsp;And in order to align htme one after another,we embed them into a &lt;a href="http://developer.android.com/reference/android/widget/LinearLayout.html"&gt;LinearLayout&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: small;"&gt; First you have to create separate activities for each tab. Here I have 3 tabs.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;The 3 activities are &lt;/span&gt;&lt;span style="font-size: large;"&gt;&lt;i&gt;AndroidActivity&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;, &lt;span style="font-size: large;"&gt;WindowActivity&lt;/span&gt;&lt;/i&gt;, and&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-size: large;"&gt;&lt;i&gt;IphoneActivity&lt;/i&gt;&lt;/span&gt;.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Each one displays a simple message using TextView.&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&amp;nbsp;&lt;/pre&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;public class AndroidActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.android_layout);
    }
}


public class WindowActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.window_layout);
    }
}



public class IphoneActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.iphone_layout);
    }
}
&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;you may defined here there tab:-&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&amp;nbsp;&lt;/pre&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;b&gt;&lt;i&gt;androidtab.xml&lt;/i&gt; &lt;/b&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;table class="crayon-table"&gt;&lt;tbody&gt;
&lt;tr class="crayon-row alt-table-row"&gt;&lt;td class="crayon-code"&gt;&lt;div class="crayon-pre"&gt;
&lt;blockquote&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-1"&gt;
&lt;span class="ta"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="e"&gt;xml &lt;/span&gt;&lt;span class="i"&gt;version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"1.0"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="ta"&gt;?&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-2"&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="e"&gt;selector &lt;/span&gt;&lt;span class="i"&gt;xmlns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"http://schemas.android.com/apk/res/android"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-3"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="o"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-4"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="e"&gt;item &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;drawable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"@drawable/android_selected"&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-5"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;state_selected&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-6"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="o"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-7"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="e"&gt;item &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;drawable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"@drawable/android"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-8"&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="i"&gt;selector&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-8"&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-8"&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;i&gt;&lt;b&gt;windowtab.xml&lt;/b&gt;&lt;/i&gt; &lt;/pre&gt;
&lt;table class="crayon-table"&gt;
&lt;tbody&gt;
&lt;tr class="crayon-row alt-table-row"&gt;&lt;td class="crayon-code"&gt;&lt;div class="crayon-pre"&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-1"&gt;
&lt;span class="ta"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="e"&gt;xml &lt;/span&gt;&lt;span class="i"&gt;version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"1.0"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="ta"&gt;?&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-2"&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="e"&gt;selector &lt;/span&gt;&lt;span class="i"&gt;xmlns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"http://schemas.android.com/apk/res/android"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-3"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="o"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-4"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="e"&gt;item &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;drawable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"@drawable/window_selected"&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-5"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;state_selected&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-6"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="o"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-7"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="e"&gt;item &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;drawable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"@drawable/window"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-8"&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="i"&gt;selector&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-8"&gt;
&lt;span class="o"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-8"&gt;
&lt;blockquote&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;i&gt;&lt;b&gt;iphonetab.xml&lt;/b&gt;&lt;/i&gt; &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;table class="crayon-table"&gt;
&lt;tbody&gt;
&lt;tr class="crayon-row alt-table-row"&gt;&lt;td class="crayon-code"&gt;&lt;blockquote&gt;
&lt;div class="crayon-pre"&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-1"&gt;
&lt;span class="ta"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="e"&gt;xml &lt;/span&gt;&lt;span class="i"&gt;version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"1.0"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="ta"&gt;?&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-2"&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="e"&gt;selector &lt;/span&gt;&lt;span class="i"&gt;xmlns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"http://schemas.android.com/apk/res/android"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-3"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-4"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="e"&gt;item &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;drawable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"@drawable/iphone_selected"&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-5"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;state_selected&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-6"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55a8ee-7"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="e"&gt;item &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;drawable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"@drawable/iphone"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55a8ee-8"&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="i"&gt;selector&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr class="crayon-row alt-table-row"&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;td class="crayon-code"&gt;&lt;blockquote&gt;
&lt;div class="crayon-pre"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table class="crayon-table"&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;table class="crayon-table"&gt;&lt;/table&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;table class="crayon-table"&gt;
&lt;/table&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;Here is the main layout file, named &lt;b&gt;main.xml &lt;/b&gt;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&lt;/pre&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"&amp;gt;
    &amp;lt;LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"&amp;gt;
        &amp;lt;TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" /&amp;gt;
        &amp;lt;FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"/&amp;gt;
    &amp;lt;/LinearLayout&amp;gt;
&amp;lt;/TabHost&amp;gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;Now main Java File, looks like this types, you can edit what types&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&amp;nbsp;you want to add your apps&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&amp;nbsp;&lt;/pre&gt;
&lt;div class="crayon-pre"&gt;
&lt;br /&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-8"&gt;
&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-9"&gt;
&lt;span class="m"&gt;public&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="t"&gt;class&lt;/span&gt;&lt;span class="h"&gt; TabLayoutExample &lt;/span&gt;&lt;span class="r"&gt;extends&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="e"&gt;TabActivity&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="sy"&gt;{&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-10"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="c"&gt;/** Called when the activity is first created. */&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-11"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="sy"&gt;@&lt;/span&gt;&lt;span class="e"&gt;Override&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-12"&gt;
&lt;span class="e"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="m"&gt;public&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="t"&gt;void&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="e"&gt;onCreate&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="e"&gt;Bundle &lt;/span&gt;&lt;span class="i"&gt;savedInstanceState&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="sy"&gt;{&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-13"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="r"&gt;super&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;onCreate&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="i"&gt;savedInstanceState&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-14"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="e"&gt;setContentView&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="i"&gt;R&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="v"&gt;layout&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="v"&gt;main&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-15"&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-16"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="e"&gt;Resources &lt;/span&gt;&lt;span class="i"&gt;res&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="e"&gt;getResources&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;&lt;span class="h"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="c"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-17"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="e"&gt;TabHost &lt;/span&gt;&lt;span class="i"&gt;tabHost&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="e"&gt;getTabHost&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;&lt;span class="h"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="c"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-18"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;TabHost&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;TabSpec &lt;/span&gt;&lt;span class="i"&gt;spec&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="c"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-19"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="e"&gt;Intent &lt;/span&gt;&lt;span class="i"&gt;intent&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="c"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-20"&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-21"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="c"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-22"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;intent&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="r"&gt;new&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="e"&gt;Intent&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;setClass&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="r"&gt;this&lt;/span&gt;&lt;span class="sy"&gt;,&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;MusicActivity&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="t"&gt;class&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-23"&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-24"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="c"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-25"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;spec&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;tabHost&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;newTabSpec&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Android"&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;setIndicator&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Android"&lt;/span&gt;&lt;span class="sy"&gt;,&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-26"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;res&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;getDrawable&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="i"&gt;R&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="v"&gt;drawable&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="v"&gt;androidtab&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-27"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;setContent&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="i"&gt;intent&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-28"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;tabHost&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;addTab&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="i"&gt;spec&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-29"&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-30"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-30"&gt;
&lt;span class="h"&gt;&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-31"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;intent&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="r"&gt;new&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="e"&gt;Intent&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;setClass&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="r"&gt;this&lt;/span&gt;&lt;span class="sy"&gt;,&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;VideoActivity&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="t"&gt;class&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-32"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;spec&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;tabHost&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;newTabSpec&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Window"&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;setIndicator&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Window"&lt;/span&gt;&lt;span class="sy"&gt;,&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-33"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;res&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;getDrawable&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="i"&gt;R&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="v"&gt;drawable&lt;/span&gt;&lt;span class="sy"&gt;.window&lt;/span&gt;&lt;span class="v"&gt;tab&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-34"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;setContent&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="i"&gt;intent&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-35"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;tabHost&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;addTab&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="i"&gt;spec&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-36"&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-37"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;intent&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="r"&gt;new&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="e"&gt;Intent&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;setClass&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="r"&gt;this&lt;/span&gt;&lt;span class="sy"&gt;,&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;FavoriteActivity&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="t"&gt;class&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-38"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;spec&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;tabHost&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;newTabSpec&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Iphone"&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;setIndicator&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Iphone"&lt;/span&gt;&lt;span class="sy"&gt;,&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-39"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;res&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;getDrawable&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="i"&gt;R&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="v"&gt;drawable&lt;/span&gt;&lt;span class="sy"&gt;.iphone&lt;/span&gt;&lt;span class="v"&gt;tab&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-40"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;setContent&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="i"&gt;intent&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-41"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;tabHost&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;addTab&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="i"&gt;spec&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-42"&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-43"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="i"&gt;tabHost&lt;/span&gt;&lt;span class="sy"&gt;.&lt;/span&gt;&lt;span class="e"&gt;setCurrentTab&lt;/span&gt;&lt;span class="sy"&gt;(&lt;/span&gt;&lt;span class="cn"&gt;2&lt;/span&gt;&lt;span class="sy"&gt;)&lt;/span&gt;&lt;span class="sy"&gt;;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aa5c-44"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="sy"&gt;}&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-45"&gt;
&lt;span class="sy"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-45"&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-45"&gt;
&lt;span class="sy"&gt;At last but not the least, dont forget to add to mainfeast all tab , like this.&lt;/span&gt;&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-45"&gt;
&lt;/div&gt;
&lt;div class="crayon-line" id="crayon-504467a55aa5c-45"&gt;
&lt;span class="o"&gt;&lt;/span&gt;&lt;span class="o"&gt;&lt;/span&gt;

&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div class="crayon-line" id="crayon-504467a55aaba-25"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="e"&gt;activity&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"@string/app_name"&amp;nbsp;&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;".AndroidActivity"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="i"&gt;activity&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aaba-26"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="e"&gt;activity&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"@string/app_name"&amp;nbsp;&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;".WindowActivity"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="i"&gt;activity&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sy"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aaba-26"&gt;
&lt;span class="o"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span class="e"&gt;activity&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"@string/app_name"&amp;nbsp;&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="i"&gt;android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="i"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;".IphoneActivity"&lt;/span&gt;&lt;span class="h"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aaba-26"&gt;
&lt;span class="h"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="i"&gt;activity&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aaba-26"&gt;
&lt;/div&gt;
&lt;div class="crayon-line crayon-striped-line" id="crayon-504467a55aaba-26"&gt;
&lt;span class="o"&gt;Hop you guys helpful this short article. source form www.developer.android.com &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;Video Tutorials Here:&amp;nbsp;&lt;/pre&gt;
&lt;pre class="brush: xml; title: ; notranslate" title=""&gt;
&lt;/pre&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="0" height="360" src="http://www.youtube.com/embed/cZ3yRY8jkHQ?feature=player_detailpage" width="640"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/cZ3yRY8jkHQ/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>iOS / Android cross platform development  or Android-iPhone single codebase cross development</title><link>http://google-androidlovers.blogspot.com/2012/09/ios-android-cross-platform-development.html</link><category>Begineer</category><category>cross development</category><category>iOS / Android cross platform</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Mon, 3 Sep 2012 00:43:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-2410836853774051068</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;b&gt;Quation is:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I've been playing around with developing Android apps in Java for a 
while and am starting to get a handle on it.  However if I want to on 
start on an iOS version I need to code everything from scratch - which 
is, well, undesirable.&lt;br /&gt;
I was wondering on what cross platform solutions there are available 
and how well they work in practice.  I've been thinking about web 
applications - perhaps using &lt;a href="http://jquerymobile.com/" rel="nofollow"&gt;jQuery Mobile&lt;/a&gt; or &lt;a href="http://www.appcelerator.com/products/titanium-mobile-application-development/" rel="nofollow"&gt;Titanium&lt;/a&gt;, or Adobe Flash/Flex/Air.  I also don't yet have a Mac, which I'll probably have to invest in.&lt;br /&gt;
So my Questions : &lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;What cross-platform development environments exist for iOS / Android (and/or other devices)?&lt;/li&gt;
&lt;li&gt;What has your experience been with these tools? (this is what I'm really keen to know)&lt;/li&gt;
&lt;/ol&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;Or &lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Is there a way, apart from using HTML and JavaScript on a web control, to have an (almost) single codebase for an application that should run on iOS and Android?
The big issue is of course that they use a different language (Java for Android, Objective-C for iOS) for application development. It would be nice to have some sort of meta-language that will be translated in Java and in Objective-C.
What about Flash? Adobe wasn't supposed to release a tool to create flash-based apps in iOS? Based on current answers, the best cross platform development tool for iOS and Android seems to be Titanium appcelerator. I suspect that this topic will evolve overtime, so feel free to contribute with new information and comments.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;Solutions is:-&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="post-text"&gt;
Disclaimer: I work for a company, Particle 
Code, that makes a cross-platform framework. There are a ton of 
companies in this space. New ones seem to spring up every week. Good 
news for you: you have a lot of choices.&lt;br /&gt;
These frameworks take different approaches, and many of them are 
fundamentally designed to solve different problems. Some are focused on 
games, some are focused on apps. I would ask the following questions:&lt;br /&gt;
What do you want to write? Enterprise application, personal productivity application, puzzle game, first-person shooter?&lt;br /&gt;
What kind of development environment do you prefer? IDE or plain ol' text editor?&lt;br /&gt;
Do you have strong feelings about programming languages? Of the 
frameworks I'm familiar with, you can choose from ActionScript, C++, C#,
 Java, Lua, and Ruby.&lt;br /&gt;
My company is more in the game space, so I haven't played as much 
with the JavaScript+CSS frameworks like Titanium, PhoneGap, and Sencha. 
But I can tell you a bit about some of the games-oriented frameworks. 
Games and rich internet applications are an area where cross-platform 
frameworks can shine, because these applications tend to place more 
importance of being visually unique and less on blending in with native 
UIs. Here are a few frameworks to look for:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Unity &lt;a href="http://unity3d.com/"&gt;www.unity3d.com&lt;/a&gt; is a 3D 
games engine. It's really unlike any other development environment I've 
worked in. You build scenes with 3D models, and define behavior by 
attaching scripts to objects. You can script in JavaScript, C#, or Boo. 
If you want to write a 3D physics-based game that will run on iOS, 
Android, Windows, OS X, or consoles, this is probably the tool for you. 
You can also write 2D games using 3D assets--a fine example of this is 
indie game &lt;a href="http://maxandthemagicmarker.com/"&gt;Max and the Magic Marker&lt;/a&gt;,
 a 2D physics-based side-scroller written in Unity. If you don't know 
it, I recommend checking it out (especially if there are any kids in 
your household). Max is available for PC, Wii, iOS and Windows Phone 7 
(although the latter version is a port, since Unity doesn't support 
WinPhone). Unity comes with some sample games complete with 3D assets 
and textures, which really helps getting up to speed with what can be a 
pretty complicated environment.&lt;/li&gt;
&lt;li&gt;Corona &lt;a href="http://www.anscamobile.com/corona/"&gt;www.anscamobile.com/corona&lt;/a&gt;
 is a 2D games engine that uses the Lua scripting language and supports 
iOS and Android. The selling point of Corona is the ability to write 
physics-based games very quickly in few lines of code, and the large 
number of Corona-based games in the iOS app store is a testament to its 
success. The environment is very lean, which will appeal to some people.
 It comes with a simulator and debugger. You add your text editor of 
choice, and you have a development environment. The base SDK doesn't 
include any UI components, like buttons or list boxes, but a CoronaUI 
add-on is available to subscribers.&lt;/li&gt;
&lt;li&gt;The Particle SDK &lt;a href="http://www.particlecode.com/"&gt;www.particlecode.com&lt;/a&gt;
 is a slightly more general cross-platform solution with a background in
 games. You can write in either Java or ActionScript, using a MVC 
application model. It includes an Eclipse-based IDE with a WYSIWYG UI 
editor. We currently support building for Android, iOS, webOS, and 
Windows Phone 7 devices. You can also output Flash or HTML5 for the web.
 The framework was originally developed for online multiplayer social 
games, such as poker and backgammon, and it suits 2D games and apps with
 complex logic. The framework supports 2D graphics and includes a 2D 
physics engine.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;NB:&lt;/b&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;sub&gt; Today we announced that Particle Code has been acquired by Appcelerator, makers of the Titanium cross-platform framework.  &lt;/sub&gt;&lt;br /&gt;
&lt;sub&gt;...&lt;/sub&gt;&lt;br /&gt;
&lt;sub&gt;As of January 1, 2012, [&lt;i&gt;Particle Code&lt;/i&gt;] will no longer officially support the [&lt;i&gt;Particle SDK&lt;/i&gt;] platform. &lt;/sub&gt;&lt;/blockquote&gt;
&lt;a href="http://www.particlecode.com/developers/welcome/"&gt;&lt;sup&gt;Source&lt;/sup&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The Airplay SDK &lt;a href="http://www.madewithmarmalade.com/"&gt;www.madewithmarmalade.com&lt;/a&gt;
 is a C++ framework that lets you develop in either Visual Studio or 
Xcode. It supports both 2D and 3D graphics. Airplay targets iOS, 
Android, Bada, Symbian, webOS, and Windows Mobile 6. They also have an 
add-on to build AirPlay apps for PSP. My C++ being very rusty, I haven't
 played with it much, but it looks cool.&lt;/li&gt;
&lt;/ul&gt;
In terms of learning curve, I'd say that Unity had the steepest 
learning curve (for me), Corona was the simplest, and Particle and 
Airplay are somewhere in between.&lt;br /&gt;
Another interesting point is how the frameworks handle different form
 factors. Corona supports dynamic scaling, which will be familiar to 
Flash developers. This is very easy to use but means that you end up 
wasting screen space when going from a 4:3 screen like the iPhone to a 
16:9 like the new qHD Android devices. The Particle SDK's UI editor lets
 you design flexible layouts that scale, but also lets you adjust the 
layouts for individual screen sizes. This takes a little more time but 
lets you make the app look custom made for each screen.&lt;br /&gt;
Of course, what works for you depends on your individual taste and 
work style as well as your goals -- so I recommend downloading a couple 
of these tools and giving them a shot. All of these tools are free to 
try. &lt;br /&gt;
Also, if I could just put in a public service announcement -- most of
 these tools are in really active development. If you find a framework 
you like, by all means send feedback and let them know what you like, 
what you don't like, and features you'd like to see. You have a real 
opportunity to influence what goes into the next versions of these 
tools.&lt;br /&gt;
Hope this helps.&lt;br /&gt;
Solution from the &lt;a href="http://stackoverflow.com/questions/6171128/ios-android-cross-platform-development"&gt;stackoverflow&lt;/a&gt; which is accepted answers.&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&lt;div class="post-text"&gt;
You could use &lt;a href="http://www.appcelerator.com/products/" rel="nofollow"&gt;Titanium appcelerator&lt;/a&gt;.
 Titanium allows you to write apps in an abstract way with JavaScript 
and then compile it to a mix of JavaScript and native code. This gives 
you a native look on iPhone and Android with only a single JavaScript 
code base. &lt;br /&gt;
Titanium states that their approach complies with Apple's terms of 
service, and there are some Titanium apps in the Android market and 
itunes store.&lt;br /&gt;
it is also accepted answers from &lt;a href="http://stackoverflow.com/questions/3045477/android-iphone-single-codebase-cross-development"&gt;stackoverflow &lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><enclosure length="-1" type="application/json" url="http://www.particlecode.com/"/><itunes:explicit>no</itunes:explicit><itunes:subtitle>Quation is: I've been playing around with developing Android apps in Java for a while and am starting to get a handle on it. However if I want to on start on an iOS version I need to code everything from scratch - which is, well, undesirable. I was wondering on what cross platform solutions there are available and how well they work in practice. I've been thinking about web applications - perhaps using jQuery Mobile or Titanium, or Adobe Flash/Flex/Air. I also don't yet have a Mac, which I'll probably have to invest in. So my Questions : What cross-platform development environments exist for iOS / Android (and/or other devices)? What has your experience been with these tools? (this is what I'm really keen to know) &amp;nbsp;Or Is there a way, apart from using HTML and JavaScript on a web control, to have an (almost) single codebase for an application that should run on iOS and Android? The big issue is of course that they use a different language (Java for Android, Objective-C for iOS) for application development. It would be nice to have some sort of meta-language that will be translated in Java and in Objective-C. What about Flash? Adobe wasn't supposed to release a tool to create flash-based apps in iOS? Based on current answers, the best cross platform development tool for iOS and Android seems to be Titanium appcelerator. I suspect that this topic will evolve overtime, so feel free to contribute with new information and comments. &amp;nbsp;Solutions is:- Disclaimer: I work for a company, Particle Code, that makes a cross-platform framework. There are a ton of companies in this space. New ones seem to spring up every week. Good news for you: you have a lot of choices. These frameworks take different approaches, and many of them are fundamentally designed to solve different problems. Some are focused on games, some are focused on apps. I would ask the following questions: What do you want to write? Enterprise application, personal productivity application, puzzle game, first-person shooter? What kind of development environment do you prefer? IDE or plain ol' text editor? Do you have strong feelings about programming languages? Of the frameworks I'm familiar with, you can choose from ActionScript, C++, C#, Java, Lua, and Ruby. My company is more in the game space, so I haven't played as much with the JavaScript+CSS frameworks like Titanium, PhoneGap, and Sencha. But I can tell you a bit about some of the games-oriented frameworks. Games and rich internet applications are an area where cross-platform frameworks can shine, because these applications tend to place more importance of being visually unique and less on blending in with native UIs. Here are a few frameworks to look for: Unity www.unity3d.com is a 3D games engine. It's really unlike any other development environment I've worked in. You build scenes with 3D models, and define behavior by attaching scripts to objects. You can script in JavaScript, C#, or Boo. If you want to write a 3D physics-based game that will run on iOS, Android, Windows, OS X, or consoles, this is probably the tool for you. You can also write 2D games using 3D assets--a fine example of this is indie game Max and the Magic Marker, a 2D physics-based side-scroller written in Unity. If you don't know it, I recommend checking it out (especially if there are any kids in your household). Max is available for PC, Wii, iOS and Windows Phone 7 (although the latter version is a port, since Unity doesn't support WinPhone). Unity comes with some sample games complete with 3D assets and textures, which really helps getting up to speed with what can be a pretty complicated environment. Corona www.anscamobile.com/corona is a 2D games engine that uses the Lua scripting language and supports iOS and Android. The selling point of Corona is the ability to write physics-based games very quickly in few lines of code, and the large number of Corona-based games in the iOS app store is a testament to its success. The environment is very lean, which will appeal to some people. It comes with a simulator and debugger. You add your text editor of choice, and you have a development environment. The base SDK doesn't include any UI components, like buttons or list boxes, but a CoronaUI add-on is available to subscribers. The Particle SDK www.particlecode.com is a slightly more general cross-platform solution with a background in games. You can write in either Java or ActionScript, using a MVC application model. It includes an Eclipse-based IDE with a WYSIWYG UI editor. We currently support building for Android, iOS, webOS, and Windows Phone 7 devices. You can also output Flash or HTML5 for the web. The framework was originally developed for online multiplayer social games, such as poker and backgammon, and it suits 2D games and apps with complex logic. The framework supports 2D graphics and includes a 2D physics engine. NB: Today we announced that Particle Code has been acquired by Appcelerator, makers of the Titanium cross-platform framework. ... As of January 1, 2012, [Particle Code] will no longer officially support the [Particle SDK] platform. Source The Airplay SDK www.madewithmarmalade.com is a C++ framework that lets you develop in either Visual Studio or Xcode. It supports both 2D and 3D graphics. Airplay targets iOS, Android, Bada, Symbian, webOS, and Windows Mobile 6. They also have an add-on to build AirPlay apps for PSP. My C++ being very rusty, I haven't played with it much, but it looks cool. In terms of learning curve, I'd say that Unity had the steepest learning curve (for me), Corona was the simplest, and Particle and Airplay are somewhere in between. Another interesting point is how the frameworks handle different form factors. Corona supports dynamic scaling, which will be familiar to Flash developers. This is very easy to use but means that you end up wasting screen space when going from a 4:3 screen like the iPhone to a 16:9 like the new qHD Android devices. The Particle SDK's UI editor lets you design flexible layouts that scale, but also lets you adjust the layouts for individual screen sizes. This takes a little more time but lets you make the app look custom made for each screen. Of course, what works for you depends on your individual taste and work style as well as your goals -- so I recommend downloading a couple of these tools and giving them a shot. All of these tools are free to try. Also, if I could just put in a public service announcement -- most of these tools are in really active development. If you find a framework you like, by all means send feedback and let them know what you like, what you don't like, and features you'd like to see. You have a real opportunity to influence what goes into the next versions of these tools. Hope this helps. Solution from the stackoverflow which is accepted answers. and You could use Titanium appcelerator. Titanium allows you to write apps in an abstract way with JavaScript and then compile it to a mix of JavaScript and native code. This gives you a native look on iPhone and Android with only a single JavaScript code base. Titanium states that their approach complies with Apple's terms of service, and there are some Titanium apps in the Android market and itunes store. it is also accepted answers from stackoverflow http://feeds.feedburner.com/GoogleAndroidLovers</itunes:subtitle><itunes:author>noreply@blogger.com (Chaunri)</itunes:author><itunes:summary>Quation is: I've been playing around with developing Android apps in Java for a while and am starting to get a handle on it. However if I want to on start on an iOS version I need to code everything from scratch - which is, well, undesirable. I was wondering on what cross platform solutions there are available and how well they work in practice. I've been thinking about web applications - perhaps using jQuery Mobile or Titanium, or Adobe Flash/Flex/Air. I also don't yet have a Mac, which I'll probably have to invest in. So my Questions : What cross-platform development environments exist for iOS / Android (and/or other devices)? What has your experience been with these tools? (this is what I'm really keen to know) &amp;nbsp;Or Is there a way, apart from using HTML and JavaScript on a web control, to have an (almost) single codebase for an application that should run on iOS and Android? The big issue is of course that they use a different language (Java for Android, Objective-C for iOS) for application development. It would be nice to have some sort of meta-language that will be translated in Java and in Objective-C. What about Flash? Adobe wasn't supposed to release a tool to create flash-based apps in iOS? Based on current answers, the best cross platform development tool for iOS and Android seems to be Titanium appcelerator. I suspect that this topic will evolve overtime, so feel free to contribute with new information and comments. &amp;nbsp;Solutions is:- Disclaimer: I work for a company, Particle Code, that makes a cross-platform framework. There are a ton of companies in this space. New ones seem to spring up every week. Good news for you: you have a lot of choices. These frameworks take different approaches, and many of them are fundamentally designed to solve different problems. Some are focused on games, some are focused on apps. I would ask the following questions: What do you want to write? Enterprise application, personal productivity application, puzzle game, first-person shooter? What kind of development environment do you prefer? IDE or plain ol' text editor? Do you have strong feelings about programming languages? Of the frameworks I'm familiar with, you can choose from ActionScript, C++, C#, Java, Lua, and Ruby. My company is more in the game space, so I haven't played as much with the JavaScript+CSS frameworks like Titanium, PhoneGap, and Sencha. But I can tell you a bit about some of the games-oriented frameworks. Games and rich internet applications are an area where cross-platform frameworks can shine, because these applications tend to place more importance of being visually unique and less on blending in with native UIs. Here are a few frameworks to look for: Unity www.unity3d.com is a 3D games engine. It's really unlike any other development environment I've worked in. You build scenes with 3D models, and define behavior by attaching scripts to objects. You can script in JavaScript, C#, or Boo. If you want to write a 3D physics-based game that will run on iOS, Android, Windows, OS X, or consoles, this is probably the tool for you. You can also write 2D games using 3D assets--a fine example of this is indie game Max and the Magic Marker, a 2D physics-based side-scroller written in Unity. If you don't know it, I recommend checking it out (especially if there are any kids in your household). Max is available for PC, Wii, iOS and Windows Phone 7 (although the latter version is a port, since Unity doesn't support WinPhone). Unity comes with some sample games complete with 3D assets and textures, which really helps getting up to speed with what can be a pretty complicated environment. Corona www.anscamobile.com/corona is a 2D games engine that uses the Lua scripting language and supports iOS and Android. The selling point of Corona is the ability to write physics-based games very quickly in few lines of code, and the large number of Corona-based games in the iOS app store is a testament to its success. The environment is very lean, which will appeal to some people. It comes with a simulator and debugger. You add your text editor of choice, and you have a development environment. The base SDK doesn't include any UI components, like buttons or list boxes, but a CoronaUI add-on is available to subscribers. The Particle SDK www.particlecode.com is a slightly more general cross-platform solution with a background in games. You can write in either Java or ActionScript, using a MVC application model. It includes an Eclipse-based IDE with a WYSIWYG UI editor. We currently support building for Android, iOS, webOS, and Windows Phone 7 devices. You can also output Flash or HTML5 for the web. The framework was originally developed for online multiplayer social games, such as poker and backgammon, and it suits 2D games and apps with complex logic. The framework supports 2D graphics and includes a 2D physics engine. NB: Today we announced that Particle Code has been acquired by Appcelerator, makers of the Titanium cross-platform framework. ... As of January 1, 2012, [Particle Code] will no longer officially support the [Particle SDK] platform. Source The Airplay SDK www.madewithmarmalade.com is a C++ framework that lets you develop in either Visual Studio or Xcode. It supports both 2D and 3D graphics. Airplay targets iOS, Android, Bada, Symbian, webOS, and Windows Mobile 6. They also have an add-on to build AirPlay apps for PSP. My C++ being very rusty, I haven't played with it much, but it looks cool. In terms of learning curve, I'd say that Unity had the steepest learning curve (for me), Corona was the simplest, and Particle and Airplay are somewhere in between. Another interesting point is how the frameworks handle different form factors. Corona supports dynamic scaling, which will be familiar to Flash developers. This is very easy to use but means that you end up wasting screen space when going from a 4:3 screen like the iPhone to a 16:9 like the new qHD Android devices. The Particle SDK's UI editor lets you design flexible layouts that scale, but also lets you adjust the layouts for individual screen sizes. This takes a little more time but lets you make the app look custom made for each screen. Of course, what works for you depends on your individual taste and work style as well as your goals -- so I recommend downloading a couple of these tools and giving them a shot. All of these tools are free to try. Also, if I could just put in a public service announcement -- most of these tools are in really active development. If you find a framework you like, by all means send feedback and let them know what you like, what you don't like, and features you'd like to see. You have a real opportunity to influence what goes into the next versions of these tools. Hope this helps. Solution from the stackoverflow which is accepted answers. and You could use Titanium appcelerator. Titanium allows you to write apps in an abstract way with JavaScript and then compile it to a mix of JavaScript and native code. This gives you a native look on iPhone and Android with only a single JavaScript code base. Titanium states that their approach complies with Apple's terms of service, and there are some Titanium apps in the Android market and itunes store. it is also accepted answers from stackoverflow http://feeds.feedburner.com/GoogleAndroidLovers</itunes:summary><itunes:keywords>Begineer, cross development, iOS / Android cross platform, Tutorial</itunes:keywords></item><item><title>How to update listview in android</title><link>http://google-androidlovers.blogspot.com/2012/08/updatelistitemimageinandroid.html</link><category>Begineer</category><category>ListView</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Tue, 28 Aug 2012 02:49:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-665357520428210441</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&amp;nbsp;First you have to remember Don't at any circumstances create a new adapter (or a new data source that holds the Adapter's data).&lt;br /&gt;
There's an exception of course, you obviously have to create a new Adapter in OnCreate() { }.
&lt;br /&gt;
Create a new ArrayList of HashMaps that holds the data&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div class="geshifilter"&gt;
&lt;div class="java geshifilter-java" style="font-family: monospace;"&gt;
&lt;div class="de1" style="text-align: left;"&gt;
hashMapListForListView &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="kw1"&gt;new&lt;/span&gt; ArrayList&lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt;HashMap&lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt;String,String&lt;span class="sy0"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
we can fill it up by calling:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div class="geshifilter"&gt;
&lt;div class="java geshifilter-java" style="font-family: monospace; text-align: left;"&gt;
&lt;div class="de1"&gt;
entitiesHashMap.&lt;span class="me1"&gt;put&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"name"&lt;/span&gt;, &lt;span class="st0"&gt;"Ball"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class="de1"&gt;
entitiesHashMap.&lt;span class="me1"&gt;put&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"category"&lt;/span&gt;, &lt;span class="st0"&gt;"Sport"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class="de1"&gt;
entitiesHashMap.&lt;span class="me1"&gt;put&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"price"&lt;/span&gt;, &lt;span class="st0"&gt;"2.99"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class="de1"&gt;
entitiesHashMap.&lt;span class="me1"&gt;put&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"imageUri"&lt;/span&gt;, ball.&lt;span class="me1"&gt;Uri&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
and then, we add it to the List:&lt;br /&gt;
&lt;div class="geshifilter"&gt;
&lt;div class="java geshifilter-java" style="font-family: monospace;"&gt;
&lt;ol&gt;
&lt;li class="li1"&gt;&lt;div class="de1"&gt;
hashMapListForListView.&lt;span class="me1"&gt;add&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;entitiesHashMap&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
We can do this over n over, as many times as we want. 
&lt;br /&gt;
Create a new Adapter in your OnCreate() {}&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div class="geshifilter"&gt;
&lt;div class="java geshifilter-java" style="font-family: monospace; text-align: left;"&gt;
&lt;div class="de1"&gt;
adapterForList &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="kw1"&gt;new&lt;/span&gt; SimpleAdapter&lt;span class="br0"&gt;(&lt;/span&gt;Main.&lt;span class="kw1"&gt;this&lt;/span&gt;,&lt;/div&gt;
&lt;div class="de1"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashMapListForListView, R.&lt;span class="me1"&gt;layout&lt;/span&gt;.&lt;span class="me1"&gt;detailedview&lt;/span&gt;, &lt;/div&gt;
&lt;div class="de1"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;new&lt;/span&gt; &lt;span class="kw3"&gt;String&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;span class="st0"&gt;"name"&lt;/span&gt;, &lt;span class="st0"&gt;"category"&lt;/span&gt;, &lt;span class="st0"&gt;"price"&lt;/span&gt;, &lt;span class="st0"&gt;"imageUri"&lt;/span&gt;&lt;span class="br0"&gt;}&lt;/span&gt;,&lt;/div&gt;
&lt;div class="de1"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;new&lt;/span&gt; &lt;span class="kw4"&gt;int&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt; R.&lt;span class="me1"&gt;id&lt;/span&gt;.&lt;span class="me1"&gt;EntityName&lt;/span&gt;, R.&lt;span class="me1"&gt;id&lt;/span&gt;.&lt;span class="me1"&gt;Category&lt;/span&gt;, R.&lt;span class="me1"&gt;id&lt;/span&gt;.&lt;span class="me1"&gt;Price&lt;/span&gt;, R.&lt;span class="me1"&gt;id&lt;/span&gt;.&lt;span class="me1"&gt;ThumbImage&lt;/span&gt; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class="de2"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; listView.&lt;span class="me1"&gt;setAdapter&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;adapterForList&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
What we're doing here is that we create a new SimpleAdapter, and tell it
 to use hashMapForListView as data source, and also tell the listView to
 use adapterForList as Adapter.&lt;br /&gt;
R.layout.detailedview is my own Layout file, that includes 3 textviews 
called "R.id.EntityName, R.id.Category, R.id.Price, " and an ImageView 
called "R.id.ThumbImage".&lt;br /&gt;
As you can see, we tell the Adapter to use these UI elements.
&lt;br /&gt;
&amp;nbsp;The refreshing&lt;br /&gt;
Since we have data in the List of HashMaps, we can overwrite the values, simply by calling&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div class="geshifilter"&gt;
&lt;div class="java geshifilter-java" style="font-family: monospace;"&gt;
&lt;div class="de1" style="text-align: left;"&gt;
hashMapListForListView.&lt;span class="me1"&gt;set&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;index, entitiesHashMap&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Don't forget&lt;/b&gt; to create a new instance of  entitiesHashMap, and set it's values just as we did&amp;nbsp; in above to get the result you'd expect. and you have to watch more tutorials goto:&lt;a href="http://www.helloandroid.com/tutorials/how-update-custom-listview-images-simply"&gt;http://www.helloandroid.com/tutorials/how-update-custom-listview-images-simply&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.androidhive.info/2012/02/android-custom-listview-with-image-and-text/"&gt;&amp;nbsp;http://www.androidhive.info/2012/02/android-custom-listview-with-image-and-text/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://blog.sptechnolab.com/2011/02/01/android/android-custom-listview-items-and-adapters/"&gt;http://blog.sptechnolab.com/2011/02/01/android/android-custom-listview-items-and-adapters/&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://ballardhack.wordpress.com/2010/04/05/loading-remote-images-in-a-listview-on-android/"&gt;http://ballardhack.wordpress.com/2010/04/05/loading-remote-images-in-a-listview-on-android/&lt;/a&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>UI/Application Exerciser Monkey</title><link>http://google-androidlovers.blogspot.com/2012/08/uiapplication-exerciser-monkey.html</link><category>monkey</category><category>Tutorial</category><category>UI/Application</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Sat, 25 Aug 2012 23:03:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-2403917508147857242</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;h1 itemprop="name"&gt;
&lt;span style="font-size: small; font-weight: normal;"&gt;The Monkey is a program that runs on your 
&lt;a href="http://developer.android.com/tools/help/emulator.html"&gt;emulator&lt;/a&gt; or device and generates pseudo-random
streams of user events such as clicks, touches, or gestures, as well as a number of system-level 
events.  You can use the Monkey to stress-test applications that you are developing, in a random 
yet repeatable manner.&lt;/span&gt;&lt;/h1&gt;
&lt;div id="jd-content"&gt;
&lt;div class="jd-descr" itemprop="articleBody"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="overview"&gt;&lt;/a&gt;

&lt;h2 style="margin-bottom: 0px;"&gt;
Overview&lt;/h2&gt;
&lt;hr /&gt;
The Monkey is a command-line tool that that you can run on any emulator
instance or on a device.  It sends a pseudo-random stream of 
user events into the system, which acts as a stress test on the application software you are 
developing.&lt;br /&gt;
The Monkey includes a number of options, but they break down into four primary
categories:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Basic configuration options, such as setting the number of events to attempt.&lt;/li&gt;
&lt;li&gt;Operational constraints, such as restricting the test to a single package.&lt;/li&gt;
&lt;li&gt;Event types and frequencies.&lt;/li&gt;
&lt;li&gt;Debugging options.&lt;/li&gt;
&lt;/ul&gt;
When the Monkey runs, it generates events and sends them to the system.  It also &lt;i&gt;watches&lt;/i&gt;
the system under test and looks for three conditions, which it treats specially:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;If you have constrained the Monkey to run in one or more specific packages, it 
  watches for attempts to navigate to any other packages, and blocks them.&lt;/li&gt;
&lt;li&gt;If your application crashes or receives any sort of unhandled exception, the Monkey
  will stop and report the error.&lt;/li&gt;
&lt;li&gt;If your application generates an &lt;i&gt;application not responding&lt;/i&gt; error, the Monkey
  will stop and report the error.&lt;/li&gt;
&lt;/ul&gt;
Depending on the verbosity level you have selected, you will also see reports on the progress
of the Monkey and the events being generated.&lt;br /&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="basics"&gt;&lt;/a&gt;

&lt;h2 style="margin-bottom: 0px;"&gt;
Basic Use of the Monkey&lt;/h2&gt;
&lt;hr /&gt;
You can launch the Monkey using a command line on your development machine or from a script. 
Because the Monkey runs in the emulator/device environment, you must launch it from a shell in 
that environment.  You can do this by prefacing &lt;code&gt;adb shell&lt;/code&gt; to each command, 
or by entering the shell and entering Monkey commands directly.&lt;br /&gt;
The basic syntax is: &lt;br /&gt;
&lt;pre class="prettyprint"&gt;&lt;span class="pln"&gt;$ adb shell monkey &lt;/span&gt;&lt;span class="pun"&gt;[&lt;/span&gt;&lt;span class="pln"&gt;options&lt;/span&gt;&lt;span class="pun"&gt;]&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kwd"&gt;event&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;count&lt;/span&gt;&lt;span class="pun"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
With no options specified, the Monkey will launch in a quiet (non-verbose) mode, and will send 
events to any (and all) packages installed on your target.  Here is a more typical command line,
which will launch your application and send 500 pseudo-random events to it:&lt;br /&gt;
&lt;pre class="prettyprint"&gt;&lt;span class="pln"&gt;$ adb shell monkey &lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;p your&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="kwd"&gt;package&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;name &lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;v &lt;/span&gt;&lt;span class="lit"&gt;500&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="reference"&gt;&lt;/a&gt;

&lt;h2 style="margin-bottom: 0px;"&gt;
Command Options Reference&lt;/h2&gt;
&lt;hr /&gt;
The table below lists all options you can include on the Monkey command line.&lt;br /&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
  &lt;th&gt;Category&lt;/th&gt;
  &lt;th&gt;Option&lt;/th&gt;
  &lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;General&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--help&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Prints a simple usage guide.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-v&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Each -v on the command line will increment the verbosity level.  
Level 0 (the default) provides little information beyond startup notification, test completion, and
final results.  
Level 1 provides more details about the test as it runs, such as individual events being sent to 
your activities.  
Level 2 provides more detailed setup information such as activities selected or not selected for 
testing.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="10"&gt;Events&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-s &amp;lt;seed&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Seed value for pseudo-random number generator.  If you re-run the Monkey with the same seed 
value, it will generate the same sequence of events.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--throttle &amp;lt;milliseconds&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Inserts a fixed delay between events.  You can use this option to slow down the Monkey.  
If not specified, there is no delay and the events are generated as rapidly as possible.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--pct-touch &amp;lt;percent&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adjust percentage of touch events.  
(Touch events are a down-up event in a single place on the screen.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--pct-motion &amp;lt;percent&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adjust percentage of motion events.
(Motion events consist of a down event somewhere on the screen, a series of pseudo-random
movements, and an up event.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--pct-trackball &amp;lt;percent&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adjust percentage of trackball events.
(Trackball events consist of one or more random movements, sometimes followed by a click.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--pct-nav &amp;lt;percent&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adjust percentage of "basic" navigation events.
(Navigation events consist of up/down/left/right, as input from a directional input device.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--pct-majornav &amp;lt;percent&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adjust percentage of "major" navigation events.
(These are navigation events that will typically cause actions within your UI, such as
the center button in a 5-way pad, the back key, or the menu key.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--pct-syskeys &amp;lt;percent&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adjust percentage of "system" key events.
(These are keys that are generally reserved for use by the system, such as Home, Back, Start Call,
End Call, or Volume controls.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--pct-appswitch &amp;lt;percent&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adjust percentage of activity launches.  At random intervals, the 
Monkey will issue a startActivity() call, as a way of maximizing
coverage of all activities within your package.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--pct-anyevent &amp;lt;percent&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adjust percentage of other types of events.  This is a catch-all for
 all other types of events such as keypresses, other less-used
buttons on the device, and so forth.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;Constraints&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-p &amp;lt;allowed-package-name&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;If you specify one or more packages this way, the Monkey will &lt;i&gt;only&lt;/i&gt; allow the system
to visit activities within those packages.  If your application requires access to activities in
other packages (e.g. to select a contact) you'll need to specify those packages as well.
If you don't specify any packages, the Monkey will allow the system to launch activities
in all packages.  To specify multiple packages, use the -p option multiple times — one -p 
option per package.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-c &amp;lt;main-category&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;If you specify one or more categories this way, the Monkey will &lt;i&gt;only&lt;/i&gt; allow the 
system to visit activities that are listed with one of the specified categories.  
If you don't specify any categories, the Monkey will select activities listed with the category
Intent.CATEGORY_LAUNCHER or Intent.CATEGORY_MONKEY.  To specify multiple categories, use the -c
option multiple times — one -c option per category.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="8"&gt;Debugging&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--dbg-no-events&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;When specified, the Monkey will perform the initial launch into a test activity, but
will not generate any further events.
For best results, combine with -v, one or more package constraints, and a non-zero throttle to keep the Monkey
running for 30 seconds or more.  This provides an environment in which you can monitor package
transitions invoked by your application.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--hprof&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;If set, this option will generate profiling reports immediately before and after
the Monkey event sequence.
This will generate large (~5Mb) files in data/misc, so use with care.  See 
&lt;a href="http://developer.android.com/tools/debugging/debugging-tracing.html" title="traceview"&gt;Traceview&lt;/a&gt; for more information
on trace files.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--ignore-crashes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Normally, the Monkey will stop when the application crashes or experiences any type of 
unhandled exception.  If you specify this option, the Monkey will continue to send events to
the system, until the count is completed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--ignore-timeouts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Normally, the Monkey will stop when the application experiences any type of timeout error such
as a "Application Not Responding" dialog.  If you specify this option, the Monkey will continue to 
send events to the system, until the count is completed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--ignore-security-exceptions&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Normally, the Monkey will stop when the application experiences any type of permissions error,
for example if it attempts to launch an activity that requires certain permissions.  If you specify
this option, the Monkey will continue to send events to the system, until the count is 
completed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--kill-process-after-error&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Normally, when the Monkey stops due to an error, the application that failed will be left
running.  When this option is set, it will signal the system to stop the process in which the error
occurred.
Note, under a normal (successful) completion, the launched process(es) are not stopped, and
the device is simply left in the last state after the final event.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--monitor-native-crashes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Watches for and reports crashes occurring in the Android system 
native code. If --kill-process-after-error is set, the system will stop.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--wait-dbg&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stops the Monkey from executing until a debugger is attached to it.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
Source:-&lt;a href="http://www.developer.android.com/"&gt;www.developer.android.com&lt;/a&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>AutoCompleteTextView tutorials in android</title><link>http://google-androidlovers.blogspot.com/2012/08/autocompletetextview-tutorials-in.html</link><category>AutoCompletetextView</category><category>Begineer</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Wed, 22 Aug 2012 22:35:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-802297365358229999</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
An editable text view that shows completion suggestions automatically
 while the user is typing. The list of suggestions is displayed in a drop
 down menu from which the user can choose an item to replace the content
 of the edit box with.&lt;br /&gt;
The drop down can be dismissed at any time by pressing the back key or,
 if no item is selected in the drop down, by pressing the enter/dpad center
 key.&lt;br /&gt;
The list of suggestions is obtained from a data adapter and appears
 only after a given number of characters defined by
 &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/widget/AutoCompleteTextView.html#getThreshold%28%29"&gt;the threshold&lt;/a&gt;&lt;/code&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b style="color: red;"&gt;countries.xml &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre style="border: 1px solid black;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&amp;lt;?&lt;span class="IL_AD" id="IL_AD3"&gt;xml version&lt;/span&gt;="1.0" &lt;span class="IL_AD" id="IL_AD5"&gt;encoding&lt;/span&gt;="utf-8"?&amp;gt;
&amp;lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   &amp;gt;
&amp;lt;TextView 
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   android:text="@string/hello"
   /&amp;gt;
&amp;lt;AutoCompleteTextView android:id="@+id/myautocomplete"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:completionThreshold="1"
/&amp;gt;
&amp;lt;/LinearLayout&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;span style="color: red;"&gt;&amp;nbsp;Main.Java&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre style="border: 1px solid black;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;package com.test.autocomplete;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre style="border: 1px solid black;"&gt;&lt;code&gt;&lt;span style="color: black;"&gt;import android.app.Activity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;

public class Main extends Activity implements TextWatcher{

AutoCompleteTextView myAutoComplete;
String item[]={
  "January", "February", "March", "April",
  "May", "June", "July", "August",
  "September", "October", "November", "December"
};

   /** Called when &lt;span class="IL_AD" id="IL_AD9"&gt;the activity&lt;/span&gt; is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);

       myAutoComplete = (AutoCompleteTextView)findViewById(R.id.myautocomplete);
      
       myAutoComplete.addTextChangedListener(this);
       myAutoComplete.setAdapter(new ArrayAdapter&amp;lt;String&amp;gt;(this, android.R.layout.simple_dropdown_item_1line, item));
      
   }

@Override
public void afterTextChanged(Editable arg0) {
 // TODO Auto-generated method stub

}

@Override
public void beforeTextChanged(CharSequence s, int start, int count,
  int after) {
 // TODO Auto-generated method stub

}

@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
 // TODO Auto-generated method stub

}
}&lt;/span&gt;&lt;/code&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
Video tetorials:-
&lt;iframe allowfullscreen="allowfullscreen" frameborder="0" height="360" src="http://www.youtube.com/embed/gj-ikck1Z70?feature=player_detailpage" width="640"&gt;&lt;/iframe&gt;
&lt;br /&gt;
More details:- &lt;a href="http://developer.android.com/reference/android/widget/AutoCompleteTextView.html"&gt;http://developer.android.com/reference/android/widget/AutoCompleteTextView.html&lt;/a&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/gj-ikck1Z70/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><georss:featurename xmlns:georss="http://www.georss.org/georss">Kathmandu 44600, Nepal</georss:featurename><georss:point xmlns:georss="http://www.georss.org/georss">27.7 85.3333333</georss:point><georss:box xmlns:georss="http://www.georss.org/georss">27.6437645 85.254369300000008 27.7562355 85.4122973</georss:box></item><item><title>How to Linking to Your Products in Android</title><link>http://google-androidlovers.blogspot.com/2012/08/how-to-linking-to-your-products-in.html</link><category>android developer blog</category><category>google play</category><category>Products</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Mon, 20 Aug 2012 01:41:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-2975919396905345333</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h1 itemprop="name"&gt;
&lt;/h1&gt;
&lt;div class="sidebox-wrapper"&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;img alt="Get it on Google Play" src="http://www.android.com/images/brand/get_it_on_play_logo_small.png" style="margin-left: auto; margin-right: auto;" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;For a link that includes the Google Play brand icon, check out the &lt;a href="http://developer.android.com/distribute/googleplay/promote/badges.html"&gt;Badges&lt;/a&gt; page. &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class="sidebox"&gt;
&lt;a href="http://developer.android.com/distribute/googleplay/promote/badges.html" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;
  
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
Google Play provides several link formats that let you bring users to your
products in the way you want, from Android apps, web pages, ads, reviews,
articles, social media posts, and more.&lt;br /&gt;
The link formats let you:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Link to a specific app's &lt;a href="http://developer.android.com/distribute/googleplay/promote/linking.html#OpeningDetails"&gt;product details page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Link to a &lt;a href="http://developer.android.com/distribute/googleplay/promote/linking.html#OpeningPublisher"&gt;list of all of your apps&lt;/a&gt;, or&lt;/li&gt;
&lt;li&gt;Link to a &lt;a href="http://developer.android.com/distribute/googleplay/promote/linking.html#PerformingSearch"&gt;search result&lt;/a&gt; of your choice&lt;/li&gt;
&lt;li&gt;Link to a &lt;a href="http://developer.android.com/distribute/googleplay/promote/linking.html#OpeningCollection"&gt;collection&lt;/a&gt; on Google Play&lt;/li&gt;
&lt;/ul&gt;
If you are linking from an Android app, you can also control whether the link
launches the Play Store application or the browser, which takes the user
to the Google Play web site.&lt;br /&gt;
&lt;h2 id="OpeningDetails" style="margin-bottom: 0px;"&gt;
Linking to a Product Details Page&lt;/h2&gt;
&lt;hr /&gt;
Use the format below to deep-link users directly to a specific app's product
details page. At the product details page, users can see the app description,
screenshots, reviews and more, and then install it.&lt;br /&gt;
To create the link, you need to know the app's fully qualified &lt;i&gt;package
name&lt;/i&gt;, which is declared in the app's &lt;a href="http://developer.android.com/guide/topics/manifest/manifest-element.html#package"&gt;manifest
file&lt;/a&gt;. The package name is also visible in the Developer Console. &lt;br /&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;From a web site:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class="prettyprint"&gt;&lt;span class="pln"&gt;http&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="com"&gt;//play.google.com/store/apps/details?id=&amp;lt;package_name&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;b&gt;From an Android app:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class="prettyprint"&gt;&lt;span class="pln"&gt;market&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="com"&gt;//details?id=&amp;lt;package_name&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
Here's an example:&lt;br /&gt;
&lt;div style="margin-left: 1em;"&gt;
&lt;code&gt;&lt;a href="http://play.google.com/store/apps/details?id=com.google.android.apps"&gt;http://play.google.com/store/apps/details?id=com.google.android.apps&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;
For details on how to send the link in an Android app, see &lt;a href="http://developer.android.com/distribute/googleplay/promote/linking.html#android-app"&gt;Linking from an Android App&lt;/a&gt;.&lt;br /&gt;
&lt;h2 id="OpeningPublisher" style="margin-bottom: 0px;"&gt;
Linking to a Product List&lt;/h2&gt;
&lt;hr /&gt;
Use the format below to link users to a list of apps published by you. The
product list lets users see all of the apps from a specific publisher, with
ratings, editorial badges, and an Install button for each. &lt;br /&gt;
To create the link, you need to know your &lt;i&gt;publisher name&lt;/i&gt;, which is
available from the Developer Console. &lt;br /&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;From a web site:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class="prettyprint"&gt;&lt;span class="pln"&gt;http&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="com"&gt;//play.google.com/store/search?q=pub:&amp;lt;publisher_name&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;b&gt;From an Android app:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class="prettyprint"&gt;&lt;span class="pln"&gt;market&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="com"&gt;//search?q=pub:&amp;lt;publisher_name&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
Here's an example:&lt;br /&gt;
&lt;div style="margin-left: 1em;"&gt;
&lt;code&gt;&lt;a href="http://play.google.com/store/search?q=pub:Google%20Inc."&gt;http://play.google.com/store/search?q=pub:Google Inc.&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;
For details on how to send the link in an Android app, see &lt;a href="http://developer.android.com/distribute/googleplay/promote/linking.html#android-app"&gt;Linking from an Android App&lt;/a&gt;.&lt;br /&gt;
&lt;h2 id="PerformingSearch" style="margin-bottom: 0px;"&gt;
Linking to a Search Result&lt;/h2&gt;
&lt;hr /&gt;
Use the format below to link users to a search query result on Google Play.
The search result page shows a list of apps (and optionally other content) that
match the query, with ratings, badges, and an Install button for each. &lt;br /&gt;
To create the link, you just need a search query string. If you want the
query to search outside of the Google Play Apps listings, you can remove the
&lt;code&gt;&amp;amp;c=apps&lt;/code&gt; part of the link URL.&lt;br /&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;From a web site:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class="prettyprint"&gt;&lt;span class="pln"&gt;http&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="com"&gt;//play.google.com/store/search?q=&amp;lt;search_query&amp;gt;&amp;amp;c=apps&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;b&gt;From an Android app:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class="prettyprint"&gt;&lt;span class="pln"&gt;market&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="com"&gt;//search?q=&amp;lt;seach_query&amp;gt;&amp;amp;c=apps&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
Here's an example:&lt;br /&gt;
&lt;div style="margin-left: 1em;"&gt;
&lt;code&gt;&lt;a href="http://play.google.com/store/search?q=maps&amp;amp;c=apps"&gt;http://play.google.com/store/search?q=maps&amp;amp;c=apps&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;
For details on how to send the link in an Android app, see &lt;a href="http://developer.android.com/distribute/googleplay/promote/linking.html#android-app"&gt;Linking from an Android App&lt;/a&gt;.&lt;br /&gt;
&lt;h2 id="OpeningCollection" style="margin-bottom: 0px;"&gt;
Linking to a Collection&lt;/h2&gt;
&lt;hr /&gt;
If your app is featured or appears in one of the Google Play Top charts or
collections, you can use the format below to link users directly to the
collection. The collection shows a ranked list of apps in the collection, with
ratings, short descriptions, and an Install button.&lt;br /&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;From a web site:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class="prettyprint"&gt;&lt;span class="pln"&gt;http&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="com"&gt;//play.google.com/store/apps/collection/&amp;lt;collection_name&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;b&gt;From an Android app:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class="prettyprint"&gt;&lt;span class="pln"&gt;market&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="com"&gt;//apps/collection/&amp;lt;collection_name&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
Here's an example:&lt;br /&gt;
&lt;div style="margin-left: 1em;"&gt;
&lt;code&gt;&lt;a href="http://play.google.com/store/apps/collection/editors_choice"&gt;http://play.google.com/store/apps/collection/editors_choice&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;
For details on how to send the link in an Android app, see &lt;a href="http://developer.android.com/distribute/googleplay/promote/linking.html#android-app"&gt;Linking from an Android App&lt;/a&gt;.&lt;br /&gt;
&lt;div class="table-caption"&gt;
&lt;b&gt;Table 1.&lt;/b&gt; Collections on Google Play.&lt;/div&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Collection&lt;/th&gt;&lt;th&gt;collection_name&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Staff Picks (Featured)&lt;/td&gt;&lt;td&gt;featured&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Editor's Choice&lt;/td&gt;&lt;td&gt;editors_choice&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Top Paid&lt;/td&gt;&lt;td&gt;topselling_paid&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Top Free&lt;/td&gt;&lt;td&gt;topselling_free&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Top New Free&lt;/td&gt;&lt;td&gt;topselling_new_free&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Top New Paid&lt;/td&gt;&lt;td&gt;topselling_new_paid&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Top Grossing&lt;/td&gt;&lt;td&gt;topgrossing&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Trending&lt;/td&gt;&lt;td&gt;movers_shakers&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Best Selling in Games&lt;/td&gt;&lt;td&gt;topselling_paid_game&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 id="android-app" style="margin-bottom: 0px;"&gt;
Linking from an Android App&lt;/h2&gt;
&lt;hr /&gt;
There are two general formats for links that are accessible to users on
Android devices, The two formats trigger slightly different behaviors on the
device:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;market://&lt;/code&gt; &amp;nbsp;&amp;nbsp; Launches the Play Store app to load the
target page.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http://&lt;/code&gt; &amp;nbsp;&amp;nbsp; Lets the user choose whether to launch the
Play Store app or the browser to handle the request. If the browser handles the
request, it loads the target page on the Google Play web site.&lt;/li&gt;
&lt;/ul&gt;
In general, you should use &lt;code&gt;http://&lt;/code&gt; format for links on web pages
and &lt;code&gt;market://&lt;/code&gt; for links in Android apps.&lt;br /&gt;
If you want to link to your products from an Android app, create an &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/content/Intent.html"&gt;Intent&lt;/a&gt;&lt;/code&gt; that opens an Google Play URL, as shown in the example
below.&lt;br /&gt;
&lt;pre class="prettyprint"&gt;&lt;span class="typ"&gt;Intent&lt;/span&gt;&lt;span class="pln"&gt; intent &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;new&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;Intent&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;Intent&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;ACTION_VIEW&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
intent&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;setData&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;Uri&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;parse&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="str"&gt;"market://details?id=com.example.android"&lt;/span&gt;&lt;span class="pun"&gt;));&lt;/span&gt;&lt;span class="pln"&gt;
startActivity&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;intent&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;h2 id="UriSummary" style="margin-bottom: 0px;"&gt;
Summary of URL formats&lt;/h2&gt;
&lt;hr /&gt;
The table below provides a summary of the URIs currently supported by the Google Play (both on
the web and in an Android application), as discussed in the previous sections.&lt;br /&gt;
&lt;table border="1"&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;For&amp;nbsp;this&amp;nbsp;result&lt;/th&gt;
&lt;th&gt;Web page link&lt;/th&gt;
&lt;th&gt;Android app link&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="width: 36px;"&gt;Show the product details page for a specific app&lt;/td&gt;
&lt;td&gt;&lt;code&gt;http://play.google.com/&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;store/apps/details?id=&amp;lt;package_name&amp;gt;&lt;/code&gt;
&lt;/td&gt;&lt;td&gt;&lt;code&gt;market://details?id=&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;lt;package_name&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Show apps by a specific publisher&lt;/td&gt;
&lt;td&gt;&lt;nobr&gt;&lt;code&gt;http://play.google.com/store/&lt;/code&gt;&lt;/nobr&gt;&lt;br /&gt;
&lt;nobr&gt;&lt;code&gt;search?q=pub:&amp;lt;publisher_name&amp;gt;&lt;/code&gt;&lt;/nobr&gt;&lt;/td&gt;
&lt;td&gt;&lt;nobr&gt;&lt;code&gt;market://search?q=pub:&lt;/code&gt;&lt;/nobr&gt;&lt;br /&gt;
&lt;nobr&gt;&lt;code&gt;&amp;lt;publisher_name&amp;gt;&lt;/code&gt;&lt;/nobr&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Search for apps using a general string query.&lt;/td&gt;
&lt;td&gt;&lt;code&gt;http://play.google.com/store/search?q=&amp;lt;query&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;market://search?q=&amp;lt;query&amp;gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Sources: &lt;a href="http://developer.android.com/"&gt;www.developer.android.com&lt;/a&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Managing Screen Sizes using new tools in android</title><link>http://google-androidlovers.blogspot.com/2012/08/managing-screen-sizes-using-new-tools.html</link><category>android developer blog</category><category>apps resources</category><category>Managing Screen Sizes</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Wed, 15 Aug 2012 22:00:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-8810338730583588514</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;span itemprop="description"&gt;[This post in originally publish in android officially blog site, original author by&lt;/span&gt;&lt;i&gt; Dianne Hackborn&lt;/i&gt;&lt;span itemprop="description"&gt;, post on android blog by &lt;/span&gt;&lt;i&gt;Tim&amp;nbsp;Bray&lt;/i&gt;&lt;span itemprop="description"&gt;] &lt;/span&gt;&lt;br /&gt;
&lt;span itemprop="description"&gt;&lt;a href="http://android-developers.blogspot.com/2011/07/android-32-platform-and-updated-sdk.html"&gt;Android 3.2&lt;/a&gt;
 includes new tools for supporting devices with a wide range of screen 
sizes.  One important result is better support for a new size of screen;
 what is typically called a “7-inch” tablet.  This release  also offers 
several new APIs to simplify developers’ work in adjusting to different 
screen sizes.&lt;/span&gt;&lt;br /&gt;
This a long post.  We start by discussing the
 why and how of Android “dp” arithmetic, and the finer points of the 
screen-size buckets.  If you know all that stuff, you can skip down to 
“Introducing Numeric Selectors” to read about what’s new. We also 
provide our recommendations for how you can do layout selection in apps 
targeted at Android 3.2 and higher in a way that should allow you to 
support the maximum number of device geometries with the minimum amount 
of effort.&lt;br /&gt;
Of course, the official write-up on &lt;a href="http://developer.android.com/guide/practices/screens_support.html"&gt;Supporting Multiple Screens&lt;/a&gt; is also required reading for people working in this space.&lt;br /&gt;
&lt;h3&gt;
Understanding Screen Densities and the “dp”&lt;/h3&gt;
Resolution
 is the actual number of pixels available in the display, density is how
 many pixels appear within a constant area of the display, and size is 
the amount of physical space available for displaying your interface.  
These are interrelated: increase the resolution and density together, 
and size stays about the same.  This is why the 320x480 screen on a G1 
and 480x800 screen on a Droid are both the same screen size: the 480x800
 screen has more pixels, but it is also higher density.&lt;br /&gt;
To remove 
the size/density calculations from the picture, the Android framework 
works wherever possible in terms of "dp" units, which are corrected for 
density.  In medium-density ("mdpi") screens, which correspond to the 
original Android phones, physical pixels are identical to dp's; the 
devices’ dimensions are 320x480 in either scale.  A more recent phone 
might have physical-pixel dimensions of 480x800 but be a high-density 
device.  The conversion factor from hdpi to mdpi in this case is 1.5, so
 for a developer's purposes, the device is 320x533 in dp's.&lt;br /&gt;
&lt;h3&gt;
Screen-size Buckets&lt;/h3&gt;
Android
 has included support for three screen-size “buckets” since 1.6, based 
on these “dp” units: “normal”  is currently the most popular device 
format (originally 320x480, more recently higher-density 480x800); 
“small” is for smaller screens, and “large” is for “substantially 
larger” screens.  Devices that fall in the “large” bucket include the 
Dell Streak and original 7” Samsung Galaxy Tab.  Android 2.3 introduced a
 new bucket size “xlarge”, in preparation for the approximately-10” 
tablets (such as the Motorola Xoom) that Android 3.0 was designed to 
support. &lt;br /&gt;
The definitions are:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;xlarge screens are at least 960dp x 720dp.&lt;/li&gt;
&lt;li&gt;large screens are at least 640dp x 480dp.&lt;/li&gt;
&lt;li&gt;normal screens are at least 470dp x 320dp.&lt;/li&gt;
&lt;li&gt;small screens are at least 426dp x 320dp.  (Android does not currently support screens smaller than this.)&lt;/li&gt;
&lt;/ul&gt;
Here are some more examples of how this works with real screens:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;A
 QVGA screen is 320x240 ldpi.  Converting to mdpi (a 4/3 scaling factor)
 gives us 426dp x 320dp; this matches the minimum size above for the 
small screen bucket.&lt;/li&gt;
&lt;li&gt;The Xoom is a typical 10” tablet with a 1280x800 mdpi screen.  This places it into the xlarge screen bucket.&lt;/li&gt;
&lt;li&gt;The Dell Streak is a 800x480 mdpi screen.  This places it into the bottom of the large size bucket.&lt;/li&gt;
&lt;li&gt;A typical 7” tablet has a 1024x600 mdpi screen.  This also counts as a large screen.&lt;/li&gt;
&lt;li&gt;The original Samsung Galaxy Tab is an interesting case.  
Physically it is a 1024x600 7” screen and thus classified as “large”.  
However the device configures its screen as hdpi, which means after 
applying the appropriate ⅔ scaling factor the actual space on the screen
 is 682dp x 400dp.  This actually moves it out of the “large” bucket and
 into a “normal” screen size.  The Tab actually reports that it is 
“large”; this was a mistake in the framework’s computation of the size 
for that device that we made.  Today no devices should ship like this.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Issues With Buckets&lt;/h3&gt;
Based on developers’ experience so 
far, we’re not convinced that this limited set of screen-size buckets 
gives developers everything they need in adapting to the increasing 
variety of Android-device shapes and sizes.  The primary problem is that
 the borders between the buckets may not always correspond to either 
devices available to consumers or to the particular needs of apps.&lt;br /&gt;
The
 “normal” and “xlarge” screen sizes should be fairly straightforward as a
 target: “normal” screens generally require single panes of information 
that the user moves between, while “xlarge” screens can comfortably hold
 multi-pane UIs (even in portrait orientation, with some tightening of 
the space).&lt;br /&gt;
The “small” screen size is really an artifact of the 
original Android devices having 320x480 screens.  240x320 screens have a
 shorter aspect ratio, and applications that don’t take this into 
account can break on them.  These days it is good practice to test user 
interfaces on a small screen to ensure there are no serious problems.&lt;br /&gt;
The
 “large” screen size has been challenging for developers&amp;nbsp;—&amp;nbsp;you will 
notice that it encompases everything from the Dell Streak to the 
original Galaxy Tab to 7" tablets in general. Different applications may
 also reasonably want to take different approaches to these two devices;
 it is also quite reasonable to want to have different behavior for 
landscape vs. portrait large devices because landscape has plenty of 
space for a multi-pane UI, while portrait may not.&lt;br /&gt;
&lt;h3&gt;
Introducing Numeric Selectors&lt;/h3&gt;
Android
 3.2 introduces a new approach to screen sizes, with the goal of making 
developers' lives easier. We have defined a set of numbers describing 
device screen sizes, which you can use to select resources or otherwise 
adjust your UI.  We believe that using these will not only reduce 
developers’ workloads, but future-proof their apps significantly.&lt;br /&gt;
The
 numbers describing the screen size are all in “dp” units (remember that
 your layout dimensions should also be in dp units so that the system 
can adjust for screen density).  They are:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;width dp&lt;/b&gt;:
 the current width available for application layout in “dp” units; 
changes when the screen switches orientation between landscape and 
portrait.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;height dp&lt;/b&gt;: the current height available for application layout in “dp” units; also changes when the screen switches orientation.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;smallest width dp&lt;/b&gt;: the smallest width available for 
application layout in “dp” units; this is the smallest width dp that you
 will ever encounter in any rotation of the display.&lt;/li&gt;
&lt;/ul&gt;
Of these, &lt;b&gt;smallest width dp&lt;/b&gt; is the most important.  It 
replaces the old screen-size buckets with a continuous range of numbers 
giving the effective size.  This number is based on width because that 
is fairly universally the driving factor in designing a layout.  A UI 
will often scroll vertically, but have fairly hard constraints on the 
minimum space it needs horizontally; the available width is also the key
 factor in determining whether to use a phone-style one-pane layout or 
tablet-style multi-pane layout.&lt;br /&gt;
Typical numbers for screen width dp are:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;320: a phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).&lt;/li&gt;
&lt;li&gt;480: a tweener tablet like the Streak (480x800 mdpi).&lt;/li&gt;
&lt;li&gt;600: a 7” tablet (600x1024).&lt;/li&gt;
&lt;li&gt;720: a 10” tablet (720x1280, 800x1280, etc).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Using the New Selectors&lt;/h3&gt;
When you are designing your UI, 
the main thing you probably care about is where you switch between a 
phone-style UI and a tablet-style multi-pane UI.  The exact point of 
this switch will depend on your particular design&amp;nbsp;—&amp;nbsp;maybe you need a 
full 720dp width for your tablet layout, maybe 600dp is enough, or 
480dp, or even some other number between those.  Either pick a width and
 design to it; or after doing your design, find the smallest width it 
supports.&lt;br /&gt;
Now you can select your layout resources for phones vs. 
tablets using the number you want.  For example, if 600dp is the 
smallest width for your tablet UI, you can do this:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# For phones&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;sw600dp&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# For tablets&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
For
 the rare case where you want to further customize your UI, for example 
for 7” vs. 10” tablets, you can define additional smallest widths:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# For phones&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;sw600dp&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# For 7” tablets&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;sw720dp&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# For 10” tablets&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
Android
 will pick the resource that is closest to the device’s “smallest 
width,” without being larger; so for a hypothetical 700dp x 1200dp 
tablet, it would pick layout-sw600dp.&lt;br /&gt;
If you want to get fancier, 
you can make a layout that can change when the user switches orientation
 to the one that best fits in the current available width.  This can be 
of particular use for 7” tablets, where a multi-pane layout is a very 
tight fit in portrait::&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="com"&gt;# Single-pane&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;w600dp&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# Multi-pane when enough width&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
Or the previous three-layout example could use this to switch to the full UI whenever there is enough width:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# For phones&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;sw600dp&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# Tablets&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;sw600dp&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;w720dp&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp;&lt;/span&gt;&lt;span class="com"&gt;# Large width&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
In
 the setup above, we will always use the phone layout for devices whose 
smallest width is less than 600dp; for devices whose smallest width is 
at least 600dp, we will switch between the tablet and large width 
layouts depending on the current available width.&lt;br /&gt;
You can also mix in other resource qualifiers:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# For phones&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;sw600dp&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# Tablets&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;sw600dp&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;port&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="com"&gt;# Tablets when portrait&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
Selector Precedence&lt;/h3&gt;
While
 it is safest to specify multiple configurations like this to avoid 
potential ambiguity, you can also take advantage of some subtleties of 
resource matching.  For example, the order that resource qualifiers must
 be specified in the directory name (documented in &lt;a href="http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources"&gt;Providing Resources&lt;/a&gt;)
 is also the order of their “importance.”  Earlier ones are more 
important than later ones.  You can take advantage of this to, for 
example, easily have a landscape orientation specialization for your 
default layout:&lt;br /&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# For phones&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;land&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="com"&gt;# For phones when landscape&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;sw600dp&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# Tablets&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
In
 this case when running on a tablet that is using landscape orientation,
 the last layout will be used because the “swNNNdp” qualifier is a 
better match than “port”.&lt;br /&gt;
&lt;h3&gt;
Combinations and Versions&lt;/h3&gt;
One 
final thing we need to address is specifying layouts that work on both 
Android 3.2 and up as well as previous versions of the platform.&lt;br /&gt;
Previous
 versions of the platform will ignore any resources using the new 
resource qualifiers.  This, then, is one approach that will work:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# For phones&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;xlarge&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="com"&gt;# For pre-3.2 tablets&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;sw600dp&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# For 3.2 and up tablets&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
This
 does require, however, that you have two copies of your tablet layout. 
 One way to avoid this is by defining the tablet layout once as a 
distinct resource, and then making new versions of the original layout 
resource that point to it.  So the layout resources we would have are:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="com"&gt;# For phones&lt;/span&gt;&lt;span class="pln"&gt;
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;main_activity_tablet&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="com"&gt;# For tablets&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
To have the original layout point to the tablet version, you put &lt;code&gt;&amp;lt;item&amp;gt;&lt;/code&gt; specifications in the appropriate values directories.  That is these two files:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;values&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;xlarge&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml
res&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;values&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;sw600dp&lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;xml&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
Both would contain the following XML defining the desired resource:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pun"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="pln"&gt;xml version&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="str"&gt;"1.0"&lt;/span&gt;&lt;span class="pln"&gt; encoding&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="str"&gt;"utf-8"&lt;/span&gt;&lt;span class="pun"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;resources&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;item&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;type&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"layout"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"main_activty"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @layout/main_activity_tablet
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/item&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/resources&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
Of
 course, you can always simply select the resource to use in code.  That
 is, define two or more resources like “layout/main_activity” and 
“layout/main_activity_tablet,” and select the one to use in your code 
based on information in the Configuration object or elsewhere.  For 
example:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="kwd"&gt;public&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;class&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;MyActivity&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;extends&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;Activity&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="lit"&gt;@Override&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;protected&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;void&lt;/span&gt;&lt;span class="pln"&gt; onCreate&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;Bundle&lt;/span&gt;&lt;span class="pln"&gt; savedInstanceState&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd"&gt;super&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;onCreate&lt;/span&gt;&lt;span class="pun"&gt;();&lt;/span&gt;&lt;span class="pln"&gt;

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="typ"&gt;Configuration&lt;/span&gt;&lt;span class="pln"&gt; config &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; getResources&lt;/span&gt;&lt;span class="pun"&gt;().&lt;/span&gt;&lt;span class="pln"&gt;getConfiguration&lt;/span&gt;&lt;span class="pun"&gt;();&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd"&gt;if&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;config&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;smallestScreenWidthDp &lt;/span&gt;&lt;span class="pun"&gt;&amp;gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;600&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;R&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;main_activity_tablet&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;else&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;R&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;layout&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;main_activity&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
Conclusion&lt;/h3&gt;
We
 strongly recommend that developers start using the new layout selectors
 for apps targeted at Android release 3.2 or higher, as we will be doing
 for Google apps.  We think they will make your layout choices easier to
 express and manage.  &lt;br /&gt;
Furthermore, we can see a remarkably wide 
variety of Android-device form factors coming down the pipe.  This is a 
good thing, and will expand the market  for your work.  These new layout
 selectors are specifically designed to make it straightforward for you 
to make your apps run well in a future hardware ecosystem which is full 
of variety (and surprises). &lt;br /&gt;
&lt;br /&gt;
Here is the source link:-&lt;a href="http://www.blogger.com/%20http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html"&gt; http://android-developers.blogspot.com&lt;/a&gt;&lt;br /&gt;
Other useful resources:- &lt;a href="http://developer.android.com/guide/practices/screens_support.html"&gt;http://developer.android.com/guide/practices/screens_support.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://developer.android.com/training/multiscreen/index.html"&gt;http://developer.android.com/training/multiscreen/index.html&lt;/a&gt;&amp;nbsp; &lt;br /&gt;
&lt;a href="http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources"&gt;http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://developer.android.com/training/multiscreen/screensizes.html"&gt;http://developer.android.com/training/multiscreen/screensizes.html&lt;/a&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>WiFi state is not enabling so how to fix it?</title><link>http://google-androidlovers.blogspot.com/2012/08/wifi-state-is-not-enabling-so-how-to.html</link><category>Android WiFi</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Mon, 13 Aug 2012 11:33:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-6798960630204757085</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="post-text" itemprop="description"&gt;
Question is ,Trying to create a widget for enabling and disabling the wifi. &lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="kwd"&gt;if&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;myWifiManager&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;isWifiEnabled&lt;/span&gt;&lt;span class="pun"&gt;()){&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="typ"&gt;System&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="kwd"&gt;out&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;println&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="str"&gt;"Toggle Wifi Enabled going to disable"&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myWifiManager&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;setWifiEnabled&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="kwd"&gt;false&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd"&gt;else&lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="typ"&gt;System&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="kwd"&gt;out&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;println&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="str"&gt;"Wifi Disabled going to enable "&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myWifiManager&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;setWifiEnabled&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="kwd"&gt;true&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="typ"&gt;System&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="kwd"&gt;out&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;println&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="str"&gt;"WI: "&lt;/span&gt;&lt;span class="pun"&gt;+&lt;/span&gt;&lt;span class="pln"&gt;myWifiManager&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;isWifiEnabled&lt;/span&gt;&lt;span class="pun"&gt;());&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
This is the code i am using the disabling part is working fine but 
the enabling part is not working fine. Soon after enabling the wifi i am
 printing the wifi state i am getting it as false.&lt;br /&gt;
&lt;br /&gt;
Solving here is the solution&lt;br /&gt;
&lt;br /&gt;
&lt;div class="post-text"&gt;
Here is how to turn on and turn off wifi in android.&lt;br /&gt;
First you need to declare the following in your manifest file&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.ACCESS_WIFI_STATE"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="tag"&gt;&amp;lt;/uses-permission&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.UPDATE_DEVICE_STATS"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="tag"&gt;&amp;lt;/uses-permission&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.CHANGE_WIFI_STATE"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="tag"&gt;&amp;lt;/uses-permission&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.WAKE_LOCK"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="tag"&gt;&amp;lt;/uses-permission&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
After doing it that on your Activity class&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="kwd"&gt;private&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;WifiManager&lt;/span&gt;&lt;span class="pln"&gt; wifiManager&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="lit"&gt;@Override&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;public&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;void&lt;/span&gt;&lt;span class="pln"&gt; onCreate&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;Bundle&lt;/span&gt;&lt;span class="pln"&gt; icicle&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp;&lt;/span&gt;&lt;span class="pun"&gt;....................&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp;wifiManager &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;WifiManager&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;this&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;getSystemService&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;Context&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;WIFI_SERVICE&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp;&lt;/span&gt;&lt;span class="kwd"&gt;if&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;wifiManager&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;isWifiEnabled&lt;/span&gt;&lt;span class="pun"&gt;()){&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp;wifiManager&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;setWifiEnabled&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="kwd"&gt;false&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp;&lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="kwd"&gt;else&lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
wifiManager&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;setWifiEnabled&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="kwd"&gt;true&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
}&lt;/blockquote&gt;
&lt;i&gt;&lt;b&gt;Explanation&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;Get the Wifi service from our system&lt;/b&gt;&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;wifiManager &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;WifiManager&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;this&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;getSystemService&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;Context&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;WIFI_SERVICE&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;b&gt;Check the our wifi is currently turned on or turned off&lt;/b&gt;&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="kwd"&gt;if&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;wifiManager&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;isWifiEnabled&lt;/span&gt;&lt;span class="pun"&gt;()){&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;b&gt;Turn on/off our wifi&lt;/b&gt;
    wifiManager.setWifiEnabled();&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Reference&lt;/b&gt;&lt;br /&gt;
&lt;a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html"&gt;WifiEnabler&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://google-androidlovers.blogspot.com/2012/01/scan-for-wireless-networks-in-android.html"&gt;http://google-androidlovers.blogspot.com/2012/01/scan-for-wireless-networks-in-android.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.java2s.com/Open-Source/Android/android-platform-apps/Settings/com/android/settings/wifi/WifiApEnabler.java.htm"&gt;http://www.java2s.com/Open-Source/Android/android-platform-apps/Settings/com/android/settings/wifi/WifiApEnabler.java.htm&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Or May this&lt;br /&gt;
&lt;br /&gt;
After &lt;b&gt;wifiManager.setWifiEnabled(true);&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
it took few seconds to connect 
to the network. It seems WifiManager reconnects automatically after call
 to &lt;b&gt;wifiManager.setWifiEnabled(true &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Dont forget this also&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.tutorialforandroid.com/2009/10/turn-off-turn-on-wifi-in-android-using.html" rel="nofollow"&gt;http://www.tutorialforandroid.com/2009/10/turn-off-turn-on-wifi-in-android-using.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://marakana.com/forums/android/examples/40.html" rel="nofollow"&gt;http://marakana.com/forums/android/examples/40.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Finally goto more deatils problem and solution in stackoverflow. go to &lt;a href="http://stackoverflow.com/search?q=[android]+wifi"&gt;http://stackoverflow.com/search?q=[android]+wifi &lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>how to get twitter profile image in android</title><link>http://google-androidlovers.blogspot.com/2012/08/how-to-get-twitter-profile-image-in.html</link><category>Twitter</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Sun, 12 Aug 2012 12:48:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-2501986054640830909</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
It is the simple way to get profile image in twitter using twitter username.&lt;br /&gt;
&lt;br /&gt;
Here is the layout code for this simple project:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:tools="http://schemas.android.com/tools"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width="match_parent"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height="match_parent" &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextView&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:id="@+id/txtUrl"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width="fill_parent"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height="wrap_content"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:text="@string/hello_world"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tools:context=".MainActivity" /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ImageView&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:id="@+id/imgView"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width="wrap_content"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height="wrap_content"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_below="@+id/txtUrl"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_centerHorizontal="true"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:background="@drawable/profile" /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;EditText&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:id="@+id/editText1"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width="wrap_content"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height="wrap_content"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_alignParentLeft="true"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_below="@+id/imgView"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_marginLeft="62dp"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_marginTop="92dp"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:ems="10" &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;requestFocus /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/EditText&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Button&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:id="@+id/button1"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width="wrap_content"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height="wrap_content"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_alignLeft="@+id/editText1"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_below="@+id/editText1"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_marginLeft="33dp"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_marginTop="38dp"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:text="Ok" /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextView&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:id="@+id/textView1"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width="wrap_content"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height="wrap_content"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_alignBaseline="@+id/editText1"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_alignBottom="@+id/editText1"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_alignParentLeft="true"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_marginLeft="20dp"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:text="Username" /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextView&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:id="@+id/textView2"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width="wrap_content"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height="wrap_content"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_above="@+id/textView1"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_alignLeft="@+id/editText1"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_marginBottom="27dp"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:text="Twitter"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:textAppearance="?android:attr/textAppearanceLarge" /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/RelativeLayout&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
Now Main Jave Source code that getting&amp;nbsp; &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaH-ReaPIvmw5FXrslXJJaoYog3P3TkDFlPUvQIZVRNEx58bJ_qdwEaVuuEfYuXlpvP6Qd6iuK9TCVYqdUCTtBws7FuVauBvVAWykQnbeqJXtfywVfClHJaT_dwbWpOnW5T8d7O3vpSuQW/s1600/twitter+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
package com.example.test;&lt;br /&gt;
&lt;br /&gt;
import java.io.InputStream;&lt;br /&gt;
import java.net.URL;&lt;br /&gt;
&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.graphics.drawable.Drawable;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.view.View;&lt;br /&gt;
import android.view.View.OnClickListener;&lt;br /&gt;
import android.widget.Button;&lt;br /&gt;
import android.widget.EditText;&lt;br /&gt;
import android.widget.ImageView;&lt;br /&gt;
import android.widget.TextView;&lt;br /&gt;
&lt;br /&gt;
public class MainActivity extends Activity implements OnClickListener {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // declare internal using controls&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private TextView txtUrl;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private ImageView imgView;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private Button btn_prof;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private EditText edt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; setContentView(R.layout.activity_main);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; edt = (EditText) findViewById(R.id.editText1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; btn_prof = (Button) findViewById(R.id.button1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; btn_prof.setOnClickListener(this);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private Drawable grabImageFromUrl(String url) throws Exception {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return Drawable.createFromStream(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (InputStream) new URL(url).getContent(), "src");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onClick(View v) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; switch (v.getId()) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; case R.id.button1:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String user = edt.getText().toString();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // set url text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String url = "http://api.twitter.com/1/users/profile_image/"+user;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; txtUrl = (TextView) findViewById(R.id.txtUrl);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; txtUrl.setText(url);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // load image view control&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; imgView = (ImageView) findViewById(R.id.imgView);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // grab image to display&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; imgView.setImageDrawable(grabImageFromUrl(url));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (Exception e) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; txtUrl.setText("Error: Exception");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;/blockquote&gt;
&lt;br /&gt;
Able to connect to Internet and download files, you need to set 
uses-permission. Open file: AndroidManifest.xml and add this line: &lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;a href="http://www.diamondlinks.net/"&gt;&lt;/a&gt;
&lt;br /&gt;
&amp;lt;uses-permission android:name="android.permission.INTERNET" &amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/uses-permission&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
Final output look likes this:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.diamondlinks.net/"&gt;link building service&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&lt;a href="http://www.diamondlinks.net/"&gt;link building&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaH-ReaPIvmw5FXrslXJJaoYog3P3TkDFlPUvQIZVRNEx58bJ_qdwEaVuuEfYuXlpvP6Qd6iuK9TCVYqdUCTtBws7FuVauBvVAWykQnbeqJXtfywVfClHJaT_dwbWpOnW5T8d7O3vpSuQW/s1600/twitter+1.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaH-ReaPIvmw5FXrslXJJaoYog3P3TkDFlPUvQIZVRNEx58bJ_qdwEaVuuEfYuXlpvP6Qd6iuK9TCVYqdUCTtBws7FuVauBvVAWykQnbeqJXtfywVfClHJaT_dwbWpOnW5T8d7O3vpSuQW/s320/twitter+1.png" width="192" /&gt;&lt;/a&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifcsydUl3B7sZBMg8wOuzLX6HFmFdgjEHmdr3r6iKFx046b9WeBjdluyMscQLhTYqNTU-BDXdsdwk1-Ts_46oUHPGEO03dzZ3zsFV6MWrq8me0Fxeyi9pn13oP7TXBEAE0bUOf8XOTxKiC/s1600/twwiter+2.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifcsydUl3B7sZBMg8wOuzLX6HFmFdgjEHmdr3r6iKFx046b9WeBjdluyMscQLhTYqNTU-BDXdsdwk1-Ts_46oUHPGEO03dzZ3zsFV6MWrq8me0Fxeyi9pn13oP7TXBEAE0bUOf8XOTxKiC/s320/twwiter+2.png" width="192" /&gt;&lt;/a&gt;&lt;br /&gt;
Hope this helpful for your small application.&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaH-ReaPIvmw5FXrslXJJaoYog3P3TkDFlPUvQIZVRNEx58bJ_qdwEaVuuEfYuXlpvP6Qd6iuK9TCVYqdUCTtBws7FuVauBvVAWykQnbeqJXtfywVfClHJaT_dwbWpOnW5T8d7O3vpSuQW/s72-c/twitter+1.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Install Android OS on your PC with VirtualBox</title><link>http://google-androidlovers.blogspot.com/2012/08/install-android-os-on-your-pc-with.html</link><category>Android OS</category><category>PC</category><category>VirtualBox</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Sat, 11 Aug 2012 09:24:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-6166667738644749602</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Google's &lt;a href="http://www.android.com/"&gt;Android&lt;/a&gt; is an operating system and software stack for mobile devices. Under the hood, it uses a customized version of the &lt;a href="http://www.linux.org/"&gt;Linux&lt;/a&gt; &lt;a href="http://www.kernel.org/"&gt;kernel&lt;/a&gt;.
 Android is currently the fastest growing mobile operating system and is
 generating quite the buzz. If you are curious about it, you can give it
 a try without having to buy an Android smartphone. Let me tell how to 
do it.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="more"&gt;&lt;/a&gt;(You can also check our introductory article on Android &lt;a href="http://javacodegeeks.blogspot.com/2010/06/embracing-android-awesomeness-quick.html"&gt;here&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://code.google.com/p/live-android/"&gt;LiveAndroid&lt;/a&gt; is a project that provides a LiveCD for Android running on x86 platforms. With a &lt;a href="http://en.wikipedia.org/wiki/Live_distro"&gt;Live CD (or Live Distribution)&lt;/a&gt;
 you are able to test an operating system without altering the already 
installed OS or any files existing on the computer's storage devices. 
The user can return his PC to its previous state when he is done with 
the LiveCD. LiveAndroid does not fully support the Android OS, but the 
most important stuff are included in the distribution (with more added 
with each &lt;a href="http://code.google.com/p/live-android/wiki/todo"&gt;release&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
LiveAndroid can also be used with a virtualization application. I will show you how to install it on &lt;a href="http://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt;. You can find the ISO files in the &lt;a href="http://code.google.com/p/live-android/downloads/list"&gt;downloads section&lt;/a&gt; of the project, the current version being 0.3. There are two distinct ISO files for that version:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;liveandroidv0.3.iso.001&lt;/li&gt;
&lt;li&gt;liveandroidv0.3.iso.002&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
The two ISO files have to be joint before proceeding with the installation.&lt;br /&gt;
&lt;br /&gt;
If you are running Linux, this is a matter of a single command:&lt;br /&gt;
&lt;br /&gt;
→ cat liveandroidv0.3.iso.001 liveandroidv0.3.iso.002 &amp;gt; liveandroidv0.3.iso&lt;br /&gt;
&lt;br /&gt;
If you are running Windows, use HJSplit(&lt;a href="http://www.freebyte.com/hjsplit/"&gt;http://www.freebyte.com/hjsplit/&lt;/a&gt; or &lt;a href="http://www.freebytesoftware.com/download/hjsplit.zip"&gt;http://www.freebytesoftware.com/download/hjsplit.zip&lt;/a&gt;) to join it. (I remember this tool back from the glory days of floppy disks)&lt;br /&gt;
&lt;br /&gt;
Run HJ-Split → Choose Join → Select “Input File” → Locate the .001 file → Hit “Start”&lt;br /&gt;
&lt;br /&gt;
After the ISO file is ready, start up your VirtualBox application and hit the “New” button to create a new virtual machine.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI9E6LyrknTxaq0sHtwepIDFbqGn9hsHyz-QuPZdAhtIPe-QOX86YUmMYo3pgL5DF610FgNizMPYZ1SomON8X5BsnFhyphenhyphenwFQMTBImaeqt75htKRPVnkPs0vc2yYUVHkS-AAxwbntYSAh8k/s1600/01-virtualbox-create-new-virtual-machine.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480873369520456642" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI9E6LyrknTxaq0sHtwepIDFbqGn9hsHyz-QuPZdAhtIPe-QOX86YUmMYo3pgL5DF610FgNizMPYZ1SomON8X5BsnFhyphenhyphenwFQMTBImaeqt75htKRPVnkPs0vc2yYUVHkS-AAxwbntYSAh8k/s320/01-virtualbox-create-new-virtual-machine.png" style="display: block; height: 236px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Follow the wizard and on the “VM Name and OS Type” choose the following:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Name: AndroidOS&lt;/li&gt;
&lt;li&gt;Operating System: Linux&lt;/li&gt;
&lt;li&gt;Version: Linux 2.6&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8-SBkny3PcSVGWAOP_nvggDRpxGFVuF3CJRF6Dm-u82cUecYnIALaEB7FQiuoXE2RJRyb4adtDb5AyL62IB54NjJGn0kzg2Qrk_PMfrf271jgv4gjWP_oNBnuQrL6n9pChHyFM1ZPHaA/s1600/02-virtualbox-select-name-operating-system.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480873841560787074" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8-SBkny3PcSVGWAOP_nvggDRpxGFVuF3CJRF6Dm-u82cUecYnIALaEB7FQiuoXE2RJRyb4adtDb5AyL62IB54NjJGn0kzg2Qrk_PMfrf271jgv4gjWP_oNBnuQrL6n9pChHyFM1ZPHaA/s320/02-virtualbox-select-name-operating-system.png" style="cursor: pointer; display: block; height: 237px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
On the next screen, we select the virtual machine's amount of memory. 
Since we are talking about a mobile phone OS, I chose only 128MB.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjia83WWO2UFqv36-dD2bPkvsod0ELSoq-nxSLm42jLAPt2QGFd4i4kOroTUBW1ztM7Uq4YN6zAQlMA_VvyofkYE2wYigkYufxQ7CnTIbwGv3MSBdQCMOS0fzyLX2EZiGMNbLfwPyUI0lI/s1600/03-virtualbox-memory.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480874353229690242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjia83WWO2UFqv36-dD2bPkvsod0ELSoq-nxSLm42jLAPt2QGFd4i4kOroTUBW1ztM7Uq4YN6zAQlMA_VvyofkYE2wYigkYufxQ7CnTIbwGv3MSBdQCMOS0fzyLX2EZiGMNbLfwPyUI0lI/s320/03-virtualbox-memory.png" style="cursor: pointer; display: block; height: 234px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Next, we select the hard disk image that will be used to host our new virtual machine. Select the “Create new hard disk” option.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzWXVwN2PCHhTDJU9qTxwRj_rPgGyPiP9wHSvNz2tgBELP6TbEBrASo5_DRoD1K22XMzG6D1LYTdt3RoQKIJF10vKqvLrmKst7wUR0vsl3kpExeyjMIVo7BDkvl_gV0WH1qQonm7mEh4c/s1600/04-virtualbox-hard-disk.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480874708031805602" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzWXVwN2PCHhTDJU9qTxwRj_rPgGyPiP9wHSvNz2tgBELP6TbEBrASo5_DRoD1K22XMzG6D1LYTdt3RoQKIJF10vKqvLrmKst7wUR0vsl3kpExeyjMIVo7BDkvl_gV0WH1qQonm7mEh4c/s320/04-virtualbox-hard-disk.png" style="cursor: pointer; display: block; height: 238px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
That will launch the “Create New Virtual Disk” wizard.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht8Dq991wRnp10OEPjhv_rYmGNC8oAfZxBCmQtskUBRLWDHB3ylZZLyKjgDfwmOO5_pxBZ1FBF3oCe8fjVZ0t93uy9aVXIkbnP4YRAzelILP13UbET35CFAr9-eziRy2DKKrRucbKyKBA/s1600/05-virtualbox-new-virtual-disk.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480874981663197154" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht8Dq991wRnp10OEPjhv_rYmGNC8oAfZxBCmQtskUBRLWDHB3ylZZLyKjgDfwmOO5_pxBZ1FBF3oCe8fjVZ0t93uy9aVXIkbnP4YRAzelILP13UbET35CFAr9-eziRy2DKKrRucbKyKBA/s320/05-virtualbox-new-virtual-disk.png" style="cursor: pointer; display: block; height: 234px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
We then have to select the hard disk's storage type. I chose “Fixed-size
 storage”. That will reserve all the configured disk amount up front and
 will not allow the machine's disk to expand.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixwByCUl5lD58GakJ7V2e4r2vBy5WVWVYhFcsoq4TdcsQMug8P0uYPbpMtX-R815-1saKo7sSWTyPIjSLonJp7ZHlH_RtjXfE28zUhbhkCQ2Gc_cddR9_7YGdhGSGZUjEsRsbBbeG2R8E/s1600/06-virtualbox-storage-type.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480875148207333762" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixwByCUl5lD58GakJ7V2e4r2vBy5WVWVYhFcsoq4TdcsQMug8P0uYPbpMtX-R815-1saKo7sSWTyPIjSLonJp7ZHlH_RtjXfE28zUhbhkCQ2Gc_cddR9_7YGdhGSGZUjEsRsbBbeG2R8E/s320/06-virtualbox-storage-type.png" style="cursor: pointer; display: block; height: 238px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Next, we select the disk's location and size. The location should be 
“AndroidOS”, since that is the new virtual machine we have created for 
Android. I chose 512MB for the hard disk. Again, remember that we are 
talking about a mobile phone OS here.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6caEhR4C3BxA_DYewBobF-cJ1FM32v8n4fLpAS1inMvccho-yZPYWBS_9Vqv-0H7EaCjaY7NuWCt7SCsKUyJ96Zl3p__x-3gerNzt2JUjVdZNrB7Ju4zrJ1egnjHadUilA_uHXbGBs70/s1600/07-virtualbox-disk-location-size.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480875700409492722" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6caEhR4C3BxA_DYewBobF-cJ1FM32v8n4fLpAS1inMvccho-yZPYWBS_9Vqv-0H7EaCjaY7NuWCt7SCsKUyJ96Zl3p__x-3gerNzt2JUjVdZNrB7Ju4zrJ1egnjHadUilA_uHXbGBs70/s320/07-virtualbox-disk-location-size.png" style="cursor: pointer; display: block; height: 236px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
After all these, we get a screen with the summary of our new hard disk configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgROqO3Q0imUbKaiHuIZF48cf3LHj1G0YB1KdpyCX9x-5lCt_NJkL5O8wcDKVQwebspxCCZq4p6EIuVm38xwLcdlvpQnvKuXvX0kMKKEAP8sySAEvn5wIWGf0DeDL1NuYA8zGXCKh6r6vY/s1600/08-virtualbox-summary.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480875862801622114" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgROqO3Q0imUbKaiHuIZF48cf3LHj1G0YB1KdpyCX9x-5lCt_NJkL5O8wcDKVQwebspxCCZq4p6EIuVm38xwLcdlvpQnvKuXvX0kMKKEAP8sySAEvn5wIWGf0DeDL1NuYA8zGXCKh6r6vY/s320/08-virtualbox-summary.png" style="cursor: pointer; display: block; height: 236px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
After we click finish, we are presented with the new virtual machine's 
configuration summary. If everything looks OK, hit “Finish” to create 
the VM.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUpurg4xSEe9DEmzi-VRpcqz2yhx3DnYrkP9E-kS7bMAzErxdOWI2sairv9FaiKvV2WxqIhg0931UE76mF1BhNUeoNgdyw83m9nOC2MoIvG0H_qak9N0cMJHT4UFyZzoiDEHZaQy7LQXk/s1600/09-virtualbox-virtual-machine-summary.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480876092264008226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUpurg4xSEe9DEmzi-VRpcqz2yhx3DnYrkP9E-kS7bMAzErxdOWI2sairv9FaiKvV2WxqIhg0931UE76mF1BhNUeoNgdyw83m9nOC2MoIvG0H_qak9N0cMJHT4UFyZzoiDEHZaQy7LQXk/s320/09-virtualbox-virtual-machine-summary.png" style="cursor: pointer; display: block; height: 237px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
After the machine is created, you will see it in the left panel. Select 
it and hit the “Start” button to power it up. Since this will be the 
first time this machine boots, the “First Run Wizard” will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiawtq5bXCB8PncrHup9WVXnfrm3T78GSmpi_iHuJBn032cDxHzi4RAPS1OYmnJdGMEw1A7J6JPafBrEVlEWtdpURnYaa6EjoeIalcnUbRbUgtbPjMhYLQIfOeX8GZCbz5UpuPK1aThHRY/s1600/10-virtualbox-first-run-wizard.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480876272987088354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiawtq5bXCB8PncrHup9WVXnfrm3T78GSmpi_iHuJBn032cDxHzi4RAPS1OYmnJdGMEw1A7J6JPafBrEVlEWtdpURnYaa6EjoeIalcnUbRbUgtbPjMhYLQIfOeX8GZCbz5UpuPK1aThHRY/s320/10-virtualbox-first-run-wizard.png" style="cursor: pointer; display: block; height: 274px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
We have to select the installation media, i.e. the source from which the
 machine will boot and will be used for the installation. That will be 
the ISO file we have created, so hit on the folder button on the right 
side of the “Media Source” subpanel.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipC9JY_0zdq5trXkl99clJjSEfLI8G4iIgYliJqxviv6ENojTIjdzz2RPKNb-ARrcEwZet8TlIK94LLBT8gdkaXHVwr6mfKFXc7wqoWp532a56xk7c_v7smHYpRoAKu4rpmcO6D9DeS-4/s1600/11-virtualbox-select-installation-media.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480876552683391874" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipC9JY_0zdq5trXkl99clJjSEfLI8G4iIgYliJqxviv6ENojTIjdzz2RPKNb-ARrcEwZet8TlIK94LLBT8gdkaXHVwr6mfKFXc7wqoWp532a56xk7c_v7smHYpRoAKu4rpmcO6D9DeS-4/s320/11-virtualbox-select-installation-media.png" style="cursor: pointer; display: block; height: 274px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The “Virtual Media Manager” screen appears. Hit on the “Add” button, we want to add a new media source.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxvhnvVWjp4ByEejF1eF4ONYSh6nvyYGDSdXWuk-XAROoutLh9yTFPj4NmjKk1VCYazyVLhtTvkBAHQtHD0dZ8HyNKln7meFA1ZLnL4vMk5sNqgzVql2ySdLFXbz04LxwP8A_TeoBl2uQ/s1600/12-virtualbox-media-manager.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480876795856631746" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxvhnvVWjp4ByEejF1eF4ONYSh6nvyYGDSdXWuk-XAROoutLh9yTFPj4NmjKk1VCYazyVLhtTvkBAHQtHD0dZ8HyNKln7meFA1ZLnL4vMk5sNqgzVql2ySdLFXbz04LxwP8A_TeoBl2uQ/s320/12-virtualbox-media-manager.png" style="cursor: pointer; display: block; height: 250px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In the new window, browse to the location of the joint ISO file (named 
“liveandroidv0.3.iso”) and select it for our media source.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgigTkStrcvYCdKzwYOrejHpwgVFX391Eaw3s5ERs5qhwL3QdpC_4ZZNHwKgSJ3c73q1DlTljxjVSbDjRQFWPaU9fHfJiT8BEPJlSFKYytYy0HoZgDWTgFOAQ6BSRhYM5horcAzxCrxjcc/s1600/13-virtualbox-select-iso.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480876973628805938" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgigTkStrcvYCdKzwYOrejHpwgVFX391Eaw3s5ERs5qhwL3QdpC_4ZZNHwKgSJ3c73q1DlTljxjVSbDjRQFWPaU9fHfJiT8BEPJlSFKYytYy0HoZgDWTgFOAQ6BSRhYM5horcAzxCrxjcc/s320/13-virtualbox-select-iso.png" style="cursor: pointer; display: block; height: 237px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Once it is selected, click “Next” to continue.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzUVdTqVKJA_tKIj9RJLti0gYQhh70TLgWSCbzRmB0YuYvVhwp7yivzIdcIvmdZKqfMWO7WQyMa1qA4XIP4IMCGnsJ6oAnX3sAZ6EAhpQeyGXdrYnA79NDyJjROT5qxLxjtiQiw0jXbRY/s1600/14-virtualbox-select-installation-media.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480877142546597266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzUVdTqVKJA_tKIj9RJLti0gYQhh70TLgWSCbzRmB0YuYvVhwp7yivzIdcIvmdZKqfMWO7WQyMa1qA4XIP4IMCGnsJ6oAnX3sAZ6EAhpQeyGXdrYnA79NDyJjROT5qxLxjtiQiw0jXbRY/s320/14-virtualbox-select-installation-media.png" style="cursor: pointer; display: block; height: 237px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The summary page of the “First Run Wizard” appears, listing our option. Hit “Finish” to proceed. &lt;br /&gt;
&lt;br /&gt;
The virtual machine will boot from the provided ISO file and after a 
number of messages, you will see a screen prompting you to choose the 
desired screen size. (Ignore any messages regarding the color depth 
settings).&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxmMjCv40Q9KYCCcxoTSw1wHmWDuRCScZEvGCs_8p-pBOpCkw-ZLbDv5luvh_CoP4UKHce6d9QRMyPjKgQ0YGQ6TrihLXnGVrqmkZ9fMHY6daYUymS2H8luI2QiC8NdLY9glgMTu5UMPU/s1600/16-virtualbox-boot-screen.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480877328791967794" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxmMjCv40Q9KYCCcxoTSw1wHmWDuRCScZEvGCs_8p-pBOpCkw-ZLbDv5luvh_CoP4UKHce6d9QRMyPjKgQ0YGQ6TrihLXnGVrqmkZ9fMHY6daYUymS2H8luI2QiC8NdLY9glgMTu5UMPU/s320/16-virtualbox-boot-screen.png" style="cursor: pointer; display: block; height: 273px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Choose the desired screen size (I chose 800x600) and press “Enter”. The first screen of your new OS will appear. Well done!&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpho_uwWC-qPSPVBHbs-W9nWuTEXuEvW2k4gcfeSKCXO4G110bASXJa4_q3wkqln_fjq_EoWz9NIkTTVxy3fI52xM6xIKQhJZtXb6t7lejtGLo_qMfOgw-uw_dVWvp0UBeFkSc3MtRdDk/s1600/17-virtualbox-os-first-screen.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480877634059346834" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpho_uwWC-qPSPVBHbs-W9nWuTEXuEvW2k4gcfeSKCXO4G110bASXJa4_q3wkqln_fjq_EoWz9NIkTTVxy3fI52xM6xIKQhJZtXb6t7lejtGLo_qMfOgw-uw_dVWvp0UBeFkSc3MtRdDk/s320/17-virtualbox-os-first-screen.png" style="cursor: pointer; display: block; height: 270px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can play with the Android OS, checking out its cool features. Fire up the Browser (it is based on &lt;a href="http://en.wikipedia.org/wiki/WebKit"&gt;WebKit&lt;/a&gt;
 if I am not mistaken). The home page is Google, obviously. Start typing
 a new address and hit the “Go” button that will appear. I have to admit
 that the available web browser is much more powerful than I believed it
 was. &lt;br /&gt;
&lt;br /&gt;
Here's how our &lt;a href="http://javacodegeeks.blogspot.com/"&gt;home page&lt;/a&gt; looks like:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD2CiUgNsE2BOQxXnwVsq7JPtMMbjyY1XfLreiBns3rRSgnjUzn3KqJMnxF-dvBUQVlWujvc435hZG0IVD2sazxOBYdF8qAoOtYqX4yz7eheOmT1MydSKVxoAkbs4D3Vd9Wzcw6AcofQE/s1600/18-virtualbox-android-javacodegeeks-blog.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5480877959719971746" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD2CiUgNsE2BOQxXnwVsq7JPtMMbjyY1XfLreiBns3rRSgnjUzn3KqJMnxF-dvBUQVlWujvc435hZG0IVD2sazxOBYdF8qAoOtYqX4yz7eheOmT1MydSKVxoAkbs4D3Vd9Wzcw6AcofQE/s320/18-virtualbox-android-javacodegeeks-blog.png" style="display: block; height: 263px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="0" height="360" src="http://www.youtube.com/embed/ikegCusEClU?feature=player_detailpage" width="640"&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="0" height="360" src="http://www.youtube.com/embed/ltadM2qRmoM?feature=player_detailpage" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;
Read More Details:- &lt;a href="http://www.javacodegeeks.com/2010/06/install-android-os-on-pc-with.html"&gt;http://www.javacodegeeks.com/2010/06/install-android-os-on-pc-with.html&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI9E6LyrknTxaq0sHtwepIDFbqGn9hsHyz-QuPZdAhtIPe-QOX86YUmMYo3pgL5DF610FgNizMPYZ1SomON8X5BsnFhyphenhyphenwFQMTBImaeqt75htKRPVnkPs0vc2yYUVHkS-AAxwbntYSAh8k/s72-c/01-virtualbox-create-new-virtual-machine.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Android Touch Tutorials</title><link>http://google-androidlovers.blogspot.com/2012/08/android-touch-tutorials.html</link><category>Lars Vogel</category><category>touch</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Fri, 10 Aug 2012 14:26:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-981569918847865703</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2 class="title"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - by Lars Vogel&lt;/h2&gt;
&lt;h2 class="title"&gt;
1.&amp;nbsp;Android Touch
                     &lt;/h2&gt;
&lt;div class="section"&gt;
               &lt;div class="titlepage"&gt;
                  &lt;div&gt;
                     &lt;div&gt;
                        &lt;h3 class="title"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="touch_overview"&gt;&lt;/a&gt;1.1.&amp;nbsp;Android Basics 
                        &lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
Touch is an important input method for Android devices.
                  The standard UI components (View) already support touch without the
                  need
                  of the developer to interfere. This article describes how to
                  implement a touch interface in your Android application.
                  
               &lt;br /&gt;

               The base class for touch support is the class "MotionEvent".
                  MotionEvent contains the touch related information. To react to touch
                  events in your view or your activity you override the method
                  "onTouchEvent()". This method must return a boolean value which
                  indicates if the touch event has been consumed (true) or if the
                  framework should still react to the touch event (false). If single
                  input is used you can use the methods getX() and getY() to get the
                  current position. Via getAction() you receive the action which was
                  performed.
                  
               &lt;br /&gt;

               &lt;div class="table"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="d3929e71"&gt;&lt;/a&gt;&lt;div class="title"&gt;
&lt;b&gt;Table&amp;nbsp;1.&amp;nbsp;Sample Table&lt;/b&gt;&lt;/div&gt;
&lt;div class="table-contents"&gt;
                     &lt;table border="1" summary="Sample Table"&gt;
                        &lt;colgroup&gt;
                           &lt;col align="left" class="c1"&gt;&lt;/col&gt;
                           &lt;col align="left" class="c2"&gt;&lt;/col&gt;
                        &lt;/colgroup&gt;
                        &lt;thead&gt;
&lt;tr&gt;
                              &lt;th align="left"&gt;Event&lt;/th&gt;
                              &lt;th align="left"&gt;Description&lt;/th&gt;
                           &lt;/tr&gt;
&lt;/thead&gt;
                        &lt;tbody&gt;
&lt;tr&gt;
                              &lt;td align="left"&gt;MotionEvent.ACTION_DOWN&lt;/td&gt;
                              &lt;td align="left"&gt;New touch started&lt;/td&gt;
                           &lt;/tr&gt;
&lt;tr&gt;
                              &lt;td align="left"&gt;MotionEvent.ACTION_MOVE&lt;/td&gt;
                              &lt;td align="left"&gt;Finger is moving&lt;/td&gt;
                           &lt;/tr&gt;
&lt;tr&gt;
                              &lt;td align="left"&gt;MotionEvent.ACTION_UP&lt;/td&gt;
                              &lt;td align="left"&gt;Finger went up&lt;/td&gt;
                           &lt;/tr&gt;
&lt;tr&gt;
                              &lt;td align="left"&gt;MotionEvent.ACTION_OUTSIDE&lt;/td&gt;
                              &lt;td align="left"&gt;Finger is leaving the UI component&lt;/td&gt;
                           &lt;/tr&gt;
&lt;/tbody&gt;
                     &lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br class="table-break" /&gt;
                  Multitouch was
                  introduced in Android 2.0 and has been improved in
                  each Android version. This tutorial focus currently on SingleTouch
                  and it is planned to extend this for multitouch.
                  
               &lt;br /&gt;

            &lt;/div&gt;
&lt;div class="section"&gt;
               &lt;div class="titlepage"&gt;
                  &lt;div&gt;
                     &lt;div&gt;
                        &lt;h3 class="title"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="touch_basics"&gt;&lt;/a&gt;1.2.&amp;nbsp;Android Basics 
                        &lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
The following assumes that you have already basic knowledge in
                  &lt;a class="ulink" href="http://www.vogella.com/articles/Android/article.html" target="_top"&gt; Android development&lt;/a&gt;.
                  
               &lt;br /&gt;

            &lt;/div&gt;
&lt;div class="section"&gt;
            &lt;div class="titlepage"&gt;
               &lt;div&gt;
                  &lt;div&gt;
                     &lt;h2 class="title"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="singletouch"&gt;&lt;/a&gt;2.&amp;nbsp;Singletouch Example
                     &lt;/h2&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
We will demonstrate Singletouch via an example with an own view.
               Create the Android project "de.vogella.android.touch.single" with the
               activity "SingleTouchView".
               
            &lt;br /&gt;

             Create the following view class "SingleTouchEventView".&lt;br /&gt;

            
               
            &lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="programlisting"&gt;&lt;span class="hl-keyword"&gt;package&lt;/span&gt; de.vogella.android.touch.single;

&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.content.Context;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.graphics.Canvas;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.graphics.Color;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.graphics.Paint;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.graphics.Path;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.util.AttributeSet;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.view.MotionEvent;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.view.View;

&lt;span class="hl-keyword"&gt;public&lt;/span&gt; &lt;span class="hl-keyword"&gt;class&lt;/span&gt; SingleTouchEventView &lt;span class="hl-keyword"&gt;extends&lt;/span&gt; View {
  &lt;span class="hl-keyword"&gt;private&lt;/span&gt; Paint paint = &lt;span class="hl-keyword"&gt;new&lt;/span&gt; Paint();
  &lt;span class="hl-keyword"&gt;private&lt;/span&gt; Path path = &lt;span class="hl-keyword"&gt;new&lt;/span&gt; Path();

  &lt;span class="hl-keyword"&gt;public&lt;/span&gt; SingleTouchEventView(Context context, AttributeSet attrs) {
    &lt;span class="hl-keyword"&gt;super&lt;/span&gt;(context, attrs);

    paint.setAntiAlias(true);
    paint.setStrokeWidth(&lt;span class="hl-number"&gt;6f&lt;/span&gt;);
    paint.setColor(Color.WHITE);
    paint.setStyle(Paint.Style.STROKE);
    paint.setStrokeJoin(Paint.Join.ROUND);
  }

  &lt;em&gt;&lt;span class="hl-annotation" style="color: grey;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
  &lt;span class="hl-keyword"&gt;protected&lt;/span&gt; &lt;span class="hl-keyword"&gt;void&lt;/span&gt; onDraw(Canvas canvas) {
    canvas.drawPath(path, paint);
  }

  &lt;em&gt;&lt;span class="hl-annotation" style="color: grey;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
  &lt;span class="hl-keyword"&gt;public&lt;/span&gt; &lt;span class="hl-keyword"&gt;boolean&lt;/span&gt; onTouchEvent(MotionEvent event) {
    &lt;span class="hl-keyword"&gt;float&lt;/span&gt; eventX = event.getX();
    &lt;span class="hl-keyword"&gt;float&lt;/span&gt; eventY = event.getY();

    &lt;span class="hl-keyword"&gt;switch&lt;/span&gt; (event.getAction()) {
    &lt;span class="hl-keyword"&gt;case&lt;/span&gt; MotionEvent.ACTION_DOWN:
      path.moveTo(eventX, eventY);
      &lt;span class="hl-keyword"&gt;return&lt;/span&gt; true;
    &lt;span class="hl-keyword"&gt;case&lt;/span&gt; MotionEvent.ACTION_MOVE:
      path.lineTo(eventX, eventY);
      &lt;span class="hl-keyword"&gt;break&lt;/span&gt;;
    &lt;span class="hl-keyword"&gt;case&lt;/span&gt; MotionEvent.ACTION_UP:
      &lt;em class="hl-comment" style="color: #008800;"&gt;// nothing to do&lt;/em&gt;
      &lt;span class="hl-keyword"&gt;break&lt;/span&gt;;
    &lt;span class="hl-keyword"&gt;default&lt;/span&gt;:
      &lt;span class="hl-keyword"&gt;return&lt;/span&gt; false;
    }

    &lt;em class="hl-comment" style="color: #008800;"&gt;// Schedules a repaint.&lt;/em&gt;
    invalidate();
    &lt;span class="hl-keyword"&gt;return&lt;/span&gt; true;
  }
} &lt;/pre&gt;
&lt;br /&gt;
 Add this view to your activity.&lt;br /&gt;

               
            &lt;br /&gt;
&lt;pre class="programlisting"&gt;&lt;span class="hl-keyword"&gt;package&lt;/span&gt; de.vogella.android.touch.single;

&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.app.Activity;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.os.Bundle;

&lt;span class="hl-keyword"&gt;public&lt;/span&gt; &lt;span class="hl-keyword"&gt;class&lt;/span&gt; SingleTouchActivity &lt;span class="hl-keyword"&gt;extends&lt;/span&gt; Activity {
  &lt;div class="hl-tag" style="color: #008800;"&gt;
/** Called when the activity is first created. */&lt;/div&gt;
&lt;em&gt;&lt;span class="hl-annotation" style="color: grey;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
  &lt;span class="hl-keyword"&gt;public&lt;/span&gt; &lt;span class="hl-keyword"&gt;void&lt;/span&gt; onCreate(Bundle savedInstanceState) {
    &lt;span class="hl-keyword"&gt;super&lt;/span&gt;.onCreate(savedInstanceState);
    setContentView(&lt;span class="hl-keyword"&gt;new&lt;/span&gt; SingleTouchEventView(&lt;span class="hl-keyword"&gt;this&lt;/span&gt;, null));
  }
} &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;

             If you run your application you will be able to draw on the
               screen with your finger (or with the mouse in the emulator).
            &lt;br /&gt;
&lt;h2 class="title"&gt;
3.&amp;nbsp;ScaleGestureDetector
                     &lt;/h2&gt;
The ScaleGestureDetector class allows to determine the
               predefined gesture of increasing, decreasing the size of the object.
               
            &lt;br /&gt;

             Create the Android project
               "de.vogella.android.touch.scaledetector" and the Activity
               "ScaleDetectorTest" and create the following view class
               "ImageViewWithZoom".
               
            &lt;br /&gt;

            
               
            &lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="programlisting"&gt;&lt;span class="hl-keyword"&gt;package&lt;/span&gt; de.vogella.android.touch.scaledetector;

&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.content.Context;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.graphics.Canvas;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.graphics.drawable.Drawable;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.view.MotionEvent;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.view.ScaleGestureDetector;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.view.View;

&lt;span class="hl-keyword"&gt;public&lt;/span&gt; &lt;span class="hl-keyword"&gt;class&lt;/span&gt; ImageViewWithZoom &lt;span class="hl-keyword"&gt;extends&lt;/span&gt; View {
  &lt;span class="hl-keyword"&gt;private&lt;/span&gt; Drawable image;
  &lt;span class="hl-keyword"&gt;private&lt;/span&gt; &lt;span class="hl-keyword"&gt;float&lt;/span&gt; scaleFactor = &lt;span class="hl-number"&gt;1.0f&lt;/span&gt;;
  &lt;span class="hl-keyword"&gt;private&lt;/span&gt; ScaleGestureDetector scaleGestureDetector;

  &lt;span class="hl-keyword"&gt;public&lt;/span&gt; ImageViewWithZoom(Context context) {
    &lt;span class="hl-keyword"&gt;super&lt;/span&gt;(context);
    image = context.getResources().getDrawable(R.drawable.icon);
    setFocusable(true);
    image.setBounds(&lt;span class="hl-number"&gt;0&lt;/span&gt;, &lt;span class="hl-number"&gt;0&lt;/span&gt;, image.getIntrinsicWidth(),
        image.getIntrinsicHeight());
    scaleGestureDetector = &lt;span class="hl-keyword"&gt;new&lt;/span&gt; ScaleGestureDetector(context,
        &lt;span class="hl-keyword"&gt;new&lt;/span&gt; ScaleListener());
  }

  &lt;em&gt;&lt;span class="hl-annotation" style="color: grey;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
  &lt;span class="hl-keyword"&gt;protected&lt;/span&gt; &lt;span class="hl-keyword"&gt;void&lt;/span&gt; onDraw(Canvas canvas) {
    &lt;span class="hl-keyword"&gt;super&lt;/span&gt;.onDraw(canvas);
    &lt;em class="hl-comment" style="color: #008800;"&gt;// Set the image bounderies&lt;/em&gt;
    canvas.save();
    canvas.scale(scaleFactor, scaleFactor);
    image.draw(canvas);
    canvas.restore();
  }

  &lt;em&gt;&lt;span class="hl-annotation" style="color: grey;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
  &lt;span class="hl-keyword"&gt;public&lt;/span&gt; &lt;span class="hl-keyword"&gt;boolean&lt;/span&gt; onTouchEvent(MotionEvent event) {
    scaleGestureDetector.onTouchEvent(event);
    invalidate();
    &lt;span class="hl-keyword"&gt;return&lt;/span&gt; true;
  }

  &lt;span class="hl-keyword"&gt;private&lt;/span&gt; &lt;span class="hl-keyword"&gt;class&lt;/span&gt; ScaleListener &lt;span class="hl-keyword"&gt;extends&lt;/span&gt;
      ScaleGestureDetector.SimpleOnScaleGestureListener {
    &lt;em&gt;&lt;span class="hl-annotation" style="color: grey;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
    &lt;span class="hl-keyword"&gt;public&lt;/span&gt; &lt;span class="hl-keyword"&gt;boolean&lt;/span&gt; onScale(ScaleGestureDetector detector) {
      scaleFactor *= detector.getScaleFactor();

      &lt;em class="hl-comment" style="color: #008800;"&gt;// Don't let the object get too small or too large.&lt;/em&gt;
      scaleFactor = Math.max(&lt;span class="hl-number"&gt;0.1f&lt;/span&gt;, Math.min(scaleFactor, &lt;span class="hl-number"&gt;5.0f&lt;/span&gt;));

      invalidate();
      &lt;span class="hl-keyword"&gt;return&lt;/span&gt; true;
    }
  }
} &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;

             Add this view to your activity.&lt;br /&gt;

            
               
            &lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="programlisting"&gt;&lt;span class="hl-keyword"&gt;package&lt;/span&gt; de.vogella.android.touch.scaledetector;

&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.app.Activity;
&lt;span class="hl-keyword"&gt;import&lt;/span&gt; android.os.Bundle;

&lt;span class="hl-keyword"&gt;public&lt;/span&gt; &lt;span class="hl-keyword"&gt;class&lt;/span&gt; ScaleDetectorTest &lt;span class="hl-keyword"&gt;extends&lt;/span&gt; Activity {
  &lt;div class="hl-tag" style="color: #008800;"&gt;
/** Called when the activity is first created. */&lt;/div&gt;
&lt;em&gt;&lt;span class="hl-annotation" style="color: grey;"&gt;@Override&lt;/span&gt;&lt;/em&gt;
  &lt;span class="hl-keyword"&gt;public&lt;/span&gt; &lt;span class="hl-keyword"&gt;void&lt;/span&gt; onCreate(Bundle savedInstanceState) {
    &lt;span class="hl-keyword"&gt;super&lt;/span&gt;.onCreate(savedInstanceState);
    setContentView(&lt;span class="hl-keyword"&gt;new&lt;/span&gt; ImageViewWithZoom(&lt;span class="hl-keyword"&gt;this&lt;/span&gt;));
  }
} &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;

             If you run your application zyou should be able to shrink /
               enlarge the image via a multi-touch gesture (pitch zoom).&lt;br /&gt;
&lt;br /&gt;
Sources:- &lt;a href="http://www.vogella.com/articles"&gt;http://www.vogella.com/articles&lt;/a&gt; &lt;br /&gt;

         &lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Solved 53 common Android problems</title><link>http://google-androidlovers.blogspot.com/2012/08/solved-53-common-android-problems.html</link><category>Android Problems</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Wed, 8 Aug 2012 01:56:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-4011512053362227658</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h3&gt;
1/ How do I stop my Android phone using data when abroad?&lt;/h3&gt;
One option is a third party app called APNdroid, from the Android 
Market, which lets you turn off all data connections via a widget on the
 home screen. It makes changing these settings much quicker than using 
the standard Android settings screen and is more likely to act as a 
reminder for when you next travel abroad.&lt;br /&gt;

&lt;h3&gt;
2/ My Android phone has frozen.&lt;/h3&gt;
A soft reset will usually do the trick, but there are different 
methods for different phones. Fast Reboot is an app that will do the job
 for you by simulating the soft reset process and closing running 
processes with one tap.&lt;br /&gt;

&lt;h3&gt;
3/ Why can I not download every Android app from the Android Market?&lt;/h3&gt;
Some apps are designed for specific screen resolutions and thus are not available on all phones. The high-end &lt;a href="http://www.littlegreenrobot.co.uk/phones"&gt;Android phones&lt;/a&gt;
 tend to support more apps, but landscape screened phones sometimes have
 problems with particular games and apps. There are other reasons why 
some apps will not be available, such as compatibility only with 
specific manufacturer’s devices, but the vast majority of apps should be
 available for all phones so you need not worry too much.&lt;br /&gt;

&lt;h3&gt;
4/ My smartphone Wi-Fi does not stay connected?&lt;/h3&gt;
Go to Wireless &amp;amp; Networks / Wi-Fi Settings and press the menu 
key. Choose ‘Advanced’ and change the sleep policy to ‘Never’. This 
seems to solve the problem for most people who have issues keeping a 
Wi-Fi connection alive.&lt;br /&gt;

&lt;a href="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/cache.jpg"&gt;&lt;img alt="53 common Android problems solved" class="alignnone size-full wp-image-3340" height="480" src="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/cache.jpg" title="53 common Android problems solved" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;

&lt;h3&gt;
5/ Why do I keep running out of memory?&lt;/h3&gt;
There are many reasons for this problem, but the cache can often get 
too full to allow the efficient running of apps. Apps like Cache 
Cleaner, from the Android Market, let you clean the cache for specific 
apps to free up memory. You will also need to either uninstall or move 
apps to an expansion card to free up more physical memory.&lt;br /&gt;

&lt;h3&gt;
6/ I am using too much data. How can I monitor it?&lt;/h3&gt;
My Data Manager is an excellent solution to monitor exactly how much 
data you have been using. It offers alerts when you reach a specified 
level and will help to ensure that you never go over your monthly data 
allowance again.&lt;br /&gt;

&lt;h3&gt;
7/ The keyboard is very difficult to use!&lt;/h3&gt;
The default Android keyboard is not easy to use, but there are 
countless alternatives available. SlideIt is just one example that lets 
you type without ever removing your finger from the screen; simply slide
 your finger between letters and watch the magic happen.&lt;br /&gt;

&lt;h3&gt;
8/ My SD card is no longer recognised?&lt;/h3&gt;
Expansion cards can get corrupted and the most effective solution is 
to try to reformat them using a desktop or laptop PC. Using the standard
 file explorer, you should be able to right-click and choose the format 
option to bring it back to life. It tends to work more often than trying
 to format it on the phone itself.&lt;br /&gt;

&lt;h3&gt;
9/ My screen is difficult to see in bright sunlight.&lt;/h3&gt;
The best option is to look for an ‘anti-glare’ screen protector. They
 tend to be stronger than standard protectors, but crucially also reduce
 the amount of glare on the screen when lighting conditions are extreme.
 Sadly there is no complete solution for phones that include screens not
 easily viewable in bright sunlight.&lt;br /&gt;

&lt;h3&gt;
10/ Some games play very slowly on my phone?&lt;/h3&gt;
Some of the budget phones include slower processors and the graphics 
speed can be reduced because of this. The best solution is to test a 
phone before you buy it because some budget phones are much better than 
others, and it can be difficult to tell just from the specifications 
alone.&lt;br /&gt;

&lt;h3&gt;
11/ How do I remove apps?&lt;/h3&gt;
Go to Settings / Applications / Manage Applications and then select the app you wish to uninstall. Now tap the Uninstall icon.&lt;br /&gt;

&lt;h3&gt;
12/ My screen has cracked! Should I buy a new phone?&lt;/h3&gt;
Most of the popular phones have parts available from various online 
suppliers that you can install yourself. The process for replacing a 
screen is far from easy so do your research before you buy.&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/pattern.jpg"&gt;&lt;img alt="53 common Android problems solved" class="alignnone size-full wp-image-3368" height="480" src="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/pattern.jpg" title="53 common Android problems solved" width="320" /&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h3&gt;
13/ Entering my password takes forever!&lt;/h3&gt;
In Settings / Security / Set up screen lock, you can choose to enter a
 pattern rather than a password which is not only quicker, but much more
 secure.&lt;br /&gt;

&lt;h3&gt;
14/ My location is not always accurate in maps?&lt;/h3&gt;
Go to Settings / Location and make sure that the ‘Use GPS satellites’
 option is ticked. This will ensure much greater accuracy when 
navigating.&lt;br /&gt;

&lt;h3&gt;
15/ The flashing LED is very annoying!&lt;/h3&gt;
It is easy to stop the LED notification on most Android phones. 
Simply go to Settings / Display / Notification flash and remove all of 
the ticks.&lt;br /&gt;

&lt;h3&gt;
16/ How do I wipe my Android smartphone completely?&lt;/h3&gt;
The best way is to use the Factory Data restore option in Settings / 
SD &amp;amp; phone storage. To be completely sure that everything has been 
removed, go through the process twice.&lt;br /&gt;

&lt;h3&gt;
17/ Why can I not use the Android Market on my tablet?&lt;/h3&gt;
Some tablets come with their own cut-down app market or even none at 
all. It may be that the Android version installed is too old or the 
hardware is simply to slow to cope with many apps. Always do your 
research before you buy.&lt;br /&gt;

&lt;h3&gt;
18/ Some of my Kindle books look garbled on my Android tablet?&lt;/h3&gt;
This can happen if you are using a custom ROM on your Android phone 
or tablet. The ROM provider may have a solution, but if not you will 
need to revert back to the standard ROM to read your books properly.&lt;br /&gt;

&lt;h3&gt;
19/ I dropped my phone in water!!!&lt;/h3&gt;
This solution won’t help if it has already happened, but if it does 
in the future take the battery out as quickly as possible and dry as 
many parts of the phone as you can. Leave it for 72 hours in a dry room 
and try it again. It may just work.&lt;br /&gt;

&lt;h3&gt;
20/ Can I make the text on my Android smartphone bigger?&lt;/h3&gt;
Yes. In apps like the browser you can go to the settings and use the 
‘Set text size’ option to increase the size of the displayed text. There
 are some excellent accessibility options available in the Android 
Market as well which will help.&lt;br /&gt;

&lt;h3&gt;
21/ Can I update my apps automatically?&lt;/h3&gt;
In the Market app, go to ‘My Apps’ via the menu and select an app. 
You will see an option half-way down the screen allowing it to 
auto-update. Only use this for apps you trust.&lt;br /&gt;

&lt;h3&gt;
22/ Where did my paid apps go?&lt;/h3&gt;
If you change your phone and some apps do not appear in your Android 
Market account check to make sure they are compatible. If they are not 
showing after a system update, the Market may be seeing your phone as 
not tied to your account. This would be the time to contact Market 
support.&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/age.jpg"&gt;&lt;img alt="53 common Android problems solved" class="alignnone size-full wp-image-3328" height="480" src="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/age.jpg" title="53 common Android problems solved" width="320" /&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h3&gt;
23/ How do I set the minimum age for apps?&lt;/h3&gt;
Go the the Market app and press the menu key. Choose ‘Settings’ and 
then ‘ Content filtering’. You can now choose which apps are allowed on 
your phone.&lt;br /&gt;

&lt;h3&gt;
24/ My touchscreen isn’t accurate anymore?&lt;/h3&gt;
Very few Android phones allow you to calibrate the screen which means
 that if you are having problems hitting the right spot on your screen, 
you will need to try a soft reset, a hard reset and then a support call 
(in that order) to fix it.&lt;br /&gt;

&lt;h3&gt;
25/ I want to hide my search history.&lt;/h3&gt;
Go to www.google.com/history in your Android browser and login. You 
can now choose to remove your searches and not save future searches from
 this page.&lt;br /&gt;

&lt;h3&gt;
26/ How do I take screenshots?&lt;/h3&gt;
Some &lt;a href="http://www.littlegreenrobot.co.uk/?s=samsung"&gt;Samsung phones&lt;/a&gt;
 let you press the back key and the home button twice to take 
screenshots, but for all other Android phones you will need to download 
and install the Android develop kit. It is a complicated process just to
 grab screenshots.&lt;br /&gt;

&lt;h3&gt;
27/ How do I download music directly to my phone or tablet?&lt;/h3&gt;
Amazon MP3, from the Android Market, is a very good option and lets 
you purchase and install MP3 files directly to your phone without the 
need of a PC.&lt;br /&gt;

&lt;h3&gt;
28/ I cannot upgrade my Android phone to a new release!&lt;/h3&gt;
Sadly not all phone manufacturers allow updates to the latest Android
 release on their phones, but custom ROMs often let users update to the 
newest features. A search on the internet will show what’s available, 
but you need to be confident of your knowledge when installing these 
ROMs.&lt;br /&gt;

&lt;h3&gt;
29/ My carrier won’t let me tether my phone.&lt;/h3&gt;
This is true of most carriers, but there are solutions that can help. If you do a simple search in the &lt;a href="http://www.littlegreenrobot.co.uk/tutorials/discover-the-android-market/" title="Discover the Android Market"&gt;Android Market&lt;/a&gt;
 for ‘tether’ you will be offered a variety of apps that allow 
tethering, and many also mask the fact you are tethering so your carrier
 should never know. We don’t advise masked tethering and cannot 
guarantee its success, but it may work for some.&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/move.jpg"&gt;&lt;img alt="53 common Android problems solved" class="alignnone size-full wp-image-3363" height="480" src="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/move.jpg" title="53 common Android problems solved" width="320" /&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h3&gt;
30/ Some apps won’t install to my SD card?&lt;/h3&gt;
You should still be able to move apps to an SD card using the Manage 
Application feature in Settings / Applications. We have seen apps fail 
to install on an expansion card despite the fact they can be moved 
afterwards so a little manual intervention may be required to do this 
for future installations.&lt;br /&gt;

&lt;h3&gt;
31/ How can I change the language on my phone?&lt;/h3&gt;
Go to Settings / Language &amp;amp; keyboard and choose the language you 
require. Some apps are only set to work properly if US English is 
selected, but they are fortunately few and far between.&lt;br /&gt;

&lt;h3&gt;
32/ Can I remove apps that were pre-installed on my phone?&lt;/h3&gt;
You can, but the process requires rooting the device and then 
downloading an app called Root Uninstaller. The amount of memory you 
will save is probably not worth the effort though because you run the 
danger of making your phone very unstable.&lt;br /&gt;

&lt;h3&gt;
33/ Can I speed up my Android phone?&lt;/h3&gt;
Apps like SetCPU will let you speed up your phone by overclocking the
 processor. It will also let you slow down the processor to save memory,
 but be careful when doing this. Most processors are designed to run at a
 set maximum speed for a reason and you do run the risk of frying it if 
you push it too hard.&lt;br /&gt;

&lt;h3&gt;
34/ What’s the best way to backup my phone?&lt;/h3&gt;
You can backup an Android phone using a multitude of different 
solutions, but Titanium Backup PRO is considered to be one of the best 
solutions available. Besides offering the ability to backup every part 
of your phone, you can also export the backups by email or sync them to 
Dropbox.&lt;br /&gt;

&lt;h3&gt;
35/ How can I stop viruses from attacking my phone?&lt;/h3&gt;
Mobile security is becoming a bigger issue as smartphones become more
 popular and so installing an app to help keep you protected is a very 
good idea. Kaspersky Mobile Security is just one example that claims to 
offer real-time protection against a host of threats.&lt;br /&gt;

&lt;h3&gt;
36/ The volume on my phone is too quiet.&lt;/h3&gt;
Some Android phones suffer from low volume, but help is at hand from 
AudioBoost which is available from the Android market. It can increase 
the volume on your phone by up to 30% and is also activated by a handy 
home screen widget.&lt;br /&gt;

&lt;h3&gt;
37/ Can I change the look of my phone without changing the ROM?&lt;/h3&gt;
You can indeed. Apps like LauncherPro offer a completely different 
look to the standard Android interface and also include many features 
such as 3D effects and a scrollable shortcut dock. It is safer than 
changing the ROM completely.&lt;br /&gt;

&lt;h3&gt;
38/ The Live Wallpaper seems to use too much battery life?&lt;/h3&gt;
In tests the battery drain has been shown to be low with Live 
Wallpapers, but it is still a problem for power users who run out of 
battery power every day. The simple answer is to use a static wallpaper.&lt;br /&gt;

&lt;a href="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/clock.jpg"&gt;&lt;img alt="53 common Android problems solved" class="alignnone size-full wp-image-3342" height="480" src="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/clock.jpg" title="53 common Android problems solved" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;

&lt;h3&gt;
39/ My clock keeps losing time?&lt;/h3&gt;
This can happen if your clock is set to automatically update the time
 from your network. If the network clock is slow, so will your phone be.
 Go to Settings / Date &amp;amp; time and untick the ‘Automatic’ box at the 
top. Your clock should now run perfectly on time with only manual 
adjustments needed occasionally.&lt;br /&gt;

&lt;h3&gt;
40/ Can I block unwanted callers?&lt;/h3&gt;
Most network providers do not offer this facility, but because 
Android can be tweaked in so many ways there are still options open to 
you. Extreme Call Blocker Droid works on many Android phone models and 
blocks incoming calls in almost every way imaginable. It is not the 
cheapest Android app available, but works extremely well and can save 
you a lot of headaches in the future.&lt;br /&gt;

&lt;h3&gt;
41/ My phone is slow at times. Are there any tools to help?&lt;/h3&gt;
The first step would be to remove any unnecessary apps and to ensure 
that your phone is not full of data you do not need. An app like System 
Tuner Pro can also help by automatically tuning many parts of your phone
 to ensure the best possible performance.&lt;br /&gt;

&lt;h3&gt;
42/ Why can’t I use the SD card when my phone is attached to the PC?&lt;/h3&gt;
By default this is not possible, but if you have rooted your phone 
you can use an app like Multi Mount SD-Card which lets you access an 
expansion card from both a PC and phone at the same time. It works very 
well and this is in spite of our natural concern about accessing a card 
from two places at once which could in theory lead to corrupted files.&lt;br /&gt;

&lt;h3&gt;
43/ My phone has been stolen. Can I track it?&lt;/h3&gt;
If your phone has already been stolen you will struggle to get it 
back. This is, however, a case of prevention rather than cure and we 
would advise installing a third party app to help track your phone. 
PhoneLocator Pro is a good example and includes the ability to remotely 
track a phone using GPS as well as letting you wipe or lock the phone. 
Everyone should use a solution like this.&lt;br /&gt;

&lt;h3&gt;
44/ Why can’t I use iTunes with my Android device?&lt;/h3&gt;
You won’t be able to use DRM protected media on your Android device, but you can &lt;a href="http://www.littlegreenrobot.co.uk/tutorials/how-to-sync-android-with-itunes/" title="How to sync Android with iTunes"&gt;still use iTunes&lt;/a&gt;
 thanks to doubleTwist AirSync. It lets you synchronise your media 
between iTunes and an Android phone or tablet and you can do so without a
 physical connection. It is as good, if not better, than the Apple iOS 
syncing solution.&lt;br /&gt;

&lt;h3&gt;
&lt;a href="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/stop.jpg"&gt;&lt;img alt="53 common Android problems solved" class="alignnone size-full wp-image-3376" height="480" src="http://www.littlegreenrobot.co.uk/wp-content/uploads/2013/01/stop.jpg" title="53 common Android problems solved" width="320" /&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h3&gt;
45/ How do I close an app that keeps freezing my phone?&lt;/h3&gt;
The solution is unfortunately more complex than it should be. Go to 
Settings / Applications and choose ‘Manage applications’. Now choose the
 app that is misbehaving from the list and tap ‘Force stop’. If the app 
continues to misbehave you should try uninstalling and reinstalling it.&lt;br /&gt;

&lt;h3&gt;
46/ Can I close running apps quickly?&lt;/h3&gt;
The default task manager in Android is a good solution, but it could 
be much quicker. Advanced Task Manager is the most popular tool to deal 
with running apps and lets you manage all of your running apps with a 
couple of taps. After a while the process become so natural that you 
will forget you are even using it.&lt;br /&gt;

&lt;h3&gt;
47/ My phone won’t connect to my PC using USB?&lt;/h3&gt;
Most Android phones will connect without problem to a PC, but on 
occasion they will run into trouble. The first place to look is the 
manufacturer’s website to find the required drivers to connect it. They 
are not always available and so you may need to send in a support 
request to get them.&lt;br /&gt;

&lt;h3&gt;
48/ Why does auto-correct not know all the words I need to use?&lt;/h3&gt;
There is no way that an auto-correct system can know all of the words
 you need to use, but you can add new ones quickly and easily. Type a 
word and look for the ‘+’ sign below the text field. Tap it and the word
 will be added to your dictionary for future use. The more words you 
add, the more accurate your typing will become.&lt;br /&gt;

&lt;h3&gt;
49/ The slide unlock feature is really annoying!&lt;/h3&gt;
You can avoid the slide unlock by tapping the menu button twice. Not 
all phones support this because some manufacturers add their own skins, 
but the majority should allow this simple and quick workaround.&lt;br /&gt;

&lt;h3&gt;
50/ Switching between keyboards takes forever!&lt;/h3&gt;
If you have more than one keyboard installed it can appear to be 
cumbersome to switch between them, but it need not be so. Simply press 
and hold the ‘123’ button on the keyboard and you will be offered a 
selection to switch to. It only takes a second.&lt;br /&gt;

&lt;h3&gt;
51/ Why does my screen turn off when charging?&lt;/h3&gt;
It doesn’t have to and the solution is very simple. Go to Settings / 
Applications / Development and tick the ‘Stay awake’ option to keep the 
screen on when charging.&lt;br /&gt;

&lt;h3&gt;
52/ Can I reinstall a paid app?&lt;/h3&gt;
You can. If an app is misbehaving, the last resort is to uninstall it
 and then reinstall it which often resolves the problem. Go to the 
Android Market and click on the ‘My Market Account’ link. You will see 
an orders tab which should include a list of the apps you have 
previously purchased. Choose an app and then tap ‘Install’ to complete 
the process. The Market should not charge you for the reinstall.&lt;br /&gt;

&lt;h3&gt;
53/ How do I know if I have the latest version of Android on my phone?&lt;/h3&gt;
Go to Settings / About phone and choose ‘System software updates’. 
Here you will see a ‘Check now’ icon to see if there is a newer version 
of Android available for your phone.&lt;br /&gt;
&lt;br /&gt;
Sources:- &lt;a href="http://www.littlegreenrobot.co.uk/"&gt;http://www.littlegreenrobot.co.uk/&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Text-To-Speech in Android</title><link>http://google-androidlovers.blogspot.com/2012/08/text-to-speech-in-android.html</link><category>Text to Speech</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Wed, 8 Aug 2012 01:44:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-664825497625797972</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
The Android text to speech engine still seems to be a pretty underused 
resource in Android apps. However, implementing it in your own 
applications is straightforward. There are a few potential issues and 
choices you need to consider, but for most purposes, the process is not a
 complex one. In this tutorial we jump around a bit within one Android 
Activity, but don’t worry, the complete code is listed at the end. The 
aim is to give you a clear idea of the what’s going on at each 
processing stage so that you can successfully use the function in any 
app.&lt;/div&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;/div&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="java keyword"&gt;import&lt;/code&gt; &lt;code class="java plain"&gt;android.app.Activity;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="java keyword"&gt;import&lt;/code&gt; &lt;code class="java plain"&gt;android.os.Bundle;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="java keyword"&gt;import&lt;/code&gt; &lt;code class="java plain"&gt;android.view.View.OnClickListener;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="java keyword"&gt;import&lt;/code&gt; &lt;code class="java plain"&gt;android.widget.Button;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="java keyword"&gt;import&lt;/code&gt; &lt;code class="java plain"&gt;android.view.View;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="java keyword"&gt;import&lt;/code&gt; &lt;code class="java plain"&gt;android.widget.EditText;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="java keyword"&gt;import&lt;/code&gt; &lt;code class="java plain"&gt;android.speech.tts.TextToSpeech;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="java keyword"&gt;import&lt;/code&gt; &lt;code class="java plain"&gt;android.speech.tts.TextToSpeech.OnInitListener;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;code class="java keyword"&gt;import&lt;/code&gt; &lt;code class="java plain"&gt;android.content.Intent;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;code class="java keyword"&gt;import&lt;/code&gt; &lt;code class="java plain"&gt;java.util.Locale;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;code class="java keyword"&gt;import&lt;/code&gt; &lt;code class="java plain"&gt;android.widget.Toast;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
&lt;code class="java keyword"&gt;public&lt;/code&gt; &lt;code class="java keyword"&gt;class&lt;/code&gt; &lt;code class="java plain"&gt;SpeakingAndroid &lt;/code&gt;&lt;code class="java keyword"&gt;extends&lt;/code&gt; &lt;code class="java plain"&gt;Activity &lt;/code&gt;&lt;code class="java keyword"&gt;implements&lt;/code&gt; &lt;code class="java plain"&gt;OnClickListener, OnInitListener {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//TTS object&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;private&lt;/code&gt; &lt;code class="java plain"&gt;TextToSpeech myTTS;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//status check code&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;private&lt;/code&gt; &lt;code class="java keyword"&gt;int&lt;/code&gt; &lt;code class="java plain"&gt;MY_DATA_CHECK_CODE = &lt;/code&gt;&lt;code class="java value"&gt;0&lt;/code&gt;&lt;code class="java plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//create the Activity&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;public&lt;/code&gt; &lt;code class="java keyword"&gt;void&lt;/code&gt; &lt;code class="java plain"&gt;onCreate(Bundle savedInstanceState) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="line number23 index22 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;super&lt;/code&gt;&lt;code class="java plain"&gt;.onCreate(savedInstanceState);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number24 index23 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;setContentView(R.layout.main);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number25 index24 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="line number26 index25 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//get a reference to the button element listed in the XML layout&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number27 index26 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;Button speakButton = (Button)findViewById(R.id.speak);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number28 index27 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//listen for clicks&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number29 index28 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;speakButton.setOnClickListener(&lt;/code&gt;&lt;code class="java keyword"&gt;this&lt;/code&gt;&lt;code class="java plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number30 index29 alt1"&gt;
&lt;/div&gt;
&lt;div class="line number31 index30 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//check for TTS data&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number32 index31 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;Intent checkTTSIntent = &lt;/code&gt;&lt;code class="java keyword"&gt;new&lt;/code&gt; &lt;code class="java plain"&gt;Intent();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number33 index32 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;checkTTSIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number34 index33 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;startActivityForResult(checkTTSIntent, MY_DATA_CHECK_CODE);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number35 index34 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number36 index35 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="line number37 index36 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//respond to button clicks&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number38 index37 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;public&lt;/code&gt; &lt;code class="java keyword"&gt;void&lt;/code&gt; &lt;code class="java plain"&gt;onClick(View v) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number39 index38 alt2"&gt;
&lt;/div&gt;
&lt;div class="line number40 index39 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//get the text entered&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number41 index40 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;EditText enteredText = (EditText)findViewById(R.id.enter);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number42 index41 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;String words = enteredText.getText().toString();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number43 index42 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;speakWords(words);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number44 index43 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number45 index44 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="line number46 index45 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//speak the user text&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number47 index46 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;private&lt;/code&gt; &lt;code class="java keyword"&gt;void&lt;/code&gt; &lt;code class="java plain"&gt;speakWords(String speech) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number48 index47 alt1"&gt;
&lt;/div&gt;
&lt;div class="line number49 index48 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//speak straight away&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number50 index49 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;myTTS.speak(speech, TextToSpeech.QUEUE_FLUSH, &lt;/code&gt;&lt;code class="java keyword"&gt;null&lt;/code&gt;&lt;code class="java plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number51 index50 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number52 index51 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="line number53 index52 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//act on result of TTS data check&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number54 index53 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;protected&lt;/code&gt; &lt;code class="java keyword"&gt;void&lt;/code&gt; &lt;code class="java plain"&gt;onActivityResult(&lt;/code&gt;&lt;code class="java keyword"&gt;int&lt;/code&gt; &lt;code class="java plain"&gt;requestCode, &lt;/code&gt;&lt;code class="java keyword"&gt;int&lt;/code&gt; &lt;code class="java plain"&gt;resultCode, Intent data) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number55 index54 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="line number56 index55 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;if&lt;/code&gt; &lt;code class="java plain"&gt;(requestCode == MY_DATA_CHECK_CODE) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number57 index56 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;if&lt;/code&gt; &lt;code class="java plain"&gt;(resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number58 index57 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//the user has the necessary data - create the TTS&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number59 index58 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;myTTS = &lt;/code&gt;&lt;code class="java keyword"&gt;new&lt;/code&gt; &lt;code class="java plain"&gt;TextToSpeech(&lt;/code&gt;&lt;code class="java keyword"&gt;this&lt;/code&gt;&lt;code class="java plain"&gt;, &lt;/code&gt;&lt;code class="java keyword"&gt;this&lt;/code&gt;&lt;code class="java plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number60 index59 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number61 index60 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;else&lt;/code&gt; &lt;code class="java plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number62 index61 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//no data - install it now&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number63 index62 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;Intent installTTSIntent = &lt;/code&gt;&lt;code class="java keyword"&gt;new&lt;/code&gt; &lt;code class="java plain"&gt;Intent();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number64 index63 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;installTTSIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number65 index64 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;startActivity(installTTSIntent);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number66 index65 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number67 index66 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number68 index67 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number69 index68 alt2"&gt;
&lt;/div&gt;
&lt;div class="line number70 index69 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//setup TTS&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number71 index70 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;public&lt;/code&gt; &lt;code class="java keyword"&gt;void&lt;/code&gt; &lt;code class="java plain"&gt;onInit(&lt;/code&gt;&lt;code class="java keyword"&gt;int&lt;/code&gt; &lt;code class="java plain"&gt;initStatus) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number72 index71 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="line number73 index72 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java comments"&gt;//check for successful instantiation&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number74 index73 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;if&lt;/code&gt; &lt;code class="java plain"&gt;(initStatus == TextToSpeech.SUCCESS) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number75 index74 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;if&lt;/code&gt;&lt;code class="java plain"&gt;(myTTS.isLanguageAvailable(Locale.US)==TextToSpeech.LANG_AVAILABLE)&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number76 index75 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;myTTS.setLanguage(Locale.US);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number77 index76 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number78 index77 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java keyword"&gt;else&lt;/code&gt; &lt;code class="java keyword"&gt;if&lt;/code&gt; &lt;code class="java plain"&gt;(initStatus == TextToSpeech.ERROR) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number79 index78 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;Toast.makeText(&lt;/code&gt;&lt;code class="java keyword"&gt;this&lt;/code&gt;&lt;code class="java plain"&gt;, &lt;/code&gt;&lt;code class="java string"&gt;"Sorry! Text To Speech failed..."&lt;/code&gt;&lt;code class="java plain"&gt;, Toast.LENGTH_LONG).show();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number80 index79 alt1"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number81 index80 alt2"&gt;
&lt;code class="java spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="java plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number82 index81 alt1"&gt;
&lt;code class="java plain"&gt;}&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code class="java plain"&gt; &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number82 index81 alt1"&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="0" height="360" src="http://www.youtube.com/embed/JRwJkN0ncSo?feature=player_embedded" width="640"&gt;&lt;/iframe&gt;

Remember to use your own class name and to indicate your application 
package at the top of the file. If you are using Eclipse, you should not
 need to add all of the import statements manually, as the IDE will 
insert some of them automatically. Run your app in the Android emulator 
and hear it in action.&lt;br /&gt;
&lt;br /&gt;
This is a basic overview of implementing Text To Speech in your 
Android apps. The TTS resource provides a wide range of additional 
options you may want to explore depending on the nature of your apps. 
When calling the TextToSpeech object “speak” method for example, you can
 pass a HashMap object indicating the details of more complex playback 
options.
&lt;/div&gt;
&lt;div class="line number82 index81 alt1" style="font-family: Arial,Helvetica,sans-serif;"&gt;
&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;code class="java plain"&gt;Official Android text to speech Documentation. &lt;a href="http://android-developers.blogspot.com/2009/09/introduction-to-text-to-speech-in.html"&gt;Details&amp;nbsp;&lt;/a&gt;&lt;/code&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number82 index81 alt1" style="font-family: Arial,Helvetica,sans-serif;"&gt;
&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;code class="java plain"&gt;Mobile tut plus tutorials. &lt;a href="http://mobile.tutsplus.com/tutorials/android/android-sdk-using-the-text-to-speech-engine/"&gt;Details &lt;/a&gt;&lt;/code&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number82 index81 alt1" style="font-family: Arial,Helvetica,sans-serif;"&gt;
&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;code class="java plain"&gt;Android Hive full video and code. &lt;a href="http://www.androidhive.info/2012/01/android-text-to-speech-tutorial/"&gt;Details&lt;/a&gt;&lt;/code&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/JRwJkN0ncSo/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>A Faster Emulator with Better Hardware Support</title><link>http://google-androidlovers.blogspot.com/2012/08/a-faster-emulator-with-better-hardware.html</link><category>emulator</category><category>hardware</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Sun, 5 Aug 2012 22:51:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-3615431791313613624</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;i&gt;[This post is by Xavier Ducrohet and Reto Meier of the Android engineering team. — Tim Bray.]&lt;/i&gt;&lt;/div&gt;
The Android emulator is a key tool for Android developers in building and testing their apps. As the power and diversity of Android devices has grown quickly,  it’s been hard for the emulator keep pace. &lt;br /&gt;
Today we’re thrilled to announce several significant improvements to the emulator, including a dramatic performance upgrade and support for a broader range of hardware features, notably sensors and multi-finger input.&lt;br /&gt;
&lt;h3&gt;
Added GPU Support&lt;/h3&gt;
The system image we’re shipping today has built-in GPU support (Android 4.0.3 r2).  With Android’s growing reliance on using the GPU to improve performance, the difference is significant.  In the video below,   the emulator is still interpreting ARM instructions; the performance boost is the effect of putting the GPU to work.&lt;br /&gt;
&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/T--vFtyZvc4" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;
As a bonus, since we’re now supporting OpenGL ES 2.0, your OpenGL games can now run inside the emulator. &lt;br /&gt;
Please note that there are a lot of GPUs out there, and we haven’t tested all of them for this beta release, so let us know if you have &lt;a href="http://code.google.com/p/android/issues/entry?template=Tools%20GPU%20bug%20report"&gt;feedback&lt;/a&gt; or encounter issues. &lt;br /&gt;
&lt;h3&gt;
More Hardware Feature Emulation&lt;/h3&gt;
The hardware features of mobile devices are a significant part of what makes them a unique platform for development, so we’re also pleased to announce that in addition to the camera support we added last year, it’s now possible to use a tethered Android device to supply inputs for sensors and multi-touch input.&lt;br /&gt;
We’re working on providing emulator support for more hardware features including Bluetooth and NFC.&lt;br /&gt;
&lt;h3&gt;
Improved CPU Performance&lt;/h3&gt;
We’ve also improved the CPU performance of the Android emulator.  Hardware floating point operation has been available for system images since Ice Cream Sandwich (Android 4.0), allowing CPU operations to be emulated roughly twice as quickly.&lt;br /&gt;
Last week’s r17 developer tools release included x86 system images and host drivers (available through the SDK Manager), allowing the emulator to access the host CPU natively and offer significantly faster execution.&lt;br /&gt;
This video shows a CPU-bound application on two emulators running the same system image, one with virtualization, one without.&lt;br /&gt;
&lt;script type="text/javascript"&gt;
ch_client = "dharmakshetri";
ch_width = 550;
ch_height = 250;
ch_type = "mpu";
ch_sid = "Chitika Default";
ch_color_site_link = "0000CC";
ch_color_title = "0000CC";
ch_color_border = "FFFFFF";
ch_color_text = "000000";
ch_color_bg = "FFFFFF";
&lt;/script&gt;
&lt;script src="http://scripts.chitika.net/eminimalls/amm.js" type="text/javascript"&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/1gnQX_izOrk" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;h3&gt;
Building a modern emulator&lt;/h3&gt;
Because the Android platform allows deep interaction between applications, and with system components, we need to provide an emulator with a complete system image.  Our emulator virtualizes a complete device: hardware, kernel, low-level system libraries, and app framework.&lt;br /&gt;
Of course, the system being emulated typically has an ARM CPU; historically, we’d been emulating those instructions in software, and that worked OK until the advent of tablet support with additional animations and complexity in Android 3.0.&lt;br /&gt;
The missing pieces were the completion of Android x86 support, and the GPU support in last week’s release of SDK Tools r17.  This works by funneling the OpenGL ES 2.0 instructions from the emulator to the host OS, converted to standard OpenGL 2.0, and running natively on the host GPU.&lt;br /&gt;
&lt;h3&gt;
Conclusion&lt;/h3&gt;
The Android ecosystem has a lot of devices in many different form factors. Developers need a good way of testing these apps without having to own everything out there and a fast, rich Android emulator is immensely helpful.&lt;br /&gt;
We hope that these new improvements will make the emulator a more useful tool in your development and testing, and look forward to improving it further for you.&lt;br /&gt;
&lt;br /&gt;
Sources:- &lt;a href="http://www.developer.android.com/"&gt;www.developer.android.com&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/T--vFtyZvc4/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><georss:featurename xmlns:georss="http://www.georss.org/georss">Kathmandu 44600, Nepal</georss:featurename><georss:point xmlns:georss="http://www.georss.org/georss">27.7 85.3333333</georss:point><georss:box xmlns:georss="http://www.georss.org/georss">27.6437645 85.254369300000008 27.7562355 85.4122973</georss:box></item><item><title>Close/hide the Android Soft Keyboard in android</title><link>http://google-androidlovers.blogspot.com/2012/08/closehide-android-soft-keyboard-in.html</link><category>Begineer</category><category>keyboad hide</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Thu, 2 Aug 2012 23:17:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-3161450211997554442</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
You can force Android to hide the virtual keyboard using the &lt;a href="http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html"&gt;InputMethodManager&lt;/a&gt;, calling &lt;code&gt;hideSoftInputFromWindow&lt;/code&gt;, passing in the token of the window containing your edit field.

&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="typ"&gt;InputMethodManager&lt;/span&gt;&lt;span class="pln"&gt; imm &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;InputMethodManager&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt;getSystemService&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="typ"&gt;Context&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;INPUT_METHOD_SERVICE&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
imm&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;hideSoftInputFromWindow&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;myEditText&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;getWindowToken&lt;/span&gt;&lt;span class="pun"&gt;(),&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
This will force the keyboard to be hidden in all situations. In some cases you will want to pass in &lt;code&gt;InputMethodManager.HIDE_IMPLICIT_ONLY&lt;/code&gt;
 as the second parameter to ensure you only hide the keyboard when the 
user didn't explicitly force it to appear (by holding down menu).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;or&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="post-text"&gt;
Also useful for hiding the soft keyboard is:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;getWindow&lt;/span&gt;&lt;span class="pun"&gt;().&lt;/span&gt;&lt;span class="pln"&gt;setSoftInputMode&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="typ"&gt;WindowManager&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="typ"&gt;LayoutParams&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;SOFT_INPUT_STATE_ALWAYS_HIDDEN&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
This can be used to suppress the keyboard until the user actually touches the edittext view.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Or&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="post-text"&gt;
Meier's solution works for me too.  In my case
 the top level of my App is a tabHost and I want to hide the keyword 
when switching tabs - I get the window token from the tabHost View.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;&amp;nbsp; &amp;nbsp;tabHost&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;setOnTabChangedListener&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="kwd"&gt;new&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;OnTabChangeListener&lt;/span&gt;&lt;span class="pun"&gt;()&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd"&gt;public&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;void&lt;/span&gt;&lt;span class="pln"&gt; onTabChanged&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;String&lt;/span&gt;&lt;span class="pln"&gt; tabId&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun"&gt;{&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="typ"&gt;InputMethodManager&lt;/span&gt;&lt;span class="pln"&gt; imm &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;InputMethodManager&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;            getSystemService&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="typ"&gt;Context&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;INPUT_METHOD_SERVICE&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imm&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;hideSoftInputFromWindow&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;tabHost&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;getApplication&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="default prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;WindowToken&lt;/span&gt;&lt;span class="pun"&gt;(),&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="pln"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
Official documentation:- &lt;a href="http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html"&gt;http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sources:- &lt;a href="http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard"&gt;http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Getting Started PhoneGap with Android</title><link>http://google-androidlovers.blogspot.com/2012/08/getting-started-phonegap-with-android.html</link><category>PhoneGap</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Thu, 2 Aug 2012 22:50:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-4491851386081815280</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
This guide describes how to set up your development environment for 
Cordova and run a sample application.  Note that Cordova used to be 
called PhoneGap, so some of the sites still use the old PhoneGap name.&lt;br /&gt;
&lt;h2&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="Getting Started with Android_1_requirements"&gt;1. Requirements&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Eclipse 3.4+&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="Getting Started with Android_2_install_sdk_cordova"&gt;2. Install SDK + Cordova&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Download and install &lt;a class="external" href="http://www.eclipse.org/downloads/"&gt;Eclipse Classic&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Download and install &lt;a class="external" href="http://developer.android.com/sdk/index.html"&gt;Android SDK&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Download and install &lt;a class="external" href="http://developer.android.com/sdk/eclipse-adt.html#installing"&gt;ADT Plugin&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Download the latest copy of &lt;a class="external" href="http://phonegap.com/download"&gt;Cordova&lt;/a&gt; and extract its contents. We will be working with the Android directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="Getting Started with Android_3_setup_new_project"&gt; 3. Setup New Project&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Launch Eclipse, and select menu item &lt;b&gt;New Project&lt;/b&gt;
&lt;img alt="" src="http://docs.phonegap.com/en/2.0.0/img/guide/getting-started/android/step_1.png" title="" /&gt;
&lt;/li&gt;
&lt;li&gt;Then specify new application project
&lt;img alt="" src="http://docs.phonegap.com/en/2.0.0/img/guide/getting-started/android/step_2.png" title="" /&gt;
&lt;/li&gt;
&lt;li&gt;Then speciy an Application Name, a Project Name and Package Name with Namespace
&lt;img alt="" src="http://docs.phonegap.com/en/2.0.0/img/guide/getting-started/android/step_3.png" title="" /&gt;
&lt;/li&gt;
&lt;li&gt;Then select a graphic
&lt;img alt="" src="http://docs.phonegap.com/en/2.0.0/img/guide/getting-started/android/step_4.png" title="" /&gt;
&lt;/li&gt;
&lt;li&gt;Then Create a Blank Activity
&lt;img alt="" src="http://docs.phonegap.com/en/2.0.0/img/guide/getting-started/android/step_5.png" title="" /&gt;
&lt;/li&gt;
&lt;li&gt;Make sure the activity doesn't inherit from anything.  You most 
likely won't have PhoneGap on your Eclipse Workspace.  Once this is 
done, click finish&lt;/li&gt;
&lt;li&gt;
In the root directory of your project, create two new directories:&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;b&gt;/libs&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;assets/www&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Copy &lt;b&gt;cordova-2.0.0.js&lt;/b&gt; from your Cordova download earlier to &lt;b&gt;assets/www&lt;/b&gt;
&lt;/li&gt;
&lt;li&gt;Copy &lt;b&gt;cordova-2.0.0.jar&lt;/b&gt; from your Cordova download earlier to &lt;b&gt;/libs&lt;/b&gt;
&lt;/li&gt;
&lt;li&gt;Copy &lt;b&gt;xml&lt;/b&gt; folder from your Cordova download earlier to &lt;b&gt;/res&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;
Verify that &lt;b&gt;cordova-2.0.0.jar&lt;/b&gt; is listed in the Build Path for your project. Right click on the /libs folder and go to &lt;b&gt;Build Paths/ &amp;gt; Configure Build Path...&lt;/b&gt;. Then, in the Libraries tab, add &lt;b&gt;cordova-2.0.0.jar&lt;/b&gt; to the project. If Eclipse is being temperamental, you might need to refresh (F5) the project once again.&lt;br /&gt;


&lt;img alt="" height="284" src="http://docs.phonegap.com/en/2.0.0/img/guide/getting-started/android/buildPath.jpg" title="" width="400" /&gt;&lt;br /&gt;

&lt;/li&gt;
&lt;li&gt;
Edit your project's main Java file found in the &lt;b&gt;src&lt;/b&gt; folder in Eclipse:&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;Add &lt;b&gt;import org.apache.cordova.*;&lt;/b&gt;
&lt;/li&gt;
&lt;li&gt;Change the class's extend from &lt;b&gt;Activity&lt;/b&gt; to &lt;b&gt;DroidGap&lt;/b&gt;
&lt;/li&gt;
&lt;li&gt;Replace the &lt;b&gt;setContentView()&lt;/b&gt; line with &lt;b&gt;super.loadUrl("file:///android_asset/www/index.html");&lt;/b&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;img alt="" height="215" src="http://docs.phonegap.com/en/2.0.0/img/guide/getting-started/android/javaSrc.jpg" title="" width="400" /&gt;&lt;br /&gt;

&lt;/li&gt;
&lt;li&gt;Right click on AndroidManifest.xml and select &lt;b&gt;Open With &amp;gt; Text Editor&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;
Paste the following permissions between the &lt;b&gt;&amp;lt;uses-sdk.../&amp;gt;&lt;/b&gt; and &lt;b&gt;&amp;lt;application.../&amp;gt;&lt;/b&gt; tags.&lt;br /&gt;


&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="tag"&gt;&amp;lt;supports-screens&lt;/span&gt;&lt;span class="pln"&gt; 
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="atn"&gt;android:largeScreens&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"true"&lt;/span&gt;&lt;span class="pln"&gt; 
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="atn"&gt;android:normalScreens&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"true"&lt;/span&gt;&lt;span class="pln"&gt; 
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="atn"&gt;android:smallScreens&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"true"&lt;/span&gt;&lt;span class="pln"&gt; 
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="atn"&gt;android:resizeable&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"true"&lt;/span&gt;&lt;span class="pln"&gt; 
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="atn"&gt;android:anyDensity&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"true"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.VIBRATE"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.ACCESS_&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;COARSE_LOCATION"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.ACCESS_&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;FINE_LOCATION"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.ACCESS_&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;LOCATION_EXTRA_COMMANDS"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.READ_&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;PHONE_STATE"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;INTERNET"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;RECEIVE_SMS"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;RECORD_AUDIO"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;MODIFY_AUDIO_SETTINGS"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;READ_CONTACTS"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;WRITE_CONTACTS"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;WRITE_EXTERNAL_STORAGE"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;ACCESS_NETWORK_STATE"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atn"&gt;name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.GET_ACCOUNTS"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;uses-permission&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="atv"&gt;.BROADCAST_STICKY"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
*Note You are adding a blanket list of permissions to your 
application. You should remove permissions you aren't using before 
submitting your application to Google Play.&lt;br /&gt;

&lt;/li&gt;
&lt;li&gt;
Support orientation changes by pasting the following inside the &lt;b&gt;&amp;lt;activity&amp;gt;&lt;/b&gt; tag.&lt;br /&gt;



&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;android&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="pln"&gt;configChanges&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="str"&gt;"orientation|keyboardHidden|keyboard|&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="str"&gt;screenSize|locale"&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Your AndroidManifest.xml file should look like&lt;br /&gt;



&lt;img alt="" height="400" src="http://docs.phonegap.com/en/2.0.0/img/guide/getting-started/android/manifest.png" title="" width="396" /&gt;&lt;br /&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="Getting Started with Android_4_hello_world"&gt;4. Hello World&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
Create and open a new file named &lt;b&gt;index.html&lt;/b&gt; in the &lt;b&gt;assets/www&lt;/b&gt; directory. Paste the following code:&lt;br /&gt;


&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;span class="dec"&gt;&amp;lt;!DOCTYPE HTML&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;Cordova&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;script&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;type&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"text/javascript"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;charset&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"utf-8"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;src&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"cordova-2.0.0.js"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;Hello World&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="Getting Started with Android_5a_deploy_to_simulator"&gt;5A. Deploy to Simulator&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Right click the project and go to &lt;b&gt;Run As &amp;gt; Android Application&lt;/b&gt;
&lt;/li&gt;
&lt;li&gt;Eclipse will ask you to select an appropriate AVD. If there isn't one, then you'll need to create it.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="Getting Started with Android_5b_deploy_to_device"&gt;5B. Deploy to Device
&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Make sure USB debugging is enabled on your device and plug it into your system. (&lt;b&gt;Settings &amp;gt; Applications &amp;gt; Development&lt;/b&gt;)&lt;/li&gt;
&lt;li&gt;Right click the project and go to &lt;b&gt;Run As &amp;gt; Android Application&lt;/b&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=1033310670787764065" name="Getting Started with Android_done"&gt;Done!&lt;/a&gt;&lt;/h2&gt;
&lt;h2&gt;
&amp;nbsp;From:- &lt;a href="http://docs.phonegap.com/"&gt;http://docs.phonegap.com/&lt;/a&gt;&amp;nbsp;
&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Creating an Android “Hello World” Application with PhoneGap</title><link>http://google-androidlovers.blogspot.com/2012/08/creating-android-hello-world.html</link><category>PhoneGap</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Thu, 2 Aug 2012 22:31:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-8978377948327497486</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
PhoneGap is an open source platform that allows you to create 
cross-platform mobile applications with HTML, JavaScript, and CSS. In 
order to interact with device hardware, PhoneGap provides a JavaScript 
API that will interface with features such as the on-board camera, GPS, 
and accelerometer. Even though PhoneGap is great for developing 
cross-platform applications, the code for developing applications while 
targetting one platform or another will vary. One of the greatest 
differences to overcome is the required software requirements. This 
tutorial will provide an in-depth review of setting up your development 
environment for Android, and will build a simple “Hello World” app.&lt;br /&gt;
&lt;span id="more-2532"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;
PhoneGap Requirements for Android Development&lt;/h2&gt;
&lt;h3&gt;
Java JDK&lt;/h3&gt;
You will need to install the Java Development Kit (JDK). Follow &lt;a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" rel="new"&gt;the official instructions&lt;/a&gt; for setting this up.&lt;br /&gt;
&lt;h3&gt;
Android SDK&lt;/h3&gt;
You will also need the &lt;a href="http://developer.android.com/sdk/index.html" rel="new"&gt;Android Software Development Kit&lt;/a&gt;. When you install the SDK, you will need to set the the android-sdk-&amp;lt;os&amp;gt;/tools for your user PATH variable.&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="System Properties" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image002.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
&lt;h3&gt;
Eclipse&lt;/h3&gt;
You will need to &lt;a href="http://www.eclipse.org/downloads/" rel="new"&gt;download and install&lt;/a&gt; Eclipse if you don’t already have it on your machine.&lt;br /&gt;
&lt;h3&gt;
Eclipse ADT Plugin&lt;/h3&gt;
You will need to also install the ADT plugin for Eclipse. ADT 
(Android Development tools) is a plugin of eclipse which provide a 
complete IDE for developing Android application. ADT lets you create new
 Android projects, and it lets you create Android projects from existing
 source (this is the way we will open our PhoneGap app for android on 
eclipse). Using ADT you can also debug an android application. As ADT is
 well integrated with android SDK running the app from the IDE directly 
launches the android emulator.&lt;br /&gt;
To install ADT click on “install new software” in your Eclipse’s help window and enter the following site to work with: &lt;a href="http://dl-ssl.google.com/android/eclipse/" rel="new"&gt;http://dl-ssl.google.com/android/eclipse/&lt;/a&gt;. Then follow the wizard presented to install ADT.&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="ADT Screen" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image004.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
&lt;h3&gt;
Android Platforms and Components&lt;/h3&gt;
Once you have ADT installed, you will need to install the Android 
platform and other components. To do that, go to menu option 
window-&amp;gt;Android DK and AVD manager and select the platform and API 
level. Android api 2.2 is latest at the time of writing this article.
&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="ADT Configuration" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image006.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
&lt;h3&gt;
Apache Ant&lt;/h3&gt;
If you don’t have apache ant installed you can download it from &lt;a href="http://ant.apache.org/bindownload.cgi" rel="new"&gt;http://ant.apache.org/bindownload.cgi&lt;/a&gt;. To install it you will just extract the downloaded Zip file and set the bin folder in the ant directory in you PATH variable.
&lt;br /&gt;
&lt;h3&gt;
Ruby&lt;/h3&gt;
If you don’t have Ruby installed, you can download it &lt;a href="http://rubyinstaller.org/" rel="new"&gt;from this free installer&lt;/a&gt;. Once installed, add the Ruby/bin path into your account’s PATH variables.
&lt;br /&gt;
&lt;h3&gt;
PhoneGap Framework&lt;/h3&gt;
Of course, you will also need the &lt;a href="http://www.phonegap.com/download/" rel="new"&gt;PhoneGap Framework&lt;/a&gt; itself.
&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="PhoneGap-Android Download" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image008.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
&lt;h2&gt;
Creating Your Development Workspace&lt;/h2&gt;
&lt;h3&gt;
Environment Variables Check:&lt;/h3&gt;
The following paths should be set in you account’s PATH variable:
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;your_system_path/jdk/bin&lt;/li&gt;
&lt;li&gt;your_system_path/android-sdk/tools&lt;/li&gt;
&lt;li&gt;your_system_path/ruby/bin&lt;/li&gt;
&lt;li&gt;your_system_path/apache-ant/bin&lt;/li&gt;
&lt;/ul&gt;
Apart from these, you will need to set the following variables also:
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;JAVA_HOME – path of your JDK directory&lt;/li&gt;
&lt;li&gt;ANT_HOME – path of you apache-ant directory&lt;/li&gt;
&lt;li&gt;ANDROID_HOME – path to your android SDK directory.&lt;/li&gt;
&lt;/ul&gt;
To create a workspace for your PhoneGap app on android, go to the “phonegap-android” folder on the command prompt or terminal:&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;ol class="dp-xml" start="1"&gt;
&lt;li class="alt"&gt;ruby&amp;nbsp;./droidgap&amp;nbsp;"[android_sdk_path]"&amp;nbsp;[name]&amp;nbsp;[package_name]&amp;nbsp;"[www]"&amp;nbsp;"[path]"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;android_sdk_path&lt;/b&gt;: Where you installed the SDK&lt;/li&gt;
&lt;li&gt;&lt;b&gt;name&lt;/b&gt;: The name to give the new application.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;package_name&lt;/b&gt;: The name you want to give to your application.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;www&lt;/b&gt;: The folder from where you want to copy the files of your PhoneGap app.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;path&lt;/b&gt;: The application workspace for your project.&lt;/li&gt;
&lt;/ul&gt;
Once you run the command and if everything goes correct messages as shown below will be seen:
&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="PhoneGap Command Line Android" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image010.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
The above should create a complete workspace for your PhoneGap Android app.
&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Workflow" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image012.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
&lt;h2&gt;
Setup Your Project in Eclipse&lt;/h2&gt;
Once this is done, this workspace can be opened in eclipse. In eclipse choose new project and then choose Android Project.
&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Create Android Eclipse Project" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image014.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
Next select “create project from existing source” and give the project a name as shown below.
&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Configure an Android Eclipse Project" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image016.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
If you try to build and run the project in Eclipse you will get a build 
error. This is because you have not added the external library 
(phonegap.jar) which is created in the libs folder of your workspace.
&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Remove Build Errors" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image018.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
To add that external library right click on the project an select  
Build Path-&amp;gt; Add external archive and then select the phonegap.jar in
 your libs folder.&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Remove Build Errors 2" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image020.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
If all goes well, this should remove all the build errors in your 
project. Now try to run your project in the emulator. You should see the
 screen below. This is because you have not added any PhoneGap HTML or 
JavaScript files in your project.
&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Running the Hello World App" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image022.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
In the assets/www folder of the workspace, there will already be a 
file called phonegap.js. In that folder create a file called index.html 
with the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;!DOCTYPE HTML&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta name="viewport" content="width=320; user-scalable=no" /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="Content-type" content="text/html; charset=utf-8"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;PhoneGap Android App&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type="text/javascript" charset="utf-8" src="phonegap.js"&amp;gt;&amp;lt;/script&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type="text/javascript" charset="utf-8"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var showMessageBox = function() {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; navigator.notification.alert("Hello World of PhoneGap");&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function init(){&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.addEventListener("deviceready", showMessageBox, true);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;/head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;body onload="init();"&amp;nbsp; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;/body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
In the code the line:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;script type="text/javascript" charset="utf-8" src="phonegap.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/blockquote&gt;
includes the phonegap.js file which lets you call native API’s of 
android. On the load of the body the init function registers the 
function showMessageBox on the PhoneGap event deviceready which is 
triggered when phonegap has done the processing to initialized 
everything for your program so that it can call the PhoneGap API’s. The 
showMessageBox function calls the PhoneGap API 
navigator.notification.alert which displays the messagebox on screen. 
Running the app after adding the index.html and refreshing the project 
in Eclipse you will see the following screen:&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Making it an Alert" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image024.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
Now let’s add some more functionality to our app. The following code 
creates a text box to enter the name of the person and a button when 
clicked displays a message box:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;!DOCTYPE HTML&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta name="viewport" content="width=320; user-scalable=no" /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="Content-type" content="text/html; charset=utf-8"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;PhoneGap&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type="text/javascript" charset="utf-8" src="phonegap.js"&amp;gt;&amp;lt;/script&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type="text/javascript" charset="utf-8"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var displayHello = function() {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var name =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById("firstname").value;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; navigator.notification.alert("name" + name);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;/head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;body onload="init();" id="bdy" &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="txt"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input&amp;nbsp;&amp;nbsp; type="text" name="firstname" id="firstname" /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id ="btn"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;a href="#" class="btn" onclick="displayHello();"&amp;gt;Say Hello&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;/body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
In the following line of code we have created a text box where you can enter your name.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;input&amp;nbsp;&amp;nbsp; type="text" name="firstname" id="firstname" /&amp;gt;&lt;/blockquote&gt;
In the line&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;a href="#" class="btn" onclick="displayHello();"&amp;gt;Say Hello&lt;/blockquote&gt;
We have created a link which on click calls the function displayHello 
which fetches the value from the text box and displays a message box 
saying hello to the name entered by the user.
&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Custom Alert Text" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image026.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Final Preview" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image028.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
The GUI shown above does not have any styling to it. You can beautify 
the display and add colors to it using a CSS file. Create a master.css 
in your assets\www folder with the following code:
&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="dp-highlighter"&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#bdy&amp;nbsp; &lt;br /&gt;
&lt;li class="alt"&gt;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background:#F0F0F0;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;#btn&amp;nbsp;a{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border:&amp;nbsp;1px&amp;nbsp;solid&amp;nbsp;#555;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-webkit-border-radius:&amp;nbsp;5px;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border-radius:&amp;nbsp;5px;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text-align:center;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;display:block;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;float:left;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background:#6600CC;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width:308px;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;color:#FFF;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-size:1.1em;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text-decoration:none;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;padding:1.2em&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;margin:3px&amp;nbsp;0px&amp;nbsp;3px&amp;nbsp;5px;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;#txt{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border:&amp;nbsp;1px&amp;nbsp;solid&amp;nbsp;#555;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-webkit-border-radius:&amp;nbsp;5px;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;border-radius:&amp;nbsp;5px;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text-align:center;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;display:block;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;float:left;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background:#00FFCC;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width:308px;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;color:#9ab;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-size:1.1em;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text-decoration:none;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;padding:1.2em&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;margin:3px&amp;nbsp;0px&amp;nbsp;3px&amp;nbsp;5px;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/div&gt;
&lt;br /&gt;
In your index.html add the following line before in your head tags to link to master.css:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8"&amp;gt;&lt;/blockquote&gt;
Now if you run the app you should see a screen like the following:
&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Final Preview" src="http://d339vfjsz5zott.cloudfront.net/69_Android-HelloWorld-PhoneGap/image030.jpg" style="display: inline;" /&gt;
&lt;/div&gt;
&lt;h2&gt;
Conclusion&lt;/h2&gt;
To create a PhoneGap app on Android, a lot of different software has to 
work together. This could mean that you could have trouble setting up 
the complete environment to create a PhoneGap app on Android. However, 
once all the software is in place, you can easily create PhoneGap apps 
using open web standards like HTML, JavaScript, CSS and PhoneGap’s own 
API’s to perform device hardware specific processing. This saves you the
 trouble of learning the native language for Android programming and 
still has much of the power of custom, native built Android apps.&lt;br /&gt;
&lt;br /&gt;
Sources:-&amp;nbsp; &lt;a href="http://mobile.tutsplus.com/tutorials/phonegap/creating-an-android-hello-world-application-with-phonegap/"&gt;http://mobile.tutsplus.com/tutorials/phonegap&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><georss:featurename xmlns:georss="http://www.georss.org/georss">Kathmandu 44600, Nepal</georss:featurename><georss:point xmlns:georss="http://www.georss.org/georss">27.7 85.3333333</georss:point><georss:box xmlns:georss="http://www.georss.org/georss">27.6437645 85.254369300000008 27.7562355 85.4122973</georss:box></item><item><title>Spelling Checker Framework in Android</title><link>http://google-androidlovers.blogspot.com/2012/07/spelling-checker-framework-in-android.html</link><category>Begineer</category><category>Spelling Checker</category><category>Tutorial</category><author>noreply@blogger.com (Chaunri)</author><pubDate>Tue, 31 Jul 2012 21:22:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1033310670787764065.post-5231999632476311741</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
    The Android platform offers a spelling checker framework that lets you implement   
    and access spell checking in your application. The framework is one of the 
    Text Service APIs offered by the Android platform.
&lt;br /&gt;


    To use the framework in your app, you create a special type of Android service that 
    generates a spelling checker &lt;strong&gt;session&lt;/strong&gt; object. Based on text you provide,
    the session object returns spelling suggestions generated by the spelling checker.
&lt;br /&gt;

&lt;h2 id="SpellCheckLifeCycle" style="margin-bottom: 0px;"&gt;
Spell Checker Lifecycle&lt;/h2&gt;
&lt;hr /&gt;

    The following diagram shows the lifecycle of the spelling checker service:
&lt;br /&gt;

&lt;img alt="" height="596" id="figure1" src="http://developer.android.com/resources/articles/images/spellcheck_lifecycle.png" /&gt;&lt;br /&gt;
&amp;nbsp;&lt;strong&gt;Figure 1.&lt;/strong&gt; The spelling checker service lifecycle&lt;br /&gt;
&lt;br /&gt;

    To initiate spell checking, your app starts its implementation of the spelling checker
    service. Clients in your app, such as activities or individual UI elements, request a
    spelling checker session from the service, then use the session to get suggestions for text.
    As a client terminates its operation, it closes its spelling checker session. If necessary, your
    app can shut down the spelling checker service at any time.
&lt;br /&gt;

&lt;h2 id="SpellCheckImplementation" style="margin-bottom: 0px;"&gt;
Implementing a Spell Checker Service&lt;/h2&gt;
&lt;hr /&gt;

    To use the spelling checker framework in your app, add a spelling checker service component including
    the session object definition. You can also add to your app an optional activity that
    controls settings. You must also add an XML metadata file that describes
    the spelling checker service, and add the appropriate elements to your manifest file.
&lt;br /&gt;

&lt;h3 id="SpellCheckCode"&gt;
Spell checker classes&lt;/h3&gt;
Define the service and session object with the following classes:
&lt;br /&gt;
&lt;dl&gt;
&lt;dt&gt;
        A subclass of &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.html"&gt;SpellCheckerService&lt;/a&gt;&lt;/code&gt;
    &lt;/dt&gt;
&lt;dd&gt;
        The &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.html"&gt;SpellCheckerService&lt;/a&gt;&lt;/code&gt; implements both the
        &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/app/Service.html"&gt;Service&lt;/a&gt;&lt;/code&gt; class and the spelling checker framework interface. Within your
        subclass, you must implement the following method:
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.html#createSession%28%29"&gt;createSession()&lt;/a&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;
                A factory method that returns a
                &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.Session.html"&gt;SpellCheckerService.Session&lt;/a&gt;&lt;/code&gt; object to a
                client that wants to do spell checking.
            &lt;/dd&gt;&lt;/dl&gt;
See the
            &lt;a href="http://developer.android.com/resources/samples/SpellChecker/SampleSpellCheckerService/index.html"&gt;
            Spell Checker Service&lt;/a&gt; sample app to learn more about implementing this class.
        &lt;br /&gt;

    &lt;/dd&gt;
&lt;dt&gt;
        An implementation of &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.Session.html"&gt;SpellCheckerService.Session&lt;/a&gt;&lt;/code&gt;
    &lt;/dt&gt;
&lt;dd&gt;
        An object that the spelling checker service provides to clients, to let them pass text to
        the spelling checker and receive suggestions. Within this class, you must implement the
        following methods:
&lt;dl&gt;
&lt;dt&gt;
                &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.Session.html#onCreate%28%29"&gt;onCreate()&lt;/a&gt;&lt;/code&gt;
            &lt;/dt&gt;
&lt;dd&gt;
                Called by the system in response to
                &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.html#createSession%28%29"&gt;createSession()&lt;/a&gt;&lt;/code&gt;. In this
                method, you can initialize the
                &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.Session.html"&gt;SpellCheckerService.Session&lt;/a&gt;&lt;/code&gt; object based on
                the current locale and so forth.
            &lt;/dd&gt;
&lt;dt&gt;
     &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.Session.html#onGetSentenceSuggestionsMultiple%28android.view.textservice.TextInfo[],%20int%29"&gt;onGetSentenceSuggestionsMultiple()&lt;/a&gt;&lt;/code&gt;
            &lt;/dt&gt;
&lt;dd&gt;
                Does the actual spell checking. This method returns an array of
                &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/view/textservice/SentenceSuggestionsInfo.html"&gt;SentenceSuggestionsInfo&lt;/a&gt;&lt;/code&gt; containing
                suggestions for the sentences passed to it.
            &lt;/dd&gt;&lt;/dl&gt;
Optionally, you can implement
            &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.Session.html#onCancel%28%29"&gt;onCancel()&lt;/a&gt;&lt;/code&gt;, which
            handles requests to cancel spell checking,
            &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.Session.html#onGetSuggestions%28android.view.textservice.TextInfo,%20int%29"&gt;onGetSuggestions()&lt;/a&gt;&lt;/code&gt;, which handles a word suggestion request, or
            &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.Session.html#onGetSuggestionsMultiple%28android.view.textservice.TextInfo[],%20int,%20boolean%29"&gt;onGetSuggestionsMultiple()&lt;/a&gt;&lt;/code&gt;, which handles batches of word suggestion requests.
        &lt;br /&gt;

        
            See the
            &lt;a href="http://developer.android.com/resources/samples/SpellChecker/HelloSpellChecker/index.html"&gt;
            Spell Checker Client&lt;/a&gt; sample app to learn more about implementing this class.
        &lt;br /&gt;

    &lt;/dd&gt;&lt;/dl&gt;
&lt;div class="note"&gt;
    &lt;strong&gt;Note:&lt;/strong&gt; You must implement all aspects of spell checking as asynchronous and
    thread-safe. A spelling checker may be called simultaneously by different threads running on
    different cores. The &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.html"&gt;SpellCheckerService&lt;/a&gt;&lt;/code&gt; and
    &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/service/textservice/SpellCheckerService.Session.html"&gt;SpellCheckerService.Session&lt;/a&gt;&lt;/code&gt; take care of this
    automatically.
&lt;/div&gt;
&lt;h3 id="SpellCheckXML"&gt;
Spell checker manifest and metadata&lt;/h3&gt;
In addition to code, you need to provide the appropriate manifest file and a metadata file for
    the spelling checker.
&lt;br /&gt;


    The manifest file defines the application, the service, and the activity for controlling
    settings, as shown in the following snippet:
&lt;br /&gt;

&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;span style="font-size: small;"&gt;&lt;span class="tag"&gt;&amp;lt;manifest&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;xmlns:android&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"http://schemas.android.com/apk/res/android"&lt;/span&gt;&lt;span class="pln"&gt;
    &lt;/span&gt;&lt;span class="atn"&gt;package&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"com.example.android.samplespellcheckerservice"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
    &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;application&lt;/span&gt;&lt;span class="pln"&gt;
        &lt;/span&gt;&lt;span class="atn"&gt;android:label&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"@string/app_name"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
        &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;service&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="atn"&gt;android:label&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"@string/app_name"&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;".SampleSpellCheckerService"&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="atn"&gt;android:permission&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.permission.BIND_TEXT_SERVICE"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;intent-filter&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
                &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;action&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.service.textservice.SpellCheckerService"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/intent-filter&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;

            &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;meta-data&lt;/span&gt;&lt;span class="pln"&gt;
                &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.view.textservice.scs"&lt;/span&gt;&lt;span class="pln"&gt;
                &lt;/span&gt;&lt;span class="atn"&gt;android:resource&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"@xml/spellchecker"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
        &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/service&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;

        &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;activity&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="atn"&gt;android:label&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"@string/sample_settings"&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"SpellCheckerSettingsActivity"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;intent-filter&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
                &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;action&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;android:name&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"android.intent.action.MAIN"&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/intent-filter&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
        &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/activity&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
    &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/application&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
Notice that components that want to use the service must request the permission
    &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/Manifest.permission.html#BIND_TEXT_SERVICE"&gt;BIND_TEXT_SERVICE&lt;/a&gt;&lt;/code&gt; to ensure that only the system binds to
    the service. The service's definition also specifies the &lt;code&gt;spellchecker.xml&lt;/code&gt; metadata
    file, which is described in the next section.
&lt;br /&gt;


    The metadata file &lt;code&gt;spellchecker.xml&lt;/code&gt; contains the following XML:
&lt;br /&gt;

&lt;blockquote class="tr_bq"&gt;
&lt;pre class="prettyprint"&gt;&lt;span class="tag"&gt;&amp;lt;spell-checker&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;xmlns:android&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"http://schemas.android.com/apk/res/android"&lt;/span&gt;&lt;span class="pln"&gt;
        &lt;/span&gt;&lt;span class="atn"&gt;android:label&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"@string/spellchecker_name"&lt;/span&gt;&lt;span class="pln"&gt;
        &lt;/span&gt;&lt;span class="atn"&gt;android:settingsActivity&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"com.example.SpellCheckerSettingsActivity"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
    &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;subtype&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="atn"&gt;android:label&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"@string/subtype_generic"&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="atn"&gt;android:subtypeLocale&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"en”
    /&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
    &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;subtype&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="atn"&gt;android:label&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"@string/subtype_generic"&lt;/span&gt;&lt;span class="pln"&gt;
            &lt;/span&gt;&lt;span class="atn"&gt;android:subtypeLocale&lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="atv"&gt;"fr”
    /&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;
&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/spell-checker&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
The metadata specifies the activity that the spelling checker uses for controlling settings. It
    also defines subtypes for the spelling checker; in this case, the subtypes define locales that
    the spelling checker can handle.
&lt;br /&gt;




&lt;h2 id="SpellCheckClient" style="margin-bottom: 0px;"&gt;
Accessing the Spell Checker Service from a Client&lt;/h2&gt;
&lt;hr /&gt;

    Applications that use &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/widget/TextView.html"&gt;TextView&lt;/a&gt;&lt;/code&gt; views automatically benefit from spell
    checking, because &lt;code&gt;&lt;a href="http://developer.android.com/reference/android/widget/TextView.html"&gt;TextView&lt;/a&gt;&lt;/code&gt; automatically uses a spelling checker. The
    following screenshots show this:&lt;br /&gt;
&lt;br /&gt;

&lt;img alt="" height="45" id="figure2a" src="http://developer.android.com/resources/articles/images/textview_spellcheck_screenshot_1.png" /&gt;
&lt;br /&gt;
&lt;img alt="" height="121" id="figure2b" src="http://developer.android.com/resources/articles/images/textview_spellcheck_screenshot_2.png" /&gt;
&lt;div class="img-caption"&gt;
  &lt;strong&gt;Figure 2.&lt;/strong&gt; Spell checking in TextView.
&lt;/div&gt;
&lt;br /&gt;
However, you may want to interact directly with a spelling checker service in other cases as well.
    The following diagram shows the flow of control for interacting with a spelling checker service:&lt;br /&gt;
&lt;br /&gt;

&lt;img alt="" height="393" id="figure3" src="http://developer.android.com/resources/articles/images/spellcheck_client_flow.png" /&gt;
&lt;div class="img-caption"&gt;
  &lt;strong&gt;Figure 3.&lt;/strong&gt; Interacting with a spelling checker service.
&lt;/div&gt;
&lt;br /&gt;
The &lt;a href="http://developer.android.com/resources/samples/SpellChecker/HelloSpellChecker/index.html"&gt;
    Spell Checker Client&lt;/a&gt; sample app shows how to interact with a spelling checker service. The
    LatinIME input method editor in the Android Open Source Project also contains an example of
    spell checking.&lt;br /&gt;
&lt;br /&gt;
More at:- &lt;a href="http://www.developer.android.com/"&gt;www.developer.android.com&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://feeds.feedburner.com/GoogleAndroidLovers&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><georss:featurename xmlns:georss="http://www.georss.org/georss">Kathmandu 44600, Nepal</georss:featurename><georss:point xmlns:georss="http://www.georss.org/georss">27.7 85.3333333</georss:point><georss:box xmlns:georss="http://www.georss.org/georss">27.6437645 85.254369300000008 27.7562355 85.4122973</georss:box></item></channel></rss>