<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-1876006954118813193</atom:id><lastBuildDate>Thu, 31 Oct 2024 23:23:12 +0000</lastBuildDate><category>Android Apps</category><category>Android Programming</category><category>Android News</category><category>Android Tips</category><title>On Android</title><description>-when everything is on your hand-</description><link>http://ondroids.blogspot.com/</link><managingEditor>noreply@blogger.com (Unknown)</managingEditor><generator>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1876006954118813193.post-281375594255506819</guid><pubDate>Thu, 05 Jun 2014 08:29:00 +0000</pubDate><atom:updated>2014-06-05T01:29:20.630-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Android Apps</category><category domain="http://www.blogger.com/atom/ns#">Android Programming</category><title>Android Background Service, IntentService Example</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmSFqtUTR52JE9XH8WNLC7VrFaDzYRShpqtKbykF6uwYRtrQ4Ym-enEsNpjGttlUaVL8WYEex0StJwlVB-YxyA-q2U3h_UmMk03nzvkup5TuNS5wtHG2KttKJm0mA3tIXC9KTLPLkdJNnv/s1600/IntentService_2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Android IntentService sample img&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmSFqtUTR52JE9XH8WNLC7VrFaDzYRShpqtKbykF6uwYRtrQ4Ym-enEsNpjGttlUaVL8WYEex0StJwlVB-YxyA-q2U3h_UmMk03nzvkup5TuNS5wtHG2KttKJm0mA3tIXC9KTLPLkdJNnv/s1600/IntentService_2.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In this post I&#39;ll try to make a simple android app that uses an IntentService to execute a task in the background, the UI thread call the IntentService and then give it a task to be executed in the background service. When the task is complete, the IntentService (Background Service) will send the result back to the caller (UI thread).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;What exactly IntentService is?&lt;/b&gt; check this &lt;a href=&quot;http://developer.android.com/training/run-background-service/index.html&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt; to find out more about IntentService and Service in Android.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In this sample app I used the IntentService to perform a reading operation in the background Service. First, user will choose a text file from the android storages, and then the file will be sent to the IntentService to be read (reading operation is executed in the background service). When the task or operation is complete, the content of the file will be shown as a final result through a TextView on UI thread and the IntentService will stop itself.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18.479999542236328px;&quot;&gt;The sample app was built using eclipse, java 1.7, and can run on Android 2.1 Eclair (API 7) - Android 4.4 KitKat (API 19).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 18.479999542236328px;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: inherit;&quot;&gt;Note:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 18.479999542236328px;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;line-height: 18.479999542236328px; list-style: none; margin: 0.5em 0px; padding: 0px 2.5em; text-align: left;&quot;&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: inherit;&quot;&gt;&amp;gt; The sample app uses a support library (android-support-v7-appcompat),&amp;nbsp;&lt;a href=&quot;https://developer.android.com/tools/support-library/setup.html&quot; style=&quot;-webkit-transition: color 0.2s linear, background 0.1s linear; text-decoration: none; transition: color 0.2s linear, background 0.1s linear;&quot; target=&quot;_blank&quot;&gt;see how to set up a support library on eclipse.&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: inherit;&quot;&gt;&amp;gt; The sample app needs a third-party app to select a text file from the android storages, such as a File Manager.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18.479999542236328px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 18.479999542236328px; text-align: left;&quot;&gt;Download: &lt;a href=&quot;https://googledrive.com/host/0B-xPLbQ3HucgYVhPc3A2ZUFHRFE/IntentServiceSample.zip&quot;&gt;IntentServiceSample.zip&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 18.479999542236328px; text-align: left;&quot;&gt;&amp;nbsp;(source),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.479999542236328px; text-align: left; text-decoration: none;&quot;&gt;&lt;a href=&quot;https://googledrive.com/host/0B-xPLbQ3HucgaElGdkdUU0l6UzA/IntentServiceSample.apk&quot;&gt;IntentServiceSample.apk&lt;/a&gt; (Apk).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;src/com.me.intentservicesample/MainActivity.java&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: java&quot;&gt;package com.me.intentservicesample;

