<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Android Competency Center</title>
	
	<link>http://www.androidcompetencycenter.com</link>
	<description>Tutorials, Tips and tricks, Tools for Android development</description>
	<lastBuildDate>Sat, 26 Dec 2009 14:22:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AndroidCompetencyCenter" /><feedburner:info uri="androidcompetencycenter" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>JSON Parsing in android</title>
		<link>http://feedproxy.google.com/~r/AndroidCompetencyCenter/~3/U13Rb9b6wPo/</link>
		<comments>http://www.androidcompetencycenter.com/2009/10/json-parsing-in-android/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 12:21:13 +0000</pubDate>
		<dc:creator>zeeshan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Android API]]></category>
		<category><![CDATA[Mobile Market]]></category>
		<category><![CDATA[-1]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[parse]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[to]]></category>

		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=462</guid>
		<description><![CDATA[
Let&#8217;s look at  how to parse  JSON  objects in android
1&#62;   First we&#8217;ll need an example :
Lets look at a standard example from the json site http://json.org/example.html

     {"menu": {
				  "id": "file",
				  "value": "File",
				  "popup": {
				    "menuitem": [
				     [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 	 	 --></p>
<p>Let&#8217;s look at  how to parse  JSON  objects in android</p>
<p>1&gt;   First we&#8217;ll need an example :</p>
<p>Lets look at a standard example from the json site <a href="http://json.org/example.html">http://json.org/example.html</a></p>
<pre name="code"  class="java">
     {"menu": {
				  "id": "file",
				  "value": "File",
				  "popup": {
				    "menuitem": [
				      {"value": "New", "onclick": "CreateNewDoc()"},
				      {"value": "Open", "onclick": "OpenDoc()"},
				      {"value": "Close", "onclick": "CloseDoc()"}
				    ]
				  }
				}}
</pre>
<p>you could either save this in a file or save it in a string&#8230;..like I&#8217;ve done</p>
<p>2&gt; Android already contains the required JSON libraries</p>
<p>Lets create a JSON Object;</p>
<pre name="code" class="java" >
private JSONObject jObject;
</pre>
<p>and lets our example be a String ,</p>
<pre name="code"  class="java">
private String jString = "{\"menu\":	{\"id\": \"file\", \"value\": \"File\", \"popup\": { \"menuitem\": 	[ {\"value\": \"New\", \"onclick\": \"CreateNewDoc()\"}, 	{\"value\": \"Open\", \"onclick\": \"OpenDoc()\"}, 	 	{\"value\": \"Close\", \"onclick\": \"CloseDoc()\"}]}}}";
</pre>
<p>now we have to convert jString to the jObject ,</p>
<pre  name="code" class="java" >jObject = new JSONObject(jString); </pre>
<p>Now we have to start extracting the content from  jObject ,</p>
<p>Lets extract the menu object  by creating a new menu object,</p>
<pre  name="code" class="java" >
JSONObject menuObject = jObject.getJSONObject("menu");
</pre>
<p>Now lets extract its atrtibutes ,</p>
<pre name="code"  class="java">
String attributeId = menuObject.getString("id");
String attributeValue = menuObject.getString("value");
JSONObject popupObject = menuObject.getJSONObject("popup");
</pre>
<p>since &#8220;popup&#8221; is not plainly a String lets extract it to an object ,</p>
<p>3&gt; Now popup contains an array of &#8220;menuitem&#8221;</p>
<p>So, we&#8217;ll have to extract it to a JSONArray,</p>
<pre  name="code" class="java" > JSONArray menuitemArray = popupObject.getJSONArray("menuitem"); </pre>
<p>Since it contains 3  items lets put it in a for loop.</p>
<pre name="code" class="java" >
for (int i = 0; i < 3; i++) {
			System.out.println(menuitemArray.getJSONObject(i)
					.getString("value").toString());
			System.out.println(menuitemArray.getJSONObject(i).getString(
					"onclick").toString());
		}
</pre>
<p align="left">
<p align="left">Basically thats it , u should see the output in the DDMS</p>
<p align="left">
<p align="left">4&gt; The full code is as below,</p>
<p align="left">
<pre name="code" class="java">
import org.json.JSONArray;
import org.json.JSONObject;
import android.app.Activity;
import android.os.Bundle;

public class JsonParser extends Activity {
	private JSONObject jObject;
	private String jString = "{\"menu\": {\"id\": \"file\", \"value\": \"File\", \"popup\": { \"menuitem\": [ {\"value\": \"New\",   \"onclick\": \"CreateNewDoc()\"}, {\"value\": \"Open\", \"onclick\": \"OpenDoc()\"}, {\"value\": \"Close\", \"onclick\": \"CloseDoc()\"}]}}}";

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		try {
			parse();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	private void parse() throws Exception {
		jObject = new JSONObject(jString);

		JSONObject menuObject = jObject.getJSONObject("menu");
		String attributeId = menuObject.getString("id");
		System.out.println(attributeId);

		String attributeValue = menuObject.getString("value");
		System.out.println(attributeValue);

		JSONObject popupObject = menuObject.getJSONObject("popup");
		JSONArray menuitemArray = popupObject.getJSONArray("menuitem");

		for (int i = 0; i < 3; i++) {
			System.out.println(menuitemArray.getJSONObject(i)
					.getString("value").toString());
			System.out.println(menuitemArray.getJSONObject(i).getString(
					"onclick").toString());
		}
	}
}
</pre>
<img src="http://feeds.feedburner.com/~r/AndroidCompetencyCenter/~4/U13Rb9b6wPo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.androidcompetencycenter.com/2009/10/json-parsing-in-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.androidcompetencycenter.com/2009/10/json-parsing-in-android/</feedburner:origLink></item>
		<item>
		<title>Styles and Themes</title>
		<link>http://feedproxy.google.com/~r/AndroidCompetencyCenter/~3/mmDyiWZYz7s/</link>
		<comments>http://www.androidcompetencycenter.com/2009/10/styles-and-themes/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 13:55:28 +0000</pubDate>
		<dc:creator>zeeshan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile Market]]></category>
		<category><![CDATA[blur]]></category>
		<category><![CDATA[blurred]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[no title]]></category>
		<category><![CDATA[notitle]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[styles]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[transparent]]></category>

		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=448</guid>
		<description><![CDATA[
Hello coders,
Lets look at a fairly simple example of  creating a transparent theme and how to apply it to a Dialog&#8230;&#8230;
Step 1&#62;  Create a colors.xml file in the &#8216;values&#8217; folder under &#8216;res&#8217;  and add the following line..
&#60;drawable name="transparent"&#62;#00000000&#60;/drawable&#62;
Step 2&#62;  Create a styles.xml file in the &#8216;values&#8217; folder under &#8216;res&#8217; and the [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 	 	 --></p>
<p>Hello coders,</p>
<p>Lets look at a fairly simple example of  creating a transparent theme and how to apply it to a Dialog&#8230;&#8230;</p>
<p>Step 1&gt;  Create a colors.xml file in the &#8216;values&#8217; folder under &#8216;res&#8217;  and add the following line..</p>
<pre name="code" class="xml">&lt;drawable name="transparent"&gt;#00000000&lt;/drawable&gt;</pre>
<p>Step 2&gt;  Create a styles.xml file in the &#8216;values&#8217; folder under &#8216;res&#8217; and the following lines&#8230;</p>
<pre name= "code" class="xml">&lt;style name=<em>"Transparent"</em>&gt;
&lt;item name=<em>"android:windowIsTranslucent"</em>&gt;true&lt;/item&gt;
&lt;item name=<em>"android:windowAnimationStyle"</em>&gt;
@android:style/Animation.Translucent
&lt;/item&gt;
&lt;item name=<em>"android:windowBackground"</em>&gt;<span style="text-decoration: underline;">@drawable</span>/transparent&lt;/item&gt;
&lt;item name=<em>"android:windowNoTitle"</em>&gt;true&lt;/item&gt;
&lt;item name=<em>"android:colorForeground"</em>&gt;#<span style="text-decoration: underline;">fff</span>&lt;/item&gt;
&lt;/style&gt;</pre>
<p>( I guess the tags and attributes are self explanatory &#8230;. )</p>
<p>Step 3&gt; Actually thats it&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;</p>
<p>Let&#8217;s  add this to a dialog&#8230;..</p>
<p>Step 4&gt;  Create a  class  with the following lines&#8230;&#8230;</p>
<pre name="code" class="java">public class DialogBox extends Dialog {

    public DialogBox(Context context, int theme) {
        super(context, theme);
        setContentView(R.layout.dialog);
        okButton = (Button) findViewById(R.id.dialog_OkButton);
        setListeners();
    }
}</pre>
<p>(Make sure you create a layout for the dialog )</p>
<p>Step 5&gt;  Next create an activity class as follows&#8230;.</p>
<pre name="code" class="java">public class T_Temp extends Activity {

    private DialogBox dialog;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        dialog = new DialogBox(this, R.style.Transparent);
        dialog.show();
    }
}</pre>
<p>When creating the dialog just add the transparent theme &#8230;&#8230;</p>
<p>Step 6&gt;      That&#8217;s it &#8230;</p>
<p>( don&#8217;t forget to add the activity in the android manifest file..)</p>
<p>When you add the widgets and background it will look something like this..</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-450" src="http://www.androidcompetencycenter.com/wp-content/uploads/2009/10/before.jpg" alt="before" width="170" height="200" /></p>
<p style="text-align: center;">Before</p>
<p style="text-align: center;"><img class="aligncenter size-medium wp-image-451" src="http://www.androidcompetencycenter.com/wp-content/uploads/2009/10/after-274x300.jpg" alt="after" width="170" height="200" /></p>
<p style="text-align: center;">After</p>
<p>Step 7&gt;   Another trick is you can make the background blurred &#8230;.</p>
<p>just add the following line in the dialog box&#8230;</p>
<pre name="code" class="java">
   getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
</pre>
<p align="left">Output looks somthing like this&#8230;&#8230;.</p>
<p style="text-align: center;" align="left"><img class="aligncenter size-medium wp-image-460" src="http://www.androidcompetencycenter.com/wp-content/uploads/2009/10/blurred-274x300.jpg" alt="blurred" width="170" height="200" /></p>
<p align="left">
<p align="left">
<p>So the final code is:</p>
<pre name="code" class="java" >
public class DialogBox extends Dialog {

    public DialogBox(Context context, int theme) {
        super(context, theme);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
        setContentView(R.layout.dialog);
        okButton = (Button) findViewById(R.id.dialog_OkButton);
        setListeners();
    }
}</pre>
<img src="http://feeds.feedburner.com/~r/AndroidCompetencyCenter/~4/mmDyiWZYz7s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.androidcompetencycenter.com/2009/10/styles-and-themes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.androidcompetencycenter.com/2009/10/styles-and-themes/</feedburner:origLink></item>
		<item>
		<title>Play Video</title>
		<link>http://feedproxy.google.com/~r/AndroidCompetencyCenter/~3/uamlwSDL33U/</link>
		<comments>http://www.androidcompetencycenter.com/2009/08/play-video/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 10:34:51 +0000</pubDate>
		<dc:creator>zeeshan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[3gp]]></category>
		<category><![CDATA[novice]]></category>
		<category><![CDATA[push]]></category>
		<category><![CDATA[push file]]></category>
		<category><![CDATA[push video]]></category>
		<category><![CDATA[sdcard]]></category>
		<category><![CDATA[setvideopath]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[video view]]></category>
		<category><![CDATA[videoview]]></category>

		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=435</guid>
		<description><![CDATA[
Hello,
Here we are going to play a 3gp video in our Android application.
The important point we have to note is that video doesn&#8217;t plays when placed in    the raw folder.Hence it has to be placed in the SDCARD itself.

So lets begin this interesting topic.


Ok, let us first insert our video:


You 	can get [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="margin-bottom: 0cm;">Hello,</p>
<p style="margin-bottom: 0cm;">Here we are going to play a 3gp video in our Android application.</p>
<p style="margin-bottom: 0cm;">The important point we have to note is that video doesn&#8217;t plays when placed in    the raw folder.Hence it has to be placed in the SDCARD itself.</p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">So lets begin this interesting topic.</p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">Ok, let us first insert our video:</p>
<ul>
<li>
<p style="margin-bottom: 0cm;">You 	can get a short 3gp video from net (I got it from 	<a href="http://www.free-3gp-video.com/">http://www.free-3gp-video.com</a>).</p>
</li>
<li>
<p style="margin-bottom: 0cm;">In 	eclipse open perspective DDMS(Window 	&#8211;&gt; Open Perspective &#8211;&gt; DDMS) .</p>
</li>
<li>
<p style="margin-bottom: 0cm;">In 	DDMS perspective open view File 	Explorer(Window &#8211;&gt; Show View &#8211;&gt; 	File Explorer).</p>
</li>
<li>
<p style="margin-bottom: 0cm;">Also 	open Device view (Window 	&#8211;&gt; Show View &#8211;&gt; Device) and click the emulator you 	want to use(if emulator is not running then run a emulator with a 	sdcard option).</p>
</li>
<li>
<p style="margin-bottom: 0cm;">Then 	in File Explorer view navigate the tree 	shown and click sdcard node.</p>
</li>
<li>
<p style="margin-bottom: 0cm;">There 	are two buttons on the top right hand side of File 	Explorer as shown below</p>
</li>
</ul>
<p style="margin-left: 1.25cm; margin-bottom: 0cm;">
<div id="attachment_439" class="wp-caption aligncenter" style="width: 658px"><img class="size-full wp-image-439" src="http://www.androidcompetencycenter.com/wp-content/uploads/2009/08/pushvid1.jpg" alt="push a video onto the sdcard" width="648" height="61" /><p class="wp-caption-text">push a video onto the sdcard</p></div>
<ul>
<li>
<p style="margin-bottom: 0cm;">Click 	the button “Push a file onto the device” 	and in the file chooser navigate and choose the 3gp video.It should 	appear in the list of sdcard.(If not able to insert, check whether 	SDCARD is emulated in the emulator , in 1.5 sdk while creating a new 	Emulator there is a option of sdcard , insert 	128M in the textbox next to it).</p>
</li>
</ul>
<p style="margin-left: 1.25cm; margin-bottom: 0cm;">
<ul>
<li>
<p style="margin-bottom: 0cm;">Ok, 	back to our code, open java perspective(Window 	&#8211;&gt;Show View &#8211;&gt; Java) and open layout file Main.xml.</p>
</li>
<li>
<p style="margin-bottom: 0cm;">Replace 	the its content with following contents:</p>
</li>
</ul>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;FrameLayout<br />
xmlns:android=&#8221;http://schemas.android.com/apk/res/android&#8221;<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;fill_parent&#8221;&gt;<br />
&lt;VideoView<br />
android:id=&#8221;@+id/myvideo&#8221;<br />
android:layout_gravity=&#8221;center&#8221;&gt;<br />
&lt;/VideoView&gt;<br />
&lt;/FrameLayout&gt;</p>
<ul>
<li>
<p style="margin-bottom: 0cm;">Now 	open your main activity and insert the following in the onCreate 	method as:</p>
</li>
</ul>
<pre class="java">super.onCreate(savedInstanceState);

// set the view to our layout file

setContentView(R.layout.main);
// Video view: to view our video
VideoView video = (VideoView) findViewById(R.id.myvideo);

//set video path to our video(in this case man-cheetah-gazalle.3gp)
video.setVideoPath("/sdcard/man-cheetah-gazelle.3gp");
video.start();</pre>
<p style="margin-left: 1.22cm; margin-bottom: 0cm;" align="left">
<ul>
<li>
<p style="margin-bottom: 0cm;" align="left">Run 	the application and the video runs as shown below:</p>
</li>
</ul>
<div id="attachment_440" class="wp-caption aligncenter" style="width: 330px"><img class="size-full wp-image-440" src="http://www.androidcompetencycenter.com/wp-content/uploads/2009/08/output.jpg" alt="Video snapshot" width="320" height="480" /><p class="wp-caption-text">Video snapshot</p></div>
<img src="http://feeds.feedburner.com/~r/AndroidCompetencyCenter/~4/uamlwSDL33U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.androidcompetencycenter.com/2009/08/play-video/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://www.androidcompetencycenter.com/2009/08/play-video/</feedburner:origLink></item>
		<item>
		<title>View site in a new Window(Browser)</title>
		<link>http://feedproxy.google.com/~r/AndroidCompetencyCenter/~3/tyoVrUIYuMQ/</link>
		<comments>http://www.androidcompetencycenter.com/2009/08/view-site-in-a-new-windowbrowser/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 11:43:48 +0000</pubDate>
		<dc:creator>zeeshan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[action]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[intent]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[open site]]></category>
		<category><![CDATA[open url]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[uri]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=428</guid>
		<description><![CDATA[Hello ,
Ever thought to include a feature in your application where user clicks a link of certain site or your personal website in the about section of the application and it opens the site in a window and when user finished viewing your achievement and clicks back button your application again gets displayed.

We are going [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom: 0cm;">Hello ,</p>
<p style="margin-left: 1.25cm; margin-bottom: 0cm;">Ever thought to include a feature in your application where user clicks a link of certain site or your personal website in the about section of the application and it opens the site in a window and when user finished viewing your achievement and clicks back button your application again gets displayed.</p>
<p style="margin-left: 1.25cm; margin-bottom: 0cm;">
<p style="margin-left: 1.25cm; margin-bottom: 0cm;">We are going to perform this in just two lines.</p>
<p style="margin-left: 1.25cm; margin-bottom: 0cm;">
<ul>
<li>
<p style="margin-bottom: 0cm;">So first we have to 	create a intent.</p>
</li>
</ul>
<p style="margin-left: 2.5cm; margin-bottom: 0cm;">As we already know intent is an abstract description of an operation to be performed.</p>
<p style="margin-left: 1.25cm; margin-bottom: 0cm;">
<p style="margin-left: 2.5cm; margin-bottom: 0cm;">So we are going to use another version of intent which has following format.</p>
<p style="margin-left: 1.25cm; margin-bottom: 0cm;">
<pre class="java">public Intent(String action,Uri uri)</pre>
<p style="margin-left: 1.25cm; margin-bottom: 0cm;">
<p style="margin-left: 2.5cm; margin-bottom: 0cm;">Here:</p>
<p style="margin-left: 3.75cm; margin-bottom: 0cm;">action is the action we intent(i.e the action we want to perform).</p>
<p style="margin-left: 3.75cm; margin-bottom: 0cm;">uri is the URL on which the above action is to be performed.</p>
<h4>create and intent as</h4>
<pre class="java">Intent viewIntent = new Intent("android.intent.action.VIEW", Uri.parse("http://www.wissen.co.in"));</pre>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-left: 2.5cm; margin-bottom: 0cm;" align="left">The above intents means that we want the system to perform a View Action on uri &#8220;<a href="http://www.wissen.co.in/">http://www.wissen.co.in</a>&#8221; (i.e. To view it).</p>
<p style="margin-left: 1.25cm; margin-bottom: 0cm;" align="left">
<p style="margin-left: 1.25cm; margin-bottom: 0cm;" align="left">
<ul>
<li>
<p style="margin-bottom: 0cm;" align="left">Next 	start this activity as:</p>
</li>
</ul>
<p style="margin-left: 1.25cm; margin-bottom: 0cm;" align="left">
<pre class="java">startActivity(viewIntent);</pre>
<p style="margin-left: 2.5cm; margin-bottom: 0cm;" align="left">
<p style="margin-left: 1.25cm; margin-bottom: 0cm;" align="left">
<ul>
<li>
<p style="margin-bottom: 0cm;" align="left">The 	site will open in browser as</p>
</li>
</ul>
<div class="mceTemp">
<dl id="attachment_429" class="wp-caption alignnone" style="width: 330px;">
<dt><img class="size-full wp-image-429" src="http://www.androidcompetencycenter.com/wp-content/uploads/2009/08/viewsite.jpg" alt="Site opens in a new window(browser)" width="320" height="480" /></dt>
<dd>Site opens in a new window(browser)</dd>
</dl>
</div>
<img src="http://feeds.feedburner.com/~r/AndroidCompetencyCenter/~4/tyoVrUIYuMQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.androidcompetencycenter.com/2009/08/view-site-in-a-new-windowbrowser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.androidcompetencycenter.com/2009/08/view-site-in-a-new-windowbrowser/</feedburner:origLink></item>
		<item>
		<title>Creating custom Views</title>
		<link>http://feedproxy.google.com/~r/AndroidCompetencyCenter/~3/s6Xl76wp6-M/</link>
		<comments>http://www.androidcompetencycenter.com/2009/08/creatingcustomviews/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 07:55:20 +0000</pubDate>
		<dc:creator>zeeshan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[graphic]]></category>
		<category><![CDATA[onDraw]]></category>
		<category><![CDATA[paint]]></category>
		<category><![CDATA[surface]]></category>
		<category><![CDATA[view]]></category>
		<category><![CDATA[views]]></category>

		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=416</guid>
		<description><![CDATA[

Hi All ,
Today we&#8217;ll discuss on how to create a canvas using views.


Step 1&#62;
We&#8217;ll start off by extending our class by the  android.view.View

example:
public class DrawView extends View {
		/**
		 * Constructor
		 */
		public DrawView(Context context) {
			super(context);
		}
	}
Step 2&#62;
Next we&#8217;ll use the onDraw()  function  provided by the View class.
( Tip:  In Eclipse Ganymede 3.4.1 ,
use [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">Hi All ,</p>
<p style="margin-bottom: 0cm;">Today we&#8217;ll discuss on how to create a canvas using views.</p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">Step 1&gt;</p>
<p style="margin-bottom: 0cm;">We&#8217;ll start off by extending our class by the  android.view.View</p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">example:</p>
<pre class="java">public class DrawView extends View {
		/**
		 * Constructor
		 */
		public DrawView(Context context) {
			super(context);
		}
	}</pre>
<p style="margin-bottom: 0cm;">Step 2&gt;</p>
<p style="margin-bottom: 0cm;">Next we&#8217;ll use the onDraw()  function  provided by the View class.</p>
<p style="margin-bottom: 0cm;">( Tip:  In Eclipse Ganymede 3.4.1 ,</p>
<p style="margin-bottom: 0cm;">use Ctrl+space to see the available methods and select onDraw(&#8230;) )</p>
<p style="margin-bottom: 0cm;">It will look something like this&#8230;</p>
<p style="margin-bottom: 0cm;">
<pre class="java">public class DrawView extends View {

		/**
		 * Constructor
		 */
		public DrawView(Context context) {
			super(context);
		}

		protected void onDraw(Canvas canvas) {
			super.onDraw(canvas);
		}
	}</pre>
<p style="margin-bottom: 0cm;">Step 3 &gt;</p>
<p style="margin-bottom: 0cm;">Lets draw some Text in it..</p>
<p style="margin-bottom: 0cm;">For that we&#8217;ll need the paint class.</p>
<p style="margin-bottom: 0cm;">Let&#8217;s create an object of Paint..</p>
<p style="margin-bottom: 0cm;">
<pre class="java">private Paint paint = new Paint();</pre>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">( Android javadoc :</p>
<p style="margin-bottom: 0cm;">The Paint class holds the style and color information about how to</p>
<p style="margin-bottom: 0cm;">draw geometries, text and bitmaps.  )</p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">Let&#8217;s set its properties..</p>
<p style="margin-bottom: 0cm;">
<pre class="java">
// set's the paint's colour
paint.setColor(Color.WHITE);
// set's paint's text size
paint.setTextSize(25);
// smooth's out the edges of what is being drawn
paint.setAntiAlias(true);
</pre>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">Step 4&gt;</p>
<p style="margin-bottom: 0cm;">Let&#8217;s draw the actual text&#8230;</p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">
<pre class="java" > canvas.drawText("Hello World", 5 , 30 ,paint); </pre>
</p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">The final code will look some thing like this&#8230;</p>
<p style="margin-bottom: 0cm;">
<pre class="java">
public class DrawView extends View {

		private Paint paint;

		/**
		 * Constructor
		 */
		public DrawView(Context context) {
			super(context);

			paint = new Paint();
			// set's the paint's colour
			paint.setColor(Color.GREEN);
			// set's paint's text size
			paint.setTextSize(25);
			// smooth's out the edges of what is being drawn
			paint.setAntiAlias(true);
		}

		protected void onDraw(Canvas canvas) {
			super.onDraw(canvas);

			canvas.drawText("Hello World", 5, 30, paint);
			// if the view is visible onDraw will be called at some point
			// in the future
			invalidate();
		}
	}
</pre>
<p style="margin-bottom: 0cm;" align="left">Step 5&gt;</p>
<p style="margin-bottom: 0cm;" align="left">Now we need to display this View &#8230;.</p>
<p style="margin-bottom: 0cm;" align="left">For that we need to create an activity and set its content view as this DrawView.</p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">One way is to suclass DrawView or create a new class file of DrawView..</p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">The final code looks something like this&#8230;</p>
<p style="margin-bottom: 0cm;" align="left">
<pre class="java">
import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;

public class temp extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(new DrawView(this));
	}

	private class DrawView extends View {

		private Paint paint;
		/**
		 * Constructor
		 */
		public DrawView(Context context) {
			super(context);

			paint = new Paint();
			// set's the paint's colour
			paint.setColor(Color.GREEN);
			// set's paint's text size
			paint.setTextSize(25);
			// smooth's out the edges of what is being drawn
			paint.setAntiAlias(true);
		}

		protected void onDraw(Canvas canvas) {
			super.onDraw(canvas);

			canvas.drawText("Hello World", 5, 30, paint);
			// if the view is visible onDraw will be called at some point in the
			// future
			invalidate();
		}
	}
}
</pre>
<p style="margin-bottom: 0cm;" align="left">The output looks like..</p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><img class="alignnone size-full wp-image-419" src="http://www.androidcompetencycenter.com/wp-content/uploads/2009/08/device.jpg" alt="output" width="320" height="480" /></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<img src="http://feeds.feedburner.com/~r/AndroidCompetencyCenter/~4/s6Xl76wp6-M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.androidcompetencycenter.com/2009/08/creatingcustomviews/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.androidcompetencycenter.com/2009/08/creatingcustomviews/</feedburner:origLink></item>
		<item>
		<title>Start Service at boot</title>
		<link>http://feedproxy.google.com/~r/AndroidCompetencyCenter/~3/kDrrY3Gv3E8/</link>
		<comments>http://www.androidcompetencycenter.com/2009/06/start-service-at-boot/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 13:04:15 +0000</pubDate>
		<dc:creator>zeeshan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[boot complete]]></category>
		<category><![CDATA[BroadcastReceiver]]></category>
		<category><![CDATA[service]]></category>

		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=406</guid>
		<description><![CDATA[Hello,
Now we are going to learn how to start a service at boot time, i.e. to start our service when device starts up.
First we have to create a BroadcastReceiver which will be started when boot completes as
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class MyStartupIntentReceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
}
}
onRecieve will be first called when [...]]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>Now we are going to learn how to start a service at boot time, i.e. to start our service when device starts up.</p>
<p>First we have to create a BroadcastReceiver which will be started when boot completes as</p>
<pre class="java">import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class MyStartupIntentReceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
}
}</pre>
<p>onRecieve will be first called when the BroadcastReceiver MyStartupIntentReceiver starts.</p>
<p>Next make an entry of this receiver in AndroidManifest.xml as</p>
<pre class="xml">
&lt;receiver android:name="MyStartupIntentReceiver"&gt;
&lt;intent-filter&gt;
&lt;action
android:name="android.intent.action.BOOT_COMPLETED" /&gt;
&lt;category android:name="android.intent.category.HOME" /&gt;
&lt;/intent-filter&gt;
&lt;/receiver&gt;
</pre>
<p>Here in intent filter we have declared the action as android.intent.action.BOOT_COMPLETED , so that this receiver and intent with action android.intent.action.BOOT_COMPLETED</p>
<p>Now this receiver will be intimated when boot completes</p>
<p>Next if we want to start a service then the procedure is as follows</p>
<p>Create a Service as</p>
<pre  class="java">

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;

public class MyService extends Service {

	@Override
	public IBinder onBind(Intent intent) {

		return null;

	}

	@Override
	public void onCreate() {
		super.onCreate();

		Toast.makeText(this, "Service Created", Toast.LENGTH_LONG).show();

	}

	@Override
	public void onDestroy() {
		super.onDestroy();

		Toast.makeText(this, "Service Destroyed", Toast.LENGTH_LONG).show();

	}

	@Override
	public void onStart(Intent intent, int startId) {

		super.onStart(intent, startId);

		Toast.makeText(this, "Service Started", Toast.LENGTH_LONG).show();

	}
}
</pre>
<p>Make an entry of this service in AndroidManifest.xml as</p>
<pre class="xml">
&lt;service android:name="MyService"&gt;
&lt;intent-filter&gt;
&lt;action
android:name="com.wissen.startatboot.MyService" /&gt;
&lt;/intent-filter&gt;
&lt;/service&gt;
</pre>
<p>Now start this service in the BroadcastReceiver MyStartupIntentReceiver&#8217;s onReceive method as</p>
<pre class="java">
	public void onReceive(Context context, Intent intent) {
		Intent serviceIntent = new Intent();
		serviceIntent.setAction("com.wissen.startatboot.MyService");
		context.startService(serviceIntent);

	}
</pre>
<p>Next you can write the code that you want to execute when device boots up in the BroadcastReceiver or in the Service</p>
<img src="http://feeds.feedburner.com/~r/AndroidCompetencyCenter/~4/kDrrY3Gv3E8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.androidcompetencycenter.com/2009/06/start-service-at-boot/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.androidcompetencycenter.com/2009/06/start-service-at-boot/</feedburner:origLink></item>
		<item>
		<title>Accessing device Sensor’s</title>
		<link>http://feedproxy.google.com/~r/AndroidCompetencyCenter/~3/mNTr7aqphkU/</link>
		<comments>http://www.androidcompetencycenter.com/2009/06/accessing-device-sensors/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 07:02:58 +0000</pubDate>
		<dc:creator>zeeshan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[accelerometer]]></category>
		<category><![CDATA[orientation]]></category>
		<category><![CDATA[sensor]]></category>
		<category><![CDATA[SensorManager]]></category>
		<category><![CDATA[SENSOR_SERVICE]]></category>

		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=402</guid>
		<description><![CDATA[Hello,
Today we are going to learn how to access  sensor and retrieve data from it.
First, to access device&#8217;s sensors we have to use  Class SensorManager(android.hardware.SensorManager). that lets you access the device&#8217;s sensors
http://developer.android.com/reference/android/hardware/SensorManager.html
To get SensorManager we have to use getSystemService(ServiceName)
It returns handle to a system level service.Hence we get handle to SensorManager as below
 
//Declare Sensor [...]]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>Today we are going to learn how to access  sensor and retrieve data from it.</p>
<p>First, to access device&#8217;s sensors we have to use  Class <strong>SensorManager(android.hardware.SensorManager)</strong>. that lets you access the device&#8217;s sensors</p>
<p><strong>http://developer.android.com/reference/android/hardware/SensorManager.html</strong></p>
<p>To get SensorManager we have to use <strong>getSystemService(ServiceName)</strong></p>
<p>It returns handle to a system level service.Hence we get handle to SensorManager as below</p>
<p><strong> </strong></p>
<pre class="java">//Declare Sensor Manager class object

private SensorManager mSensorManager;

//Next get the handle to the Sensor service

mSensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE);</pre>
<p>Next declare a listener  for receiving notifications from the SensorManager when sensor values  have changed as.</p>
<pre class="java">
private final SensorListener sensorListener = new SensorListener(){
public void onSensorChanged(int sensor, float[] values)
{

//Retrieve the values from the float array values which contains sensor data
Float dataX = values[SensorManager.DATA_X];

Float dataY = values[SensorManager.DATA_Y];

Float dataZ = values[SensorManager.DATA_Z];

//Now we got the values and we can use it as we want

Log.i("X - Value",""+dataX);

Log.i("Y - Value",""+dataY);

Log.i("Z - Value",""+dataZ);

}

public void onAccuracyChanged(int sensor, int accuracy) {}

};</pre>
<p>For above listener to be notified of changed value we have to register it . We can register it in onResume as<strong></strong></p>
<pre class="java">
protected void onResume() {

super.onResume();

mSensorManager.registerListener(sensorListener,
SensorManager.SENSOR_ORIENTATION,
SensorManager.SENSOR_DELAY_GAME);
}
</pre>
<p>The syntax of register listener is as</p>
<pre class="java">
SensorManager.registerListener(SensorListener listener, int sensors, int rate)
</pre>
<p>We can unregister the sensorlistener in onStop as</p>
<pre class="java">
protected void onStop() {

super.onStop();

mSensorManager.unregisterListener(sensorListener);
}
</pre>
<img src="http://feeds.feedburner.com/~r/AndroidCompetencyCenter/~4/mNTr7aqphkU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.androidcompetencycenter.com/2009/06/accessing-device-sensors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.androidcompetencycenter.com/2009/06/accessing-device-sensors/</feedburner:origLink></item>
		<item>
		<title>Hello Android! – Presentation from talk at Pune GTUG</title>
		<link>http://feedproxy.google.com/~r/AndroidCompetencyCenter/~3/53Ckxwz8f8U/</link>
		<comments>http://www.androidcompetencycenter.com/2009/06/hello-android-presentation-from-talk-at-pune-gtug/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 11:53:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=397</guid>
		<description><![CDATA[We were invited by Pune Google Technology User Group (GTUG) to introduce developers to Android platform for application development. Our presentation went well and developers present liked it. Here is the presentation.
Hello Android &#8211; Pune GTUG
View more Keynote presentations from sushrutbidwai.

]]></description>
			<content:encoded><![CDATA[<p>We were invited by Pune Google Technology User Group (GTUG) to introduce developers to Android platform for application development. Our presentation went well and developers present liked it. Here is the presentation.</p>
<div style="width:425px;text-align:left" id="__ss_1537938"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/sushrutbidwai/hello-android-pune-gtug?type=presentation" title="Hello Android - Pune GTUG">Hello Android &#8211; Pune GTUG</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=helloandroidpreso-090605082649-phpapp01&#038;stripped_title=hello-android-pune-gtug" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=helloandroidpreso-090605082649-phpapp01&#038;stripped_title=hello-android-pune-gtug" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">Keynote presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/sushrutbidwai">sushrutbidwai</a>.</div>
</div>
<img src="http://feeds.feedburner.com/~r/AndroidCompetencyCenter/~4/53Ckxwz8f8U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.androidcompetencycenter.com/2009/06/hello-android-presentation-from-talk-at-pune-gtug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.androidcompetencycenter.com/2009/06/hello-android-presentation-from-talk-at-pune-gtug/</feedburner:origLink></item>
		<item>
		<title>Book – Inviting suggestions and contributions</title>
		<link>http://feedproxy.google.com/~r/AndroidCompetencyCenter/~3/mVCaL7suzXU/</link>
		<comments>http://www.androidcompetencycenter.com/2009/05/book-inviting-suggestions-and-contributions/#comments</comments>
		<pubDate>Wed, 20 May 2009 07:33:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.androidcompetencycenter.com/2009/05/book-inviting-suggestions-and-contributions/</guid>
		<description><![CDATA[Thanks to all our readers and the overwhelming response we have got for the blog.
We have decided to take things to the next level and publish a book which can get a newbie Android developer started. The book will contain all the tutorials for basic stuff. IT will also contain lot of advance tutorials, introduction [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to all our readers and the overwhelming response we have got for the blog.<br />
We have decided to take things to the next level and publish a book which can get a newbie Android developer started. The book will contain all the tutorials for basic stuff. IT will also contain lot of advance tutorials, introduction to various tools, goodies and source code for lot of sample applications.<br />
If you have  specific suggestions or want us to talk about any particular API/Tool in this book, then give us a shout.<br />
If you want to contribute to the book by coming up with tutorials, then give us shout too!<br />
Looking for support for all of our readers!<br />
Also suggest us some good name for the book!</p>
<img src="http://feeds.feedburner.com/~r/AndroidCompetencyCenter/~4/mVCaL7suzXU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.androidcompetencycenter.com/2009/05/book-inviting-suggestions-and-contributions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.androidcompetencycenter.com/2009/05/book-inviting-suggestions-and-contributions/</feedburner:origLink></item>
		<item>
		<title>Activate android mobile without activation key</title>
		<link>http://feedproxy.google.com/~r/AndroidCompetencyCenter/~3/HxTdtb061QI/</link>
		<comments>http://www.androidcompetencycenter.com/2009/04/activate-android-mobile-without-activation-key/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 11:39:26 +0000</pubDate>
		<dc:creator>yogesh</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=390</guid>
		<description><![CDATA[You can activate Android mobile without activation key. After that you can easily access Internet or can
insert your sim card. Just follow the steps given:
1. You need android SDK first. You can get android SDK zip easily: http://developer.android.com/sdk/1.1_r1/index.html
2. Connect your android mobile phone to PC.
3. Get a driver for android mobile from site: http://modmygphone.com/wiki/index.php/Setting_up_ADB. Install [...]]]></description>
			<content:encoded><![CDATA[<p>You can activate Android mobile without activation key. After that you can easily access Internet or can<br />
insert your sim card. Just follow the steps given:</p>
<p>1. You need android SDK first. You can get android SDK zip easily: http://developer.android.com/sdk/1.1_r1/index.html</p>
<p>2. Connect your android mobile phone to PC.</p>
<p>3. Get a driver for android mobile from site: http://modmygphone.com/wiki/index.php/Setting_up_ADB. Install this driver.</p>
<p>4. Open DOS prompt, goto android mobile SDK&#8217;s tool folder.</p>
<p>5. Enter a command: <strong>adb -d shell</strong></p>
<p>6. In the shell, become root and modify settings.db to remove the &#8220;no sim card found&#8221; screen lock:<br />
$ <strong>su</strong><br />
$ <strong>sqlite3 /data/data/com.android.providers.settings/databases/settings.db</strong><br />
sqlite&gt; <strong>INSERT INTO system (name, value) VALUES (&#8216;device_provisioned&#8217;, 1);</strong><br />
sqlite&gt; <strong>.quit</strong><br />
#</p>
<p>7. Reboot the phone.</p>
<p>8. Reconnect with the adb shell and launch the settings activity (does not require root):<br />
$ <strong>adb shell</strong><br />
$ <strong>am start -a android.intent.action.MAIN -n com.android.settings/.Settings </strong></p>
<p>9. Using the settings activity that you&#8217;ve launched on the phone&#8217;s screen, enable wifi.</p>
<p>10. Activate the phone with a gmail account. You can insert your SIM card now.</p>
<span class="sfforumlink"><a href="http://www.androidcompetencycenter.com/forum/android-basics/activate-android-mobile-without-activation-key"><img src="http://www.androidcompetencycenter.com/wp-content/plugins/simple-forum/styles/icons/three-en/bloglink.png" alt="" /> Join the forum discussion on this post</a> - (1) Posts</span><img src="http://feeds.feedburner.com/~r/AndroidCompetencyCenter/~4/HxTdtb061QI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.androidcompetencycenter.com/2009/04/activate-android-mobile-without-activation-key/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.androidcompetencycenter.com/2009/04/activate-android-mobile-without-activation-key/</feedburner:origLink></item>
	</channel>
</rss>