import java.net.URISyntaxException;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends ActionBarActivity {

	private static final int REQ_CODE = 0;
	//private ResponseReciever mResponseReciever = new ResponseReciever();
	
	private BroadcastReceiver reciever = new BroadcastReceiver() {
		
		@Override
		public void onReceive(Context context, Intent intent) {
			// TODO Auto-generated method stub
			Bundle bundle = intent.getExtras();
			if (bundle != null) {
				String data = bundle.getString(Services.DATA);
				int status = bundle.getInt(Services.STATUS);
				if (status == RESULT_OK) {
					//MainActivity mainActivity = new MainActivity();
					Toast.makeText(MainActivity.this, &quot;Finished&quot;,
							Toast.LENGTH_LONG).show();
					updateTextView(data);
				}
			}
		}
	};

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_main);

		if (savedInstanceState == null) {
			getSupportFragmentManager().beginTransaction()
					.add(R.id.container, new PlaceholderFragment()).commit();
		}
	}

	@Override
	protected void onResume() {
		super.onResume();
		IntentFilter intentFilter = new IntentFilter(Services.ACTION_BROADCAST);
		//intentFilter.addDataScheme(&quot;text/plain&quot;);
		
		LocalBroadcastManager.getInstance(MainActivity.this).registerReceiver(
				reciever, intentFilter);
	}

	@Override
	protected void onPause() {
		super.onPause();
		LocalBroadcastManager.getInstance(MainActivity.this)
				.unregisterReceiver(reciever);
	}
	
	/**
	private class ResponseReciever extends BroadcastReceiver {

		@Override
		public void onReceive(Context ctx, Intent intent) {
			// TODO Auto-generated method stub
			Bundle bundle = intent.getExtras();
			if (bundle != null) {
				String data = bundle.getString(Services.DATA);
				int status = bundle.getInt(Services.STATUS);
				if (status == RESULT_OK) {
					//MainActivity mainActivity = new MainActivity();
					Toast.makeText(MainActivity.this, &quot;Finished&quot;,
							Toast.LENGTH_LONG).show();
					//mainActivity.updateTextView(data);
				}
			}

		}

	}
	*/

	protected void updateTextView(String data) {
		TextView tv = (TextView) findViewById(R.id.textView);
		tv.setText(data.toString());
	}

	/** called when button &quot;Open a File&quot; clicked */
	public void openFile(View v) {

		// use implicit Intent to open a file
		Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
		intent.setType(&quot;*/.txt&quot;);
		intent.addCategory(Intent.CATEGORY_OPENABLE);

		try {
			startActivityForResult(
					Intent.createChooser(intent, &quot;Select a file txt&quot;), REQ_CODE);
		} catch (android.content.ActivityNotFoundException ex) {
			Toast.makeText(getBaseContext(), &quot;You a need a File Manager&quot;,
					Toast.LENGTH_LONG).show();
			ex.printStackTrace();
		}
	}

	@Override
	protected void onActivityResult(int reqCode, int resultCode, Intent data) {

		// check activity result base on reqCode
		// reqCode must be same as REQ_CODE
		switch (reqCode) {
		case REQ_CODE:
			if (resultCode == RESULT_OK) {

				// get Uri data from intent
				Uri uri = data.getData();

				String path = null;
				try {

					// convert Uri to file path (String)
					path = getPath(getBaseContext(), uri);

					// send the file path to Service
					this.sendToService(path);
				} catch (URISyntaxException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		}
	}

	/** called to start the Service */
	private void sendToService(String s) {

		// create an explicit Intent for the Service
		Intent intentService = new Intent(MainActivity.this, Services.class);
		intentService.putExtra(Services.PATH, s);
		startService(intentService);
	}

	public static String getPath(Context context, Uri uri)
			throws URISyntaxException {
		if (&quot;content&quot;.equalsIgnoreCase(uri.getScheme())) {
			String[] projection = { &quot;_data&quot; };
			Cursor cursor = null;

			try {
				cursor = context.getContentResolver().query(uri, projection,
						null, null, null);
				int column_index = cursor.getColumnIndexOrThrow(&quot;_data&quot;);
				if (cursor.moveToFirst()) {
					return cursor.getString(column_index);
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		} else if (&quot;file&quot;.equalsIgnoreCase(uri.getScheme())) {
			return uri.getPath();
		}

		return null;
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {

		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// Handle action bar item clicks here. The action bar will
		// automatically handle clicks on the Home/Up button, so long
		// as you specify a parent activity in AndroidManifest.xml.
		int id = item.getItemId();
		if (id == R.id.action_settings) {
			return true;
		}
		return super.onOptionsItemSelected(item);
	}

	/**
	 * A placeholder fragment containing a simple view.
	 */
	public static class PlaceholderFragment extends Fragment {

		public PlaceholderFragment() {
		}

		@Override
		public View onCreateView(LayoutInflater inflater, ViewGroup container,
				Bundle savedInstanceState) {
			View rootView = inflater.inflate(R.layout.fragment_main, container,
					false);
			return rootView;
		}
	}

}
&lt;span style=&quot;font-family: inherit;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;src/com.me.intentservicesample/Services.java
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: java&quot;&gt;package com.me.intentservicesample;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

import android.app.Activity;
import android.app.IntentService;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;

public class Services extends IntentService {

	private static int mStatus = Activity.RESULT_CANCELED;
	public static final String PATH = &quot;com.me.intentservicesample.PATH&quot;;
	public static final String ACTION_BROADCAST = &quot;com.me.intentservicesample.BROADCAST&quot;;
	public static final String STATUS = &quot;com.me.intentservicesample.STATUS&quot;;
	public static final String DATA = &quot;com.me.intentservicesample.DATA&quot;;

	public Services() {
		super(&quot;Services&quot;);
		// TODO Auto-generated constructor stub
	}

	@Override
	protected void onHandleIntent(Intent intent) {
		// TODO Auto-generated method stub

		// get data from incoming intent
		String filePath = intent.getStringExtra(PATH);

		String fileContent = this.readFile(filePath);
		if (fileContent != null) {

			// report the work status to registered components
			publishResult(mStatus, fileContent);

		}
	}

	private void publishResult(int status, String data) {
		Intent localIntent = new Intent(Services.ACTION_BROADCAST);
		localIntent.putExtra(Services.STATUS, status);
		localIntent.putExtra(Services.DATA, data);
		LocalBroadcastManager.getInstance(Services.this).sendBroadcast(
				localIntent);
	}

	/** read the incoming file to get the file content as String */
	private String readFile(String path) {
		File file = new File(path);
		int i, j = 0;
		byte[] data = new byte[(int) file.length()];
		String string = null;
		InputStream in = null;
		try {
			in = new BufferedInputStream(new FileInputStream(file));
			while ((i = in.read()) != -1) {
				data[j++] = (byte) i;
			}
			string = byteToString(data).toString();
			mStatus = Activity.RESULT_OK;
			return string;
		} catch (FileNotFoundException ex) {
			ex.printStackTrace();
		} catch (IOException ex) {
			// TODO Auto-generated catch block
			ex.printStackTrace();
		} finally {
			if (in != null) {
				try {
					in.close();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		}
		return string;

	}

	/** called to cast byte array to String */
	private static String byteToString(byte[] b) {
		char[] c = new char[b.length];
		StringBuilder sb = new StringBuilder();

		for (int i = 0; i &amp;lt; c.length; i++) {
			c[i] = (char) b[i];
			sb.append(c[i]);
		}

		return sb.toString();
	}
}

&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;res/layout/activity_main.xml
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;FrameLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
    android:id=&quot;@+id/container&quot;
    android:layout_width=&quot;match_parent&quot;
    android:layout_height=&quot;match_parent&quot;
    tools:context=&quot;com.me.intentservicesample.MainActivity&quot;
    tools:ignore=&quot;MergeRootFrame&quot; /&amp;gt;


&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;res/layout/fragment_main.xml
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
    android:layout_width=&quot;match_parent&quot;
    android:layout_height=&quot;match_parent&quot;
    android:paddingBottom=&quot;@dimen/activity_vertical_margin&quot;
    android:paddingLeft=&quot;@dimen/activity_horizontal_margin&quot;
    android:paddingRight=&quot;@dimen/activity_horizontal_margin&quot;
    android:paddingTop=&quot;@dimen/activity_vertical_margin&quot;
    tools:context=&quot;com.me.intentservicesample.MainActivity$PlaceholderFragment&quot; &amp;gt;

    &amp;lt;Button
        android:id=&quot;@+id/button&quot;
        android:layout_width=&quot;match_parent&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:layout_alignParentTop=&quot;true&quot;
        android:onClick=&quot;openFile&quot;
        android:text=&quot;Open a File&quot; /&amp;gt;

    &amp;lt;LinearLayout
        android:id=&quot;@+id/linear&quot;
        android:layout_width=&quot;match_parent&quot;
        android:layout_height=&quot;match_parent&quot;
        android:layout_below=&quot;@id/button&quot;
        android:orientation=&quot;vertical&quot; &amp;gt;

        &amp;lt;TextView
            android:id=&quot;@+id/textView&quot;
            android:layout_width=&quot;match_parent&quot;
            android:layout_height=&quot;match_parent&quot;
            android:layout_marginTop=&quot;10dp&quot;
            android:singleLine=&quot;false&quot;
            android:text=&quot;@string/hello_world&quot; /&amp;gt;
    &amp;lt;/LinearLayout&amp;gt;

&amp;lt;/RelativeLayout&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;AndroidManifest.xml
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    package=&quot;com.me.intentservicesample&quot;
    android:versionCode=&quot;1&quot;
    android:versionName=&quot;1.0&quot; &amp;gt;

    &amp;lt;uses-sdk
        android:minSdkVersion=&quot;7&quot;
        android:targetSdkVersion=&quot;19&quot; /&amp;gt;

    &amp;lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot; /&amp;gt;

    &amp;lt;application
        android:allowBackup=&quot;true&quot;
        android:icon=&quot;@drawable/ic_launcher&quot;
        android:label=&quot;@string/app_name&quot;
        android:theme=&quot;@style/AppTheme&quot; &amp;gt;
        &amp;lt;service
            android:name=&quot;com.me.intentservicesample.Services&quot;
            android:exported=&quot;false&quot; &amp;gt;
        &amp;lt;/service&amp;gt;

        &amp;lt;activity
            android:name=&quot;com.me.intentservicesample.MainActivity&quot;
            android:label=&quot;@string/app_name&quot; &amp;gt;
            &amp;lt;intent-filter&amp;gt;
                &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;

                &amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt;
            &amp;lt;/intent-filter&amp;gt;
        &amp;lt;/activity&amp;gt;
    &amp;lt;/application&amp;gt;

&amp;lt;/manifest&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; line-height: 18.479999542236328px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;When you launch the sample app:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh72v2lZAaxmvKrWwNeZ9F3W2f0hGfZpJJ7eTw9gUmWQm-porS9cGJ_VCEgTXhELFS9JK5Bs3fMY05tRJTuJxzF5_LDC-qzuomTS9_lgm31MD1TzkjAT0mdcL8xflrUw1o5VvqFTHWOQ1PZ/s1600/IntentService_1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Android IntentService sample img&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh72v2lZAaxmvKrWwNeZ9F3W2f0hGfZpJJ7eTw9gUmWQm-porS9cGJ_VCEgTXhELFS9JK5Bs3fMY05tRJTuJxzF5_LDC-qzuomTS9_lgm31MD1TzkjAT0mdcL8xflrUw1o5VvqFTHWOQ1PZ/s1600/IntentService_1.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; line-height: 18.479999542236328px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;When the button &quot;Open a File&quot; was clicked:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmSFqtUTR52JE9XH8WNLC7VrFaDzYRShpqtKbykF6uwYRtrQ4Ym-enEsNpjGttlUaVL8WYEex0StJwlVB-YxyA-q2U3h_UmMk03nzvkup5TuNS5wtHG2KttKJm0mA3tIXC9KTLPLkdJNnv/s1600/IntentService_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Android IntentService sample img&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmSFqtUTR52JE9XH8WNLC7VrFaDzYRShpqtKbykF6uwYRtrQ4Ym-enEsNpjGttlUaVL8WYEex0StJwlVB-YxyA-q2U3h_UmMk03nzvkup5TuNS5wtHG2KttKJm0mA3tIXC9KTLPLkdJNnv/s1600/IntentService_2.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;After completing the operation, show the final result to the user:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmaoI8MfWQv8E5Gcyp_UKNt-KbTDB6GEaJCYbX_P5fJLjrJIou-mX_Cs-rQGe8p3kOV39mxzhXl4CS7QOL7rS-qjg359CkUBa4w_q55vrbylJ8jBjoc5u72BSG-ggySBLsaX3zVQVi3pZA/s1600/IntentService_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmaoI8MfWQv8E5Gcyp_UKNt-KbTDB6GEaJCYbX_P5fJLjrJIou-mX_Cs-rQGe8p3kOV39mxzhXl4CS7QOL7rS-qjg359CkUBa4w_q55vrbylJ8jBjoc5u72BSG-ggySBLsaX3zVQVi3pZA/s1600/IntentService_3.png&quot; height=&quot;320&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; line-height: 18.479999542236328px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;i&gt;Source:&amp;nbsp;&lt;/i&gt;&lt;a href=&quot;http://developer.android.com/training/run-background-service/index.html&quot; target=&quot;_blank&quot;&gt;Android Developer&amp;nbsp;(Background Service)&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://ondroids.blogspot.com/2014/06/android-background-service.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmSFqtUTR52JE9XH8WNLC7VrFaDzYRShpqtKbykF6uwYRtrQ4Ym-enEsNpjGttlUaVL8WYEex0StJwlVB-YxyA-q2U3h_UmMk03nzvkup5TuNS5wtHG2KttKJm0mA3tIXC9KTLPLkdJNnv/s72-c/IntentService_2.png" height="72" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1876006954118813193.post-7570267067438501436</guid><pubDate>Thu, 05 Jun 2014 03:14:00 +0000</pubDate><atom:updated>2014-06-04T22:20:46.881-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Android Apps</category><category domain="http://www.blogger.com/atom/ns#">Android Programming</category><title>Android AsyncTask and Progress Bar example</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiio9mLFWbTJFTIQrfZoS7gTzZmdb4sbuqbgOrbagfO8Q5BWK4J5AR7iqTbMZHSK9raapsqpZih2ladIG6_aylk7QnPKbaMHJOlk35gnWa8XUyEI8zryZTYatpnLndfA8CYZh_-QofUPlJT/s1600/c.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Android AsyncTask ProgressBar sample img&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiio9mLFWbTJFTIQrfZoS7gTzZmdb4sbuqbgOrbagfO8Q5BWK4J5AR7iqTbMZHSK9raapsqpZih2ladIG6_aylk7QnPKbaMHJOlk35gnWa8XUyEI8zryZTYatpnLndfA8CYZh_-QofUPlJT/s1600/c.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In this post I&#39;ll try to make a simple android app that uses AsyncTask to perform background operations and update the result on the UI through a Progress Bar.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;For a better understanding of what exactly they are, you should read the &lt;a href=&quot;http://developer.android.com/reference/android/os/AsyncTask.html&quot; target=&quot;_blank&quot;&gt;AsyncTask explanations in here&lt;/a&gt;, and the &lt;a href=&quot;http://developer.android.com/reference/android/widget/ProgressBar.html&quot; target=&quot;_blank&quot;&gt;progressBar in here&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In this sample app I just made the app to read a file. First, user will choose a file from the android storages, then the file will be sent to the AsyncTask to be read (reading operation is executed in the background). When the file is being read, AsyncTask will send the operation progress to the UI thread and show its progress on a ProgressBar, when the background operations is complete or the task has been cancelled, the progressBar will disappear (invisible). Finally, the result of the background operations will be shown through the TextViews.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The sample app was built using eclipse, java 1.7, and can run on Android 2.1 Eclair (API 7) - Android 4.4 KitKat (API 19).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Note:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;gt; The sample app uses a support library (android-support-v7-appcompat), &lt;a href=&quot;https://developer.android.com/tools/support-library/setup.html&quot; target=&quot;_blank&quot;&gt;see how to set up a support library on eclipse.&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;gt; The sample app uses an implicit intent to choose an image or a video from the built in gallery app directly, to choose another file format (e.g .txt, .apk, and so on), then you need a third-party app such as a File Manager.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 18.479999542236328px;&quot;&gt;Download:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://googledrive.com/host/0B-xPLbQ3HucgYVhPc3A2ZUFHRFE/AsyncTaskProgressbarSample.zip&quot;&gt;AsyncTaskProgressbarSample.zip&lt;/a&gt;&lt;span style=&quot;line-height: 18.479999542236328px;&quot;&gt;&amp;nbsp;(source),&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://googledrive.com/host/0B-xPLbQ3HucgaElGdkdUU0l6UzA/AsyncTaskProgressbarSample.apk&quot;&gt;AsyncTaskProgressbarSample.apk&lt;/a&gt;&lt;span style=&quot;line-height: 18.479999542236328px;&quot;&gt;&amp;nbsp;(apk).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18.479999542236328px; text-align: left;&quot;&gt;src/com.me.asynctaskprogressbarsample/MainActivity.java&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: java&quot;&gt;package com.me.asynctaskprogressbarsample;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;

import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends ActionBarActivity {

 private static final int REQ_CODE = 0;
 private ReadTask tasker;

 @Override
 protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);

  if (savedInstanceState == null) {
   getSupportFragmentManager().beginTransaction()
     .add(R.id.container, new PlaceholderFragment()).commit();
  }
 }

 /**
  * called when &quot;Cancel button&quot; is clicked it should abort the Asynctask
  * process
  */
 public void cancelButton(View v) {

  // check is there any task that can be aborted
  if (tasker.getStatus() == AsyncTask.Status.RUNNING
    || tasker.getStatus() == AsyncTask.Status.PENDING) {

   // abort the task
   tasker.cancel(true);
  }
 }

 /** AsyncTask class used for reading a file &amp;lt;Params, Progress, Result&amp;gt; */
 private class ReadTask extends AsyncTask&amp;lt;String, Integer, String&amp;gt; {

  // private String data;
  private String time;
  private int progressStatus;
  ProgressBar bar;
  TextView barPercent;
  Button openButton;
  Button cancelButton;
  TextView tv1;
  TextView tv2;

  @Override
  protected void onPreExecute() {
   super.onPreExecute();

   // initial the Views
   bar = (ProgressBar) findViewById(R.id.progressbar);
   barPercent = (TextView) findViewById(R.id.barPercent);
   openButton = (Button) findViewById(R.id.openButton);
   cancelButton = (Button) findViewById(R.id.cancelButton);
   tv1 = (TextView) findViewById(R.id.textView1);
   tv1.setText(&quot;Elapsed: &quot;);
   tv2 = (TextView) findViewById(R.id.textView2);
   tv2.setText(&quot;Status: &quot;);

   // disable openButton
   openButton.setEnabled(false);

   // show the Views
   bar.setVisibility(View.VISIBLE);
   barPercent.setVisibility(View.VISIBLE);
   cancelButton.setVisibility(View.VISIBLE);

   progressStatus = 0;
   bar.setProgress(progressStatus);
   barPercent.setText(&quot;Reading... 0%&quot;);
  }

  @Override
  protected String doInBackground(String... params) {
   // TODO Auto-generated method stub
   File file = new File(params[0]);
   int length = (int) file.length();
   int i = 0;

   // j = 0;
   // byte[] temp = new byte[length];

   InputStream in = null;
   byte[] buffer = new byte[8192];
   try {
    in = new BufferedInputStream(new FileInputStream(file));
    long start = System.currentTimeMillis();
    while ((i = in.read(buffer)) != -1) {

     // temp[j++] = (byte) i;

     progressStatus += i;

     // update the progressbar
     publishProgress((int) ((progressStatus / (float) length) * 100));

     // Escape early if cancel() is called
     if (isCancelled())
      break;

    }
    // data = byteToString(temp).toString();
    time = ((System.currentTimeMillis() - start) + &quot;ms&quot;).toString();

   } catch (FileNotFoundException ex) {
    ex.printStackTrace();
    time = ex.getMessage();
   } catch (IOException ex) {
    // TODO Auto-generated catch block
    ex.printStackTrace();
    time = ex.getMessage();
   } finally {
    if (in != null) {
     try {
      in.close();
     } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      time = e.getMessage();
     }
    }
   }
   return time;
  }

  @Override
  protected void onProgressUpdate(Integer... progress) {
   super.onProgressUpdate(progress);

   // bar.incrementProgressBy(progress[0]);

   bar.setProgress(progress[0]);
   barPercent.setText(&quot;Reading... &quot; + progress[0] + &quot;%&quot;);
  }

  @Override
  protected void onCancelled() {
   super.onCancelled();

   // the task was cancelled
   // it&#39;s time to release resources
   results(&quot;-&quot;, &quot;Cancelled&quot;);
  }

  @Override
  protected void onPostExecute(String result) {
   super.onPostExecute(result);

   results(result, &quot;Finished&quot;);
  }

  void results(String e, String s) {

   // clean up the Tasker
   tasker = null;

   // enable the openButton
   openButton.setEnabled(true);

   // close the Views
   bar.setVisibility(View.GONE);
   barPercent.setVisibility(View.GONE);
   cancelButton.setVisibility(View.GONE);

   // update the TextView1 and TextView2
   tv1.setText(&quot;Elapsed: &quot; + e);
   tv2.setText(&quot;Status: &quot; + s);
  }

  /**
   * called to cast byte array to String private String
   * byteToString(byte[] b) { char[] c = new char[b.length]; StringBuilder
   * sb = new StringBuilder();
   * 
   * for (int i = 0; i &amp;lt; c.length; i++) { c[i] = (char) b[i];
   * sb.append(c[i]); }
   * 
   * return sb.toString(); }
   */

 }

 /**
  * check the AsyncTask status to make sure that the Tasker is ready to do
  * some task
  * 
  * @return
  */
 boolean gotStatus() {

  if (tasker == null || tasker.getStatus() == AsyncTask.Status.PENDING
    || tasker.getStatus() == AsyncTask.Status.FINISHED) {

   // initial the Tasker
   tasker = new ReadTask();

   return true;
  }
  if (tasker.getStatus() == AsyncTask.Status.RUNNING) {

   // Tasker is still running
   // so we can&#39;t give it another task at the time
   return false;
  }

  return false;
 }

 /** called when button &quot;Open a File&quot; clicked */
 public void openFile(View v) {

  // check the Tasker status
  // if true, it means Tasker ready to recieve a new task
  if (gotStatus()) {

   // we use implicit intent to get a file from the system (image,
   // video)
   // to select another file format (e.g .txt, .apk, and so on)
   // we need a third-party app such as a File Manager
   Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
   intent.setType(&quot;*/*&quot;);
   intent.addCategory(Intent.CATEGORY_OPENABLE);

   try {
    startActivityForResult(
      Intent.createChooser(intent, &quot;Select a file&quot;), REQ_CODE);
   } catch (android.content.ActivityNotFoundException ex) {
    Toast.makeText(getBaseContext(), &quot;You a need a File Manager&quot;,
      Toast.LENGTH_LONG).show();
    ex.printStackTrace();
   }
  } else {
   Toast.makeText(MainActivity.this, &quot;Task is still Running&quot;,
     Toast.LENGTH_LONG).show();
  }
 }

 @Override
 protected void onActivityResult(int reqCode, int resultCode, Intent data) {

  // check activity result base on reqCode
  // reqCode must be same as REQ_CODE
  switch (reqCode) {
  case REQ_CODE:
   if (resultCode == RESULT_OK) {

    // get Uri data from intent
    Uri uri = data.getData();

    String path = null;
    try {

     // convert Uri to file path (String)
     path = getPath(getBaseContext(), uri);

     // send the task to the AsyncTask
     tasker.execute(path);

    } catch (URISyntaxException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
    }
   }
  }
 }

 private static String getPath(Context context, Uri uri)
   throws URISyntaxException {
  if (&quot;content&quot;.equalsIgnoreCase(uri.getScheme())) {
   String[] projection = { &quot;_data&quot; };
   Cursor cursor = null;

   try {
    cursor = context.getContentResolver().query(uri, projection,
      null, null, null);
    int column_index = cursor.getColumnIndexOrThrow(&quot;_data&quot;);
    if (cursor.moveToFirst()) {
     return cursor.getString(column_index);
    }
   } catch (Exception e) {
    e.printStackTrace();
   }
  } else if (&quot;file&quot;.equalsIgnoreCase(uri.getScheme())) {
   return uri.getPath();
  }

  return null;
 }

 @Override
 public boolean onCreateOptionsMenu(Menu menu) {

  // Inflate the menu; this adds items to the action bar if it is present.
  getMenuInflater().inflate(R.menu.main, menu);
  return true;
 }

 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
  // Handle action bar item clicks here. The action bar will
  // automatically handle clicks on the Home/Up button, so long
  // as you specify a parent activity in AndroidManifest.xml.
  int id = item.getItemId();
  if (id == R.id.action_settings) {
   return true;
  }
  return super.onOptionsItemSelected(item);
 }

 /**
  * A placeholder fragment containing a simple view.
  */
 public static class PlaceholderFragment extends Fragment {

  public PlaceholderFragment() {
  }

  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
    Bundle savedInstanceState) {
   View rootView = inflater.inflate(R.layout.fragment_main, container,
     false);
   return rootView;
  }
 }

}
&lt;/pre&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18.479999542236328px;&quot;&gt;res/layout/activity_main.xml&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;FrameLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
    android:id=&quot;@+id/container&quot;
    android:layout_width=&quot;match_parent&quot;
    android:layout_height=&quot;match_parent&quot;
    tools:context=&quot;com.me.asynctaskprogressbarsample.MainActivity&quot;
    tools:ignore=&quot;MergeRootFrame&quot; /&amp;gt;

&lt;/pre&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18.479999542236328px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18.479999542236328px;&quot;&gt;res/layout/fragment_main.xml&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
    android:layout_width=&quot;match_parent&quot;
    android:layout_height=&quot;match_parent&quot;
    android:paddingBottom=&quot;@dimen/activity_vertical_margin&quot;
    android:paddingLeft=&quot;@dimen/activity_horizontal_margin&quot;
    android:paddingRight=&quot;@dimen/activity_horizontal_margin&quot;
    android:paddingTop=&quot;@dimen/activity_vertical_margin&quot;
    tools:context=&quot;com.me.asynctaskprogressbarsample.MainActivity$PlaceholderFragment&quot; &amp;gt;

    &amp;lt;Button
        android:id=&quot;@+id/openButton&quot;
        android:layout_width=&quot;match_parent&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:layout_alignParentTop=&quot;true&quot;
        android:onClick=&quot;openFile&quot;
        android:text=&quot;Open a File&quot; /&amp;gt;

    &amp;lt;LinearLayout
        android:id=&quot;@+id/linear&quot;
        android:layout_width=&quot;match_parent&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:layout_below=&quot;@id/openButton&quot;
        android:orientation=&quot;vertical&quot; &amp;gt;

        &amp;lt;TextView
            android:id=&quot;@+id/textView1&quot;
            android:layout_width=&quot;match_parent&quot;
            android:layout_height=&quot;wrap_content&quot;
            android:layout_marginTop=&quot;10dp&quot;
            android:text=&quot;Elapsed: &quot; /&amp;gt;

        &amp;lt;TextView
            android:id=&quot;@+id/textView2&quot;
            android:layout_width=&quot;match_parent&quot;
            android:layout_height=&quot;wrap_content&quot;
            android:layout_marginTop=&quot;10dp&quot;
            android:text=&quot;Status: &quot; /&amp;gt;
    &amp;lt;/LinearLayout&amp;gt;

    &amp;lt;ProgressBar
        android:id=&quot;@+id/progressbar&quot;
        style=&quot;@android:style/Widget.ProgressBar.Horizontal&quot;
        android:layout_width=&quot;match_parent&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:layout_alignLeft=&quot;@id/linear&quot;
        android:layout_below=&quot;@id/linear&quot;
        android:visibility=&quot;invisible&quot; /&amp;gt;

    &amp;lt;TextView
        android:id=&quot;@+id/barPercent&quot;
        android:layout_width=&quot;wrap_content&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:layout_alignLeft=&quot;@id/linear&quot;
        android:layout_below=&quot;@id/progressbar&quot;
        android:visibility=&quot;invisible&quot; /&amp;gt;

    &amp;lt;Button
        android:id=&quot;@+id/cancelButton&quot;
        android:layout_width=&quot;wrap_content&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:layout_below=&quot;@id/barPercent&quot;
        android:layout_centerHorizontal=&quot;true&quot;
        android:onClick=&quot;cancelButton&quot;
        android:text=&quot;Cancel&quot;
        android:visibility=&quot;invisible&quot; /&amp;gt;

    &amp;lt;TextView
        android:id=&quot;@+id/attrs&quot;
        android:layout_width=&quot;wrap_content&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:layout_alignParentBottom=&quot;true&quot;
        android:layout_alignParentRight=&quot;true&quot;
        android:layout_marginBottom=&quot;15dp&quot;
        android:text=&quot;@string/attrs&quot;
        android:textStyle=&quot;bold&quot; /&amp;gt;

&amp;lt;/RelativeLayout&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18.479999542236328px;&quot;&gt;AndroidManifest.xml&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    package=&quot;com.me.asynctaskprogressbarsample&quot;
    android:versionCode=&quot;1&quot;
    android:versionName=&quot;1.0&quot; &amp;gt;

    &amp;lt;uses-sdk
        android:minSdkVersion=&quot;7&quot;
        android:targetSdkVersion=&quot;19&quot; /&amp;gt;

    &amp;lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot; /&amp;gt;

    &amp;lt;application
        android:allowBackup=&quot;true&quot;
        android:icon=&quot;@drawable/ic_launcher&quot;
        android:label=&quot;@string/app_name&quot;
        android:theme=&quot;@style/AppTheme&quot; &amp;gt;
        &amp;lt;activity
            android:name=&quot;com.me.asynctaskprogressbarsample.MainActivity&quot;
            android:label=&quot;@string/app_name&quot; &amp;gt;
            &amp;lt;intent-filter&amp;gt;
                &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;

                &amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt;
            &amp;lt;/intent-filter&amp;gt;
        &amp;lt;/activity&amp;gt;
    &amp;lt;/application&amp;gt;

&amp;lt;/manifest&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;When you launch the sample app:&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUfDuzI_yC2aL8siQuijV-04g-8sOnCrKWIUtgiZ-B42kICniAu4_NwQ5OgOYDMw_ksmnpkKIl7gxJjbnJJh71kWdfv-Vr7q5sqHuSGmemyUQyDYiT0pfN-b7YTyE_h2PFJ3zw5zF7r-4f/s1600/a.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Android AsyncTask ProgressBar sample img&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUfDuzI_yC2aL8siQuijV-04g-8sOnCrKWIUtgiZ-B42kICniAu4_NwQ5OgOYDMw_ksmnpkKIl7gxJjbnJJh71kWdfv-Vr7q5sqHuSGmemyUQyDYiT0pfN-b7YTyE_h2PFJ3zw5zF7r-4f/s1600/a.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;212&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;When the button &quot;Open a File&quot; was clicked:&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFoYksl2tQmxZCPibilTjkIeRPgNFQN_9DikPk5wj3cLb9_YEFHLWtpsO00WjTLy_mWe3IQJ6dWPzP8_Pj-S7PHhj4v59V2pj8saFb1FkbuNKcvo86ut-Pb-uBckZrYkGmlOJDHfjWNQ0t/s1600/b.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;when the button &amp;quot;Open a File&amp;quot; was clicked&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFoYksl2tQmxZCPibilTjkIeRPgNFQN_9DikPk5wj3cLb9_YEFHLWtpsO00WjTLy_mWe3IQJ6dWPzP8_Pj-S7PHhj4v59V2pj8saFb1FkbuNKcvo86ut-Pb-uBckZrYkGmlOJDHfjWNQ0t/s1600/b.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;When a file is being read in the background:&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiio9mLFWbTJFTIQrfZoS7gTzZmdb4sbuqbgOrbagfO8Q5BWK4J5AR7iqTbMZHSK9raapsqpZih2ladIG6_aylk7QnPKbaMHJOlk35gnWa8XUyEI8zryZTYatpnLndfA8CYZh_-QofUPlJT/s1600/c.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Android AsyncTask ProgressBar sample img&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiio9mLFWbTJFTIQrfZoS7gTzZmdb4sbuqbgOrbagfO8Q5BWK4J5AR7iqTbMZHSK9raapsqpZih2ladIG6_aylk7QnPKbaMHJOlk35gnWa8XUyEI8zryZTYatpnLndfA8CYZh_-QofUPlJT/s1600/c.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;After completing the operation, show the final result to the user.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: Bitter, Arial, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggbvCp1gKgpOUY8OkSWkEDuXI9-eHcEYmI8ufeqUf3gizRWSrB5qOl7_m-6Sgc6HZ4JLuRPEjfIe6fWW8tpOy8HnBGD7Yh_I2-ZbOhFGT33XofUGg7_0eOOg4UVRpGycDo0qJk7x4BGVAo/s1600/d.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Android AsyncTask ProgressBar sample img&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggbvCp1gKgpOUY8OkSWkEDuXI9-eHcEYmI8ufeqUf3gizRWSrB5qOl7_m-6Sgc6HZ4JLuRPEjfIe6fWW8tpOy8HnBGD7Yh_I2-ZbOhFGT33XofUGg7_0eOOg4UVRpGycDo0qJk7x4BGVAo/s1600/d.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: Bitter, Arial, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Bitter, Arial, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;When the operation has been cancelled, show the final result to the user.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: Bitter, Arial, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMGrMGzx8csvK9htbB-a-P3EQSnj2sUtTP7W3sK-Z6LQinT1S8D8tTrjXg4MTnkzjqNZg0e_Mdz3C27eeWiaKrn0zQ54h-FV07GWb7wX6wyE6bB99iwttIB0G-Mv8UVw2lCKoVxEir-4rz/s1600/e.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Android AsyncTask ProgressBar sample img&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMGrMGzx8csvK9htbB-a-P3EQSnj2sUtTP7W3sK-Z6LQinT1S8D8tTrjXg4MTnkzjqNZg0e_Mdz3C27eeWiaKrn0zQ54h-FV07GWb7wX6wyE6bB99iwttIB0G-Mv8UVw2lCKoVxEir-4rz/s1600/e.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: Bitter, Arial, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Bitter, Arial, sans-serif; font-size: 13px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;i style=&quot;line-height: 18.479999542236328px;&quot;&gt;Source:&amp;nbsp;&lt;/i&gt;&lt;a href=&quot;http://developer.android.com/reference/android/os/AsyncTask.html&quot; target=&quot;_blank&quot;&gt;Android Developer (AsyncTask)&lt;/a&gt;&lt;span style=&quot;line-height: 18.479999542236328px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/ProgressBar.html&quot; target=&quot;_blank&quot;&gt;Android Developer (ProgressBar)&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://ondroids.blogspot.com/2014/06/android-asynctask-and-progress-bar.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiio9mLFWbTJFTIQrfZoS7gTzZmdb4sbuqbgOrbagfO8Q5BWK4J5AR7iqTbMZHSK9raapsqpZih2ladIG6_aylk7QnPKbaMHJOlk35gnWa8XUyEI8zryZTYatpnLndfA8CYZh_-QofUPlJT/s72-c/c.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1876006954118813193.post-5256162910916318045</guid><pubDate>Sat, 26 Apr 2014 04:43:00 +0000</pubDate><atom:updated>2014-04-25T22:07:47.874-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Android Programming</category><title>Android LinearLayout Example</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTPXZTTsyZqIoyBHVv4ZA1vg5oliwE5sH6e_eoojt7SyM0Tsx0U2o7XFUAz5EtQ-k0ANxKzgGdBSUuYzzBQqA_rTKOdiFY3gPfYkgxDpXt01V8kBhRU_qOGXAqYCX7fP_CHj9TN44wU7pW/s1600/Screenshot-23.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;android linear&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTPXZTTsyZqIoyBHVv4ZA1vg5oliwE5sH6e_eoojt7SyM0Tsx0U2o7XFUAz5EtQ-k0ANxKzgGdBSUuYzzBQqA_rTKOdiFY3gPfYkgxDpXt01V8kBhRU_qOGXAqYCX7fP_CHj9TN44wU7pW/s1600/Screenshot-23.png&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
If we use more than 1 widget on android programming we should use layout management to managae the UI (user interface) of all widgets. Layout management also called &lt;i&gt;viewgroup, &lt;/i&gt;and widgets placed in layout management called &lt;i&gt;view.&lt;/i&gt;&amp;nbsp;LinearLayout is one of the layout managements of android programming, it displays every widget as horizontal or vertical position, LinearLayout has 5 base configurations, &lt;i&gt;Orientation, Fill Model, Weight, Gravity&lt;/i&gt;, and &lt;i&gt;Padding&lt;/i&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;b&gt;Orientation&lt;/b&gt;&lt;/span&gt;, used to display the layout as horizontal or vertical position, syntax:&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;android:orientation=&quot;value [horizontal | vertical]&quot;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;&lt;b&gt;Fill Model&lt;/b&gt;, &lt;/i&gt;used to set view of widget elements against available space of layout, it has 3 options:&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;
&lt;li&gt;specific dimension, like 125dp.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-align: left;&quot;&gt;wrap_content, &amp;nbsp;natural space concept.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-align: left;&quot;&gt;fill_parent, widget will use a whole available space.&lt;/span&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ol&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;&lt;b&gt;Weight&lt;/b&gt;,&amp;nbsp;&lt;/i&gt;used to set width and height of layout&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;&lt;b&gt;Gravity&lt;/b&gt;,&amp;nbsp;&lt;/i&gt;by default LinearLayout is set to &quot;&lt;i&gt;Left and top aligned&lt;/i&gt;&quot;. Use the following values to use different gravity.&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;i&gt;left&lt;/i&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;center_horizontal&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;right for left-aligned&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;centered&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;right-aligned&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;&lt;b&gt;Padding&lt;/b&gt;,&amp;nbsp;&lt;/i&gt;it has 4 base values, &lt;i&gt;paddingleft&lt;/i&gt;, &lt;i&gt;paddingright&lt;/i&gt;, &lt;i&gt;paddingtop&lt;/i&gt;, and &lt;i&gt;paddingbottom&lt;/i&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here&#39;s the sample code to use LinearLayout in android programming.&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;XML layout (/res/layout/{file}.xml)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
    android:id=&quot;@+id/LinearLayout1&quot;
    android:layout_width=&quot;match_parent&quot;
    android:layout_height=&quot;match_parent&quot;
    android:orientation=&quot;vertical&quot;
    android:paddingBottom=&quot;@dimen/activity_vertical_margin&quot;
    android:paddingLeft=&quot;@dimen/activity_horizontal_margin&quot;
    android:paddingRight=&quot;@dimen/activity_horizontal_margin&quot;
    android:paddingTop=&quot;@dimen/activity_vertical_margin&quot;
    tools:context=&quot;.MainActivity&quot; &amp;gt;
    
    &amp;lt;RadioGroup 
        android:id=&quot;@+id/orientation&quot;
        android:orientation=&quot;horizontal&quot;
        android:layout_width=&quot;wrap_content&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:padding=&quot;5dp&quot;&amp;gt;
        
        &amp;lt;RadioButton 
            android:id=&quot;@+id/horizontal&quot;
            android:text=&quot;@string/rb1&quot;/&amp;gt;
        &amp;lt;RadioButton 
            android:id=&quot;@+id/vertical&quot;
            android:text=&quot;@string/rb2&quot;/&amp;gt;
    &amp;lt;/RadioGroup&amp;gt;
    
    &amp;lt;RadioGroup 
        android:id=&quot;@+id/gravity&quot;
        android:orientation=&quot;vertical&quot;
        android:layout_width=&quot;fill_parent&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:padding=&quot;5dp&quot;&amp;gt;
        
        &amp;lt;RadioButton 
            android:id=&quot;@+id/left&quot;
            android:text=&quot;@string/rb3&quot;/&amp;gt;
        &amp;lt;RadioButton 
            android:id=&quot;@+id/center&quot;
            android:text=&quot;@string/rb4&quot;/&amp;gt;
        &amp;lt;RadioButton 
            android:id=&quot;@+id/right&quot;
            android:text=&quot;@string/rb5&quot;/&amp;gt;
    &amp;lt;/RadioGroup&amp;gt;

&amp;lt;/LinearLayout&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;XML values (/res/values/strings.xml)&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;resources&amp;gt;

    &amp;lt;string name=&quot;app_name&quot;&amp;gt;Linear layout&amp;lt;/string&amp;gt;
    &amp;lt;string name=&quot;action_settings&quot;&amp;gt;Settings&amp;lt;/string&amp;gt;
    &amp;lt;string name=&quot;rb1&quot;&amp;gt;Horizontal&amp;lt;/string&amp;gt;
    &amp;lt;string name=&quot;rb2&quot;&amp;gt;Vertical&amp;lt;/string&amp;gt;
    &amp;lt;string name=&quot;rb3&quot;&amp;gt;Left&amp;lt;/string&amp;gt;
    &amp;lt;string name=&quot;rb4&quot;&amp;gt;Center&amp;lt;/string&amp;gt;
    &amp;lt;string name=&quot;rb5&quot;&amp;gt;Right&amp;lt;/string&amp;gt;

&amp;lt;/resources&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Java file (/src/{package}/{file}.java)&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;scrollbox&quot;&gt;
&lt;pre class=&quot;brush: java&quot;&gt;package first.linear_layout;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.Gravity;
import android.widget.LinearLayout;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;

public class MainActivity extends Activity implements OnCheckedChangeListener {

 private RadioGroup orientation, gravity;
 
 @Override
 protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  
  orientation = (RadioGroup)findViewById(R.id.orientation);
  orientation.setOnCheckedChangeListener(this);
  gravity = (RadioGroup)findViewById(R.id.gravity);
  gravity.setOnCheckedChangeListener(this);
 }

 @Override
 public boolean onCreateOptionsMenu(Menu menu) {
  // Inflate the menu; this adds items to the action bar if it is present.
  getMenuInflater().inflate(R.menu.main, menu);
  return true;
 }

 @Override
 public void onCheckedChanged(RadioGroup group, int checkedId) {
  // TODO Auto-generated method stub
  switch(checkedId){
  case R.id.horizontal:
   orientation.setOrientation(LinearLayout.HORIZONTAL);
   break;
  case R.id.vertical:
   orientation.setOrientation(LinearLayout.VERTICAL);
   break;
  case R.id.left:
   gravity.setGravity(Gravity.LEFT);
   break;
  case R.id.center:
   gravity.setGravity(Gravity.CENTER_HORIZONTAL);
   break;
  case R.id.right:
   gravity.setGravity(Gravity.RIGHT);
   break;
  }
  
 }

}
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Here&#39;s one of the output examples:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Vmoz0w6NbeAuXyx_TwEbPR8gQi2Z1xAOqafRaEhsM5xfnhkHyZjshAdGV5ydmZRK8gaqgE4Z3F5Crr8qzXPyXDw2cyrFPjPv3RUl5ZePVUu_1T3L1SsaS8OyS_iELkqBYHn6UxRPfksA/s1600/Screenshot-23.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;android linear&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Vmoz0w6NbeAuXyx_TwEbPR8gQi2Z1xAOqafRaEhsM5xfnhkHyZjshAdGV5ydmZRK8gaqgE4Z3F5Crr8qzXPyXDw2cyrFPjPv3RUl5ZePVUu_1T3L1SsaS8OyS_iELkqBYHn6UxRPfksA/s1600/Screenshot-23.png&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://ondroids.blogspot.com/2014/04/android-linearlayout-example.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTPXZTTsyZqIoyBHVv4ZA1vg5oliwE5sH6e_eoojt7SyM0Tsx0U2o7XFUAz5EtQ-k0ANxKzgGdBSUuYzzBQqA_rTKOdiFY3gPfYkgxDpXt01V8kBhRU_qOGXAqYCX7fP_CHj9TN44wU7pW/s72-c/Screenshot-23.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1876006954118813193.post-4839359560033390751</guid><pubDate>Fri, 25 Apr 2014 13:01:00 +0000</pubDate><atom:updated>2014-04-25T07:01:54.135-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Android Tips</category><title>How To Tether Your Android Smartphone In Linux</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwJKwzbbEikdEA8u2I2mnqXjFd4vn1wz30_zjyelF4oz5xhoCgSs4x2wRhHoLX40itkfkDcNu74-4GQSvofa7kwjEPo7MbDaekutAlC73I_noQFtcjowEqvabWDzJc20xG4bp9N2IFuIyU/s1600/android_tethering2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Android Tether&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwJKwzbbEikdEA8u2I2mnqXjFd4vn1wz30_zjyelF4oz5xhoCgSs4x2wRhHoLX40itkfkDcNu74-4GQSvofa7kwjEPo7MbDaekutAlC73I_noQFtcjowEqvabWDzJc20xG4bp9N2IFuIyU/s1600/android_tethering2.jpg&quot; height=&quot;206&quot; title=&quot;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
in this post we will talk about how to tether android device in linux operating system. Android has a feature for sharing internet connection with other device that connecting with android, such as via USB cable. In this tutorial I use Samsung GT-S7500 device (android 2.3.6 Gingerbread) and debian 6 (squeeze) as operating system on my computer.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here&#39;s step by step how to tether android device in Linux/debian via USB cable.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;u&gt;Activate data packet on android device:&lt;/u&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;go to &lt;i&gt;Settings &amp;gt;&amp;gt; Wireless and Network &amp;gt;&amp;gt; Mobile Networks&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;tick option &lt;i&gt;Use packet data &lt;/i&gt;to activate it&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
And now the android device has been connected to the internet&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;Activate USB Tethering on android device:&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;connect android device to the computer using USB cable&lt;/li&gt;
&lt;li&gt;go to &lt;i&gt;Settings &amp;gt;&amp;gt; Wireless and Network &amp;gt;&amp;gt; Tethering and portable hotspot&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;tick &lt;i&gt;USB Tethering &lt;/i&gt;to activate it&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
Finally, now the computer got connection to the internet.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;u&gt;Linux issue:&lt;/u&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
I was using debian squeeze as main operating system on my computer. When I was online there&#39;s something that make me had to shut down the USB Tethering for a while, I had to disconnect the USB cable from the computer because I had to do something else. When I was done and I tried to reconnect the USB Tethering, but something wrong happened. The computer couldn&#39;t receive internet access from android device, whereas computer and android device had been connected via USB cable and I also activated the USB Tethering from android device. Finally I had to restart my computer to get the connection back from USB Tethering. If you are facing the same problem, actually we just have to restart the &lt;i&gt;network-manager &lt;/i&gt;on computer to get the connection back. Here&#39;s what you should do:&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;make sure the computer is connected to the android device via USB cable&lt;/li&gt;
&lt;li&gt;activate the USB Tethering&lt;/li&gt;
&lt;li&gt;on computer, open terminal&lt;/li&gt;
&lt;li&gt;login as superuser (root)&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;in my system&lt;i&gt;&amp;nbsp;network-manager &lt;/i&gt;placed on &lt;i&gt;/etc/init.d/, &lt;/i&gt;so I used this command to get access to the&amp;nbsp;&lt;i&gt;network-manager &lt;/i&gt;&quot;&lt;i&gt;/etc/init.d/network-manager restart&quot; &lt;/i&gt;to restart the &lt;i&gt;network-manager&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;and now everything should be working fine&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsHKxI40e-Gl8PvS_yoQDVMNIlqHXeBm_XYGuVPd4taxRCGhy3Up161HgbaNHaeXaIlsUtXXta1RBZWtgZwmQYClOwpXx_JzhoUa864m3N_fmys3JuJmObxtX6KRsRqFsRDA2Bxvtjxe3U/s1600/Screenshot-6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;android tethering&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsHKxI40e-Gl8PvS_yoQDVMNIlqHXeBm_XYGuVPd4taxRCGhy3Up161HgbaNHaeXaIlsUtXXta1RBZWtgZwmQYClOwpXx_JzhoUa864m3N_fmys3JuJmObxtX6KRsRqFsRDA2Bxvtjxe3U/s1600/Screenshot-6.png&quot; height=&quot;222&quot; title=&quot;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://ondroids.blogspot.com/2014/04/how-to-tether-your-android-smartphone.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwJKwzbbEikdEA8u2I2mnqXjFd4vn1wz30_zjyelF4oz5xhoCgSs4x2wRhHoLX40itkfkDcNu74-4GQSvofa7kwjEPo7MbDaekutAlC73I_noQFtcjowEqvabWDzJc20xG4bp9N2IFuIyU/s72-c/android_tethering2.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1876006954118813193.post-2282847328102663823</guid><pubDate>Fri, 25 Apr 2014 10:52:00 +0000</pubDate><atom:updated>2014-04-25T03:52:06.598-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Android Apps</category><title>Framaroot, a One Click Apk to Root Android Devices</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUGkhRmZRH0VsYdN2XCNb_pxjqsZ8KvIA-ObajMrW7lvaeotsQOqkKBMygZ_W0oXEAZfQm2qzDkUuYDw1UXlm3zO02CDrxtbV-cxuL9Mt6kLl-dRUvp78amcLyI9wiODWZgfPZ23wrhyphenhyphenrk/s1600/framaroot.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;framaroot&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUGkhRmZRH0VsYdN2XCNb_pxjqsZ8KvIA-ObajMrW7lvaeotsQOqkKBMygZ_W0oXEAZfQm2qzDkUuYDw1UXlm3zO02CDrxtbV-cxuL9Mt6kLl-dRUvp78amcLyI9wiODWZgfPZ23wrhyphenhyphenrk/s1600/framaroot.jpg&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Would you like to have a root/ superuser access on your android device, but you don&#39;t expect an complicated step for make it happen? as we known if we want to root the android device, we have to follow complicated steps just to make your android get the root access.&amp;nbsp;For some people maybe it&#39;s not a problem to do a traditional ways for rooting android, but for the others it&#39;s like find an impasse. Finally, their android had never got root access. Then they said &quot;is not any easier way for rooting my android?&quot;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Right now please stop asking like that, because an app that can root some android devices easier than before has been released, it called Framaroot.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Before we continue, first you should check if your android supported by Framaroot. &quot;Hey what are you talking about? I think this app can work on all devices!&quot;. Remember, no-application&#39;s perfect. So check your device &lt;a href=&quot;http://forum.xda-developers.com/apps/framaroot/framaroot-supported-devices-t2722980&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
If your device is supported by Framaroot, then you can download the apk file from &lt;a href=&quot;http://forum.xda-developers.com/apps/framaroot/root-framaroot-one-click-apk-to-root-t2130276&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; (Framaroot-1.9.1.apk is the latest version of Framaroot when this article posted). After the app successfully downloaded, save it into external SD card, then install the app on your device.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
How to use Framaroot on android device?&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Open the Framaroot app&lt;/li&gt;
&lt;li&gt;Choose Superuser or SuperSU&lt;/li&gt;
&lt;li&gt;Tap Aragorn or Gandalf&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_LE_kez3ZFsw2qihZUAjKhhQyx4yH1LL-OTux1EMTTuBYZd17ibBXtekhzN8YvXAMYMAvjh6bYfJ5J656paqCILtNRzP65HJRevOpvFz8ZfmSN2xTjYU9n1DQ8PA3ckQVog-LWpyVz3Bi/s1600/Framaroot-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Framaroot&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_LE_kez3ZFsw2qihZUAjKhhQyx4yH1LL-OTux1EMTTuBYZd17ibBXtekhzN8YvXAMYMAvjh6bYfJ5J656paqCILtNRzP65HJRevOpvFz8ZfmSN2xTjYU9n1DQ8PA3ckQVog-LWpyVz3Bi/s1600/Framaroot-2.jpg&quot; height=&quot;236&quot; title=&quot;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Then wait until Framaroot shows the message like this &quot;&lt;span style=&quot;background-color: white; line-height: 20px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Superuser and su binary installed. You have to reboot your device&quot;. once you got the message it means your device has successfully rooted and now you have to reboot your device to finish the pocess.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; line-height: 20px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 20px;&quot;&gt;In addition to root, Framaroot can be used to unroot android device with the same way for rooting. The different is you have to choose unroot in step 2, not Superuser or SuperSU.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeiqn8rAmtd72jINn9yPkjjvYffef2ZIvkMhznLwD2XzTY3m4Y0LBQGl_OosZ1idm5d9HB69X3CQ9alTRnW2Zb_sIoE2EGmv8Zc7EcTgQcnqaJXvtkrILidneQ14-Mn1hbF3mUVBST1NdZ/s1600/Framaroot-Work(1).jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Framaroot&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeiqn8rAmtd72jINn9yPkjjvYffef2ZIvkMhznLwD2XzTY3m4Y0LBQGl_OosZ1idm5d9HB69X3CQ9alTRnW2Zb_sIoE2EGmv8Zc7EcTgQcnqaJXvtkrILidneQ14-Mn1hbF3mUVBST1NdZ/s1600/Framaroot-Work(1).jpg&quot; height=&quot;206&quot; title=&quot;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://forum.xda-developers.com/apps/framaroot/root-framaroot-one-click-apk-to-root-t2130276&quot; target=&quot;_blank&quot;&gt;Check all versions and more info about Framaroot on XDA&lt;/a&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;*Note:&amp;nbsp;&lt;span style=&quot;background-color: white; line-height: 23px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;On Android is not responsible for any damages caused directly or indirectly by a rooting method. Any action for rooting your device is done it only under your responsibility.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
More post about Android Root:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://ondroids.blogspot.com/2014/04/download-root-checker-by-burrow-apps.html&quot; target=&quot;_blank&quot;&gt;Download Root Checker by Burrow Apps&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://ondroids.blogspot.com/2014/04/framaroot-one-click-apk-to-root-android.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUGkhRmZRH0VsYdN2XCNb_pxjqsZ8KvIA-ObajMrW7lvaeotsQOqkKBMygZ_W0oXEAZfQm2qzDkUuYDw1UXlm3zO02CDrxtbV-cxuL9Mt6kLl-dRUvp78amcLyI9wiODWZgfPZ23wrhyphenhyphenrk/s72-c/framaroot.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1876006954118813193.post-5658711107339144414</guid><pubDate>Fri, 25 Apr 2014 08:35:00 +0000</pubDate><atom:updated>2014-04-25T01:35:05.389-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Android Apps</category><title>Download Root Checker by Burrow Apps</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3l-jbZWu2n357aX7duORyCOAVpOxVbxkrZcDI9Bf5ki-pTeTHT2lIdZnChi-ycKa3klGAw8XQBlGaxOlDucDx7r4mWbdbvNLn5RfR5ZPMKnkxoY_xVDqihTd8TM_EWXa4qEeNv_FncGee/s1600/burrow.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;root checker&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3l-jbZWu2n357aX7duORyCOAVpOxVbxkrZcDI9Bf5ki-pTeTHT2lIdZnChi-ycKa3klGAw8XQBlGaxOlDucDx7r4mWbdbvNLn5RfR5ZPMKnkxoY_xVDqihTd8TM_EWXa4qEeNv_FncGee/s1600/burrow.jpg&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Has my phone &quot;rooted&quot;? what can I do to find out about that? can I ask my phone directly? Oh, I don&#39;t think so. that&#39;s not what you want to do.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
If you have any question like the above or something like that, it means you need an apps that can help you to find out more about root/ super user status on your phone, Rooted or Not?&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Root Checker by Burrows Apps is one of root checker apps available on Android Market. It&#39;s a small tool to check if your phone has root access or not, this applications displays verbose information that is needed in order to check if your phone is truthfully has root access.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; line-height: 20px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Disclaimer: THIS APPLICATION DOES NOT ROOT YOUR PHONE.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; line-height: 20px; margin-bottom: 5px; padding: 0px; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; line-height: 20px; margin-bottom: 5px; padding: 0px; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Root Checker checks for root on your phone and has the following features:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; margin-bottom: 5px; padding: 0px; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 20px;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Detects if your phone has Root access&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Displays the following content:&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 20px;&quot;&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Device and Android Version along with the API Level&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Displays SuperUser Version&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Displays BusyBox and Su Versions&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;User and Group Id&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;SuperUser Location&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Su and Sudo Location&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Environment Variables&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 20px;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Displays Phone&#39;s Build Information&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://play.google.com/store/apps/details?id=burrows.apps.rootchecker&quot; target=&quot;_blank&quot;&gt;More information about this apps on Play Store&lt;/a&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
How to use Root Checker by Burrows Apps?&lt;/h3&gt;
&lt;div&gt;
&lt;u style=&quot;font-family: inherit;&quot;&gt;Download and Install:&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
Download and install this app from &lt;a href=&quot;https://play.google.com/store/apps/details?id=burrows.apps.rootchecker&quot; target=&quot;_blank&quot;&gt;Play Store&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;Check your phone with Root Checker:&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here is an example of using this app on android device.&amp;nbsp;&lt;span style=&quot;font-family: inherit;&quot;&gt;After the app successfully installed on your device, and now tap the root checker icon to run the app. Here is the main window of Root Checker Apps, tap the &lt;i&gt;CHECK&lt;/i&gt; button to start checking you phone.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKRCygHN3ZRUyLSfJYI9hms5xuVZSuFffPV9Cx4N-EHPB3koPzqFuCYxQaZNZMSzC0bV97AeEE1ACKcLxPx3egFhRJ3_Yq_H4xHXYz4C6pYcEBjEAnk9OGD16qBKISxk710_HuMkmtKccN/s1600/2014_04_25_12.38.43.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;root checker&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKRCygHN3ZRUyLSfJYI9hms5xuVZSuFffPV9Cx4N-EHPB3koPzqFuCYxQaZNZMSzC0bV97AeEE1ACKcLxPx3egFhRJ3_Yq_H4xHXYz4C6pYcEBjEAnk9OGD16qBKISxk710_HuMkmtKccN/s1600/2014_04_25_12.38.43.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;236&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Bz2Bz7DT6ksZLEPQWMMjogMBzksOe7cYHvTLwUoHn2yV8cqrDqq-BJ3ls4hWUqHKaFKDvEaD3Hm_iPabVdXVbvKSrjhCTLauFSLNqRZPajGgcoaflsaCgZgcax-5sXRR7lXc1_42GyIb/s1600/2014_04_25_12.39.41.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;root checker&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Bz2Bz7DT6ksZLEPQWMMjogMBzksOe7cYHvTLwUoHn2yV8cqrDqq-BJ3ls4hWUqHKaFKDvEaD3Hm_iPabVdXVbvKSrjhCTLauFSLNqRZPajGgcoaflsaCgZgcax-5sXRR7lXc1_42GyIb/s1600/2014_04_25_12.39.41.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;238&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-ZTH9IkAaj6hyphenhyphenFUw-lCM_FLrBiwXN11P5obTW2-6qci-hb8bFEqgDCDJvSTsYvCXv7qLEnRlSD_Ic-WrniAhruSf6t8eZZaQYbNbVT0kZ4JAEzxZslfz4-XaStScQfbHwren1bEVmfeg8/s1600/2014_04_25_12.40.04.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;root checker&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-ZTH9IkAaj6hyphenhyphenFUw-lCM_FLrBiwXN11P5obTW2-6qci-hb8bFEqgDCDJvSTsYvCXv7qLEnRlSD_Ic-WrniAhruSf6t8eZZaQYbNbVT0kZ4JAEzxZslfz4-XaStScQfbHwren1bEVmfeg8/s1600/2014_04_25_12.40.04.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;238&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtzgA7E5iT4Q3L58KlI53rIFiuTQGfm6rE_cOMSGObZ2XHdweWqabO3KU7kIkf9Mb6Nsy5L2esGFmXqq8eTH7Rs_IJnVAZwuhEl8YQukju3_at-Y9XlaBSKdgVdnrkOzR8YeJBOsVtk60l/s1600/2014_04_25_12.40.41.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;root checker&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtzgA7E5iT4Q3L58KlI53rIFiuTQGfm6rE_cOMSGObZ2XHdweWqabO3KU7kIkf9Mb6Nsy5L2esGFmXqq8eTH7Rs_IJnVAZwuhEl8YQukju3_at-Y9XlaBSKdgVdnrkOzR8YeJBOsVtk60l/s1600/2014_04_25_12.40.41.png&quot; height=&quot;320&quot; title=&quot;&quot; width=&quot;237&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
</description><link>http://ondroids.blogspot.com/2014/04/download-root-checker-by-burrow-apps.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3l-jbZWu2n357aX7duORyCOAVpOxVbxkrZcDI9Bf5ki-pTeTHT2lIdZnChi-ycKa3klGAw8XQBlGaxOlDucDx7r4mWbdbvNLn5RfR5ZPMKnkxoY_xVDqihTd8TM_EWXa4qEeNv_FncGee/s72-c/burrow.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1876006954118813193.post-2571376822557844397</guid><pubDate>Fri, 18 Apr 2014 05:08:00 +0000</pubDate><atom:updated>2014-04-17T23:56:08.001-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Android News</category><title>Behind The Scene of Google&#39;s Project Ara</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVJeNZ5XuAcTFMPBi8eJ1Z1PBGmosQN6m72sMjfVWdMHJElMPDuOTqugNgUbrCnWsW9ZfUq1PXESxA27THNrmGvfAgsUSxQ6Rzsk7nFBsrBhbkBwVYZw3FyfMFj5LbRfGu_qHk7ZLK4VoH/s1600/ara-1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Ara image by google&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVJeNZ5XuAcTFMPBi8eJ1Z1PBGmosQN6m72sMjfVWdMHJElMPDuOTqugNgUbrCnWsW9ZfUq1PXESxA27THNrmGvfAgsUSxQ6Rzsk7nFBsrBhbkBwVYZw3FyfMFj5LbRfGu_qHk7ZLK4VoH/s1600/ara-1.jpg&quot; height=&quot;212&quot; title=&quot;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
January 29th Google announced that they have agreed to sell Motorola to one of the largest electronics companies in China, Lenovo.&amp;nbsp;But in fact, &amp;nbsp;behind it all Google didn&#39;t fully release the Motorola.&amp;nbsp;Google still maintains an organization in Motorola,&amp;nbsp;the group called ATAP (&lt;i&gt;Advanced Technology and Projects&lt;/i&gt;)&amp;nbsp;that lead by Regina Dugan, a former director of DARPA (&lt;i&gt;Defense Advanced Research Projects Agency&lt;/i&gt;).&amp;nbsp;ATAP aims to bring the same approach to mobile-gadget innovation that has DARPA used,&amp;nbsp;such as satellite navigation and other technologies that started from small things to be something very important.&lt;br /&gt;
&lt;br /&gt;
The ATAP group specializes in ideas that considered daring and wild,&amp;nbsp;google calls it &lt;i&gt;moonshots&lt;/i&gt;. Project Ara is one of ideas or initiatives that has been announced by ATAP, project ara aims to build a smartphone that&amp;nbsp;can be breaking it down into modules that can be assembled and customized to unlimited number of configurations.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaw6r_6htNfet6iIaNe8S_Fhe7VFlOJRs34J_37Ig5wqK4jlMLOdeKC0mrciO1AinUHW9kiiOtZK8QxvC7Pbxdxmve7RgPhlKDw1DE6KOovYMSfWkyhzo0N-nOrQBwGPoE7mcyyyKe1j_S/s1600/ara-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Ara image by google&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaw6r_6htNfet6iIaNe8S_Fhe7VFlOJRs34J_37Ig5wqK4jlMLOdeKC0mrciO1AinUHW9kiiOtZK8QxvC7Pbxdxmve7RgPhlKDw1DE6KOovYMSfWkyhzo0N-nOrQBwGPoE7mcyyyKe1j_S/s1600/ara-2.png&quot; height=&quot;178&quot; title=&quot;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Right now, if you buy a smartphone is likely that you can only customize the superficial part of it,&amp;nbsp;such as replacement of the casing, battery, and something like that.&amp;nbsp;Of course it is not a unique feature of a smartphone.&amp;nbsp;The project ara developer is hoping to make smartphones that more interesting.&amp;nbsp;In other words project ara aims to develop a smartphone with providing hardware parts that can be customized,&amp;nbsp;like what we usually do to software applications (like install/ uninstall the apps).&amp;nbsp;That&#39;s what google is currently being developed through the project ara.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig8u2I8-7-w-pF-w8bCTNkD40T3vNW9uZuqYnAqgYbefoHUbjo7H70qBunV32OHXDEGa-8XFzbiActq-tRJYYdEVABTx0eX78ofryg1eXQEOmxJrTDA7XfrOkPWKRg8Xdxc2gNTfam8xxK/s1600/ara-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Ara image by google&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig8u2I8-7-w-pF-w8bCTNkD40T3vNW9uZuqYnAqgYbefoHUbjo7H70qBunV32OHXDEGa-8XFzbiActq-tRJYYdEVABTx0eX78ofryg1eXQEOmxJrTDA7XfrOkPWKRg8Xdxc2gNTfam8xxK/s1600/ara-3.png&quot; height=&quot;213&quot; title=&quot;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
By looking at the concept of the modular phone,&amp;nbsp;of course this stuff is reasonable to be waited. Project Ara will give a different taste from a mobile phone.&lt;/div&gt;
&lt;/div&gt;
</description><link>http://ondroids.blogspot.com/2014/04/behind-scene-of-googles-project-ara.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVJeNZ5XuAcTFMPBi8eJ1Z1PBGmosQN6m72sMjfVWdMHJElMPDuOTqugNgUbrCnWsW9ZfUq1PXESxA27THNrmGvfAgsUSxQ6Rzsk7nFBsrBhbkBwVYZw3FyfMFj5LbRfGu_qHk7ZLK4VoH/s72-c/ara-1.jpg" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>