<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>onunbind Archives - Truiton</title>
	<atom:link href="https://www.truiton.com/tag/onunbind/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Technology Reaching Us In Time - Online</description>
	<lastBuildDate>Mon, 25 Nov 2019 09:50:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/www.truiton.com/wp-content/uploads/2022/11/cropped-truiton_new_logo_half_white.png?fit=32%2C32&#038;ssl=1</url>
	<title>onunbind Archives - Truiton</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">54534495</site>	<item>
		<title>Bound Service Example In Android</title>
		<link>https://www.truiton.com/2014/11/bound-service-example-android/</link>
					<comments>https://www.truiton.com/2014/11/bound-service-example-android/#comments</comments>
		
		<dc:creator><![CDATA[Mohit Gupt]]></dc:creator>
		<pubDate>Sat, 22 Nov 2014 19:16:38 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[onunbind]]></category>
		<category><![CDATA[Service]]></category>
		<category><![CDATA[Service Activity Communication]]></category>
		<category><![CDATA[Timer Service]]></category>
		<guid isPermaLink="false">http://www.truiton.com/?p=737</guid>

					<description><![CDATA[<p>In my previous tutorials I have been talking about Services in Android, showcasing basic functions of a service. This tutorial also shows Android service class, but it revolves around a specific feature of this class i.e binding of service to an activity. It also briefly explains the features associated with Android bind service type. Although&#8230;&#160;<a href="https://www.truiton.com/2014/11/bound-service-example-android/" rel="bookmark">Read More &#187;<span class="screen-reader-text">Bound Service Example In Android</span></a></p>
<p>The post <a href="https://www.truiton.com/2014/11/bound-service-example-android/">Bound Service Example In Android</a> appeared first on <a href="https://www.truiton.com">Truiton</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-image"><figure class="aligncenter"><a href="https://www.flickr.com/photos/23266521@N02/4068305894/"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="640" height="427" data-attachment-id="745" data-permalink="https://www.truiton.com/2014/11/bound-service-example-android/android-bind-service-featured/" data-orig-file="https://i0.wp.com/www.truiton.com/wp-content/uploads/2014/11/Android-Bind-Service-Featured.jpg?fit=640%2C427&amp;ssl=1" data-orig-size="640,427" data-comments-opened="1" data-image-title="Android Bind Service Featured" data-image-description="&lt;p&gt;Photo Credit: &lt;a href=&quot;https://www.flickr.com/photos/23266521@N02/4068305894/&quot;&gt;Francisco Sánchez&lt;/a&gt; via &lt;a href=&quot;http://compfight.com&quot;&gt;Compfight&lt;/a&gt; &lt;a href=&quot;https://creativecommons.org/licenses/by-nc-sa/2.0/&quot;&gt;cc&lt;/a&gt; &lt;/p&gt;
" data-image-caption="" data-large-file="https://i0.wp.com/www.truiton.com/wp-content/uploads/2014/11/Android-Bind-Service-Featured.jpg?fit=640%2C427&amp;ssl=1" src="https://i0.wp.com/www.truiton.com/wp-content/uploads/2014/11/Android-Bind-Service-Featured.jpg?resize=640%2C427" alt="Photo Credit: Francisco Sánchez via Compfight cc" class="wp-image-745" srcset="https://i0.wp.com/www.truiton.com/wp-content/uploads/2014/11/Android-Bind-Service-Featured.jpg?w=640&amp;ssl=1 640w, https://i0.wp.com/www.truiton.com/wp-content/uploads/2014/11/Android-Bind-Service-Featured.jpg?resize=300%2C200&amp;ssl=1 300w" sizes="(max-width: 640px) 100vw, 640px" /></a></figure></div>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">In my previous tutorials I have been talking about <a title="Android Service" href="http://developer.android.com/reference/android/app/Service.html" target="_blank" rel="noopener noreferrer">Services</a> in Android, showcasing basic functions of a service. This tutorial also shows Android service class, but it revolves around a specific feature of this class i.e binding of service to an activity. It also briefly explains the features associated with Android bind service type. Although if you are not clear on what android bind services are, here&#8217;s a brief explanation. A bound service is a type of service which can bind with one or more application components like activities and return the results back to them.</p>



<p class="wp-block-paragraph">As I explained in my previous tutorials that in Android services are used for long running operations, presumably never ending operations. Here in this <a title="Bound Service Example In Android" href="http://www.truiton.com/2014/11/bound-service-example-android/">Bound Service Example In Android</a> tutorial I would also show a never ending service. But talking about services here, I would like to say that service is an Android component which should be used only when you don&#8217;t have a requirement to display something on user interface. Most of the times, services are used for long running network operations. If you want to explore more on services have a look at some of my tutorials listed below:</p>



<ol class="wp-block-list"><li>&nbsp;<a title="Android Service and BroadcastReceiver Example" href="http://www.truiton.com/2014/09/android-service-broadcastreceiver-example/" target="_blank" rel="noopener noreferrer">Android Service and BroadcastReceiver Example </a></li><li>&nbsp;<a title="Android Foreground Service Example" href="http://www.truiton.com/2014/10/android-foreground-service-example/" target="_blank" rel="noopener noreferrer">Android Foreground Service Example&nbsp;</a></li></ol>



<p class="wp-block-paragraph"></p>



<h2 class="wp-block-heading">Android Service: Return Data To Activity</h2>



<p class="wp-block-paragraph">While working with Android services, there comes a situation where we would want the service to communicate with an activity. To accomplish this task one has to bind a service to an activity, this type of service is called an android bound service. After a service is bound to an activity one can return the results back to the calling activity. Here in this tutorial I would start a timer service which would keep counting a timer from the start of service. Then I will bind this service to the same activity, which would make this a bound service. Why I started a service and then bind it? will answer this later in the tutorial. For now lets start with some code:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="xml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;?xml version="1.0" encoding="utf-8"?>
&lt;manifest package="com.truiton.boundservice"
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:versionCode="1"
          android:versionName="1.0">

    &lt;application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
        &lt;activity
            android:name=".MainActivity"
            android:label="@string/app_name">
            &lt;intent-filter>
                &lt;action android:name="android.intent.action.MAIN"/>

                &lt;category android:name="android.intent.category.LAUNCHER"/>
            &lt;/intent-filter>
        &lt;/activity>

        &lt;service android:name="com.truiton.boundservice.BoundService">
        &lt;/service>
    &lt;/application>

&lt;/manifest></pre>



<p class="wp-block-paragraph">In the above piece of code you can see that I have defined the service and an activity in the manifest. Moving on lets define the service which will be bound to an activity.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">package com.truiton.boundservice;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.os.SystemClock;
import android.util.Log;
import android.widget.Chronometer;

public class BoundService extends Service {
	private static String LOG_TAG = "BoundService";
	private IBinder mBinder = new MyBinder();
	private Chronometer mChronometer;

	@Override
	public void onCreate() {
		super.onCreate();
		Log.v(LOG_TAG, "in onCreate");
		mChronometer = new Chronometer(this);
		mChronometer.setBase(SystemClock.elapsedRealtime());
		mChronometer.start();
	}

	@Override
	public IBinder onBind(Intent intent) {
		Log.v(LOG_TAG, "in onBind");
		return mBinder;
	}

	@Override
	public void onRebind(Intent intent) {
		Log.v(LOG_TAG, "in onRebind");
		super.onRebind(intent);
	}

	@Override
	public boolean onUnbind(Intent intent) {
		Log.v(LOG_TAG, "in onUnbind");
		return true;
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
		Log.v(LOG_TAG, "in onDestroy");
		mChronometer.stop();
	}

	public String getTimestamp() {
		long elapsedMillis = SystemClock.elapsedRealtime()
				- mChronometer.getBase();
		int hours = (int) (elapsedMillis / 3600000);
		int minutes = (int) (elapsedMillis - hours * 3600000) / 60000;
		int seconds = (int) (elapsedMillis - hours * 3600000 - minutes * 60000) / 1000;
		int millis = (int) (elapsedMillis - hours * 3600000 - minutes * 60000 - seconds * 1000);
		return hours + ":" + minutes + ":" + seconds + ":" + millis;
	}

	public class MyBinder extends Binder {
		BoundService getService() {
			return BoundService.this;
		}
	}
}</pre>



<p class="wp-block-paragraph">Ok the above <code>BoundService</code> class is the main service class which will bound to an activity. Now since this is a bound service tutorial, in the above class I have tried to create a never ending timer service, as it should be in a real world scenario. If you closely observe the above stated code, you would see that this timer service runs a <a title="Android Chronometer" href="http://developer.android.com/reference/android/widget/Chronometer.html" target="_blank" rel="noopener noreferrer">Chronometer</a>, and returns time-stamp through a public method. Since this method is a public method of <code>BoundService</code> class it may be accessed only through an object of this class. In-comes the Android Bind Service concepts.</p>



<p class="wp-block-paragraph">To do this I have created a <code>MyBinder</code> class which inherits <a title="Android Binder Class" href="http://developer.android.com/reference/android/os/Binder.html" target="_blank" rel="noopener noreferrer">Binder</a> class which in-turn implements <a title="Android IBinder Interface" href="http://developer.android.com/reference/android/os/IBinder.html" target="_blank" rel="noopener noreferrer">IBinder</a> interface. This class has a method which returns the object of this <code>BoundService</code> class. Though this object any android application component would be able to access public methods of this class.</p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">Now before defining the class which will bind this Android service, lets make a layout for activity:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="xml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FFFFFF"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.truiton.boundservice.MainActivity" >

    &lt;ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="-80dp"
        android:src="@drawable/truiton_sq" />

    &lt;Button
        android:id="@+id/print_timestamp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="130dp"
        android:text="Print Timestamp" />

    &lt;TextView
        android:id="@+id/timestamp_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/print_timestamp"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="120dp"
        android:text=""
        android:textAppearance="?android:attr/textAppearanceLarge" />

    &lt;Button
        android:id="@+id/stop_service"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/print_timestamp"
        android:layout_centerHorizontal="true"
        android:text="Stop Service" />

&lt;/RelativeLayout></pre>



<p class="wp-block-paragraph">Next have a look at the <code>MainActivity</code> which will bind the <code>BoundService</code> class:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">package com.truiton.boundservice;

import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.truiton.boundservice.BoundService.MyBinder;

public class MainActivity extends AppCompatActivity {
    BoundService mBoundService;
    boolean mServiceBound = false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        final TextView timestampText = (TextView) findViewById(R.id.timestamp_text);
        Button printTimestampButton = (Button) findViewById(R.id.print_timestamp);
        Button stopServiceButon = (Button) findViewById(R.id.stop_service);
        printTimestampButton.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mServiceBound) {
                    timestampText.setText(mBoundService.getTimestamp());
                }
            }
        });

        stopServiceButon.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mServiceBound) {
                    unbindService(mServiceConnection);
                    mServiceBound = false;
                }
                Intent intent = new Intent(MainActivity.this,
                        BoundService.class);
                stopService(intent);
            }
        });

    }

    @Override
    protected void onStart() {
        super.onStart();
        Intent intent = new Intent(this, BoundService.class);
        startService(intent);
        bindService(intent, mServiceConnection, Context.BIND_AUTO_CREATE);
    }

    @Override
    protected void onStop() {
        super.onStop();
        if (mServiceBound) {
            unbindService(mServiceConnection);
            mServiceBound = false;
        }
    }

    private ServiceConnection mServiceConnection = new ServiceConnection() {

        @Override
        public void onServiceDisconnected(ComponentName name) {
            mServiceBound = false;
        }

        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {
            MyBinder myBinder = (MyBinder) service;
            mBoundService = myBinder.getService();
            mServiceBound = true;
        }
    };
}
</pre>



<p class="wp-block-paragraph">All of this should give an output like this :</p>



<div class="wp-block-image"><figure class="aligncenter"><img data-recalc-dims="1" decoding="async" width="450" height="720" data-attachment-id="743" data-permalink="https://www.truiton.com/2014/11/bound-service-example-android/android-bind-service/" data-orig-file="https://i0.wp.com/www.truiton.com/wp-content/uploads/2014/11/Android-Bind-Service.png?fit=450%2C720&amp;ssl=1" data-orig-size="450,720" data-comments-opened="1" data-image-title="Android Bind Service" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/www.truiton.com/wp-content/uploads/2014/11/Android-Bind-Service.png?fit=450%2C720&amp;ssl=1" src="https://i0.wp.com/www.truiton.com/wp-content/uploads/2014/11/Android-Bind-Service.png?resize=450%2C720" alt="Android Bind Service" class="wp-image-743" srcset="https://i0.wp.com/www.truiton.com/wp-content/uploads/2014/11/Android-Bind-Service.png?w=450&amp;ssl=1 450w, https://i0.wp.com/www.truiton.com/wp-content/uploads/2014/11/Android-Bind-Service.png?resize=187%2C300&amp;ssl=1 187w" sizes="(max-width: 450px) 100vw, 450px" /></figure></div>



<p class="wp-block-paragraph">Above <code>MainActivity</code> class is the class which starts the <code>BoundService</code> class and then later on binds to it. Whenever a service is started or bound, first <a href="http://developer.android.com/reference/android/app/Service.html#onCreate%28%29"><code>onCreate()</code></a> method is called, then the <a href="http://developer.android.com/reference/android/app/Service.html#onStartCommand%28android.content.Intent,%20int,%20int%29"><code>onStartCommand()</code></a> or&nbsp;<a href="http://developer.android.com/reference/android/app/IntentService.html#onBind%28android.content.Intent%29"><code>onBind()</code></a> method is called according to the situation. But here in this&nbsp;<a title="Bound Service Example In Android" href="http://www.truiton.com/2014/11/bound-service-example-android/">Bound Service Example In Android</a> tutorial first the <a href="http://developer.android.com/reference/android/app/Service.html#onStartCommand%28android.content.Intent,%20int,%20int%29"><code>onStartCommand()</code></a> method is called then the <a href="http://developer.android.com/reference/android/app/IntentService.html#onBind%28android.content.Intent%29"><code>onBind()</code></a> method is called. Although if you closely observe I have not implemented the <a href="http://developer.android.com/reference/android/app/Service.html#onStartCommand%28android.content.Intent,%20int,%20int%29"><code>onStartCommand()</code></a> method, hence its default implementation will be called.</p>



<p class="wp-block-paragraph">I left off a point above referring to, why I started a service and then created a binding for it. The answer lies in the official documentation that if we bind a service without starting it, the bound service would exist only while the binding application component is active. In other words if a service is not started, only bound to an activity then it will exist till the activity exists. In most cases and in this case too we need a service to remain active even when the activity is not present, hence the service is started first then its bound to an activity. Same is stated in the documentation for <a title="Context.BIND_AUTO_CREATE" href="http://developer.android.com/reference/android/content/Context.html#BIND_AUTO_CREATE" target="_blank" rel="noopener noreferrer">Context.BIND_AUTO_CREATE</a> the flag used for binding the service.</p>



<p class="wp-block-paragraph">Coming back to our <code>MainActivity</code>, here you can see that <a title="Android ServiceConnection" href="http://developer.android.com/reference/android/content/ServiceConnection.html" target="_blank" rel="noopener noreferrer">ServiceConnection</a> class is used to establish or bind a connection to the service, through which an object of class is returned. Now whenever an operation on service is to be performed this object reference is used. Like in this <a title="Bound Service Example In Android" href="http://www.truiton.com/2014/11/bound-service-example-android/">Bound Service Example In Android</a> tutorial <code>mBoundService.getTimestamp()</code> method is used to get the time-stamp from the service.</p>



<p class="wp-block-paragraph"></p>



<h2 class="wp-block-heading">Android Service: onUnbind Method</h2>



<p class="wp-block-paragraph">Okay this method in the Android bound service implementation is sort of special, as it can control the life-cycle of a service. This method may seem harmless but can do a great amount of damage to your code if not used properly. In regular flow this method is called when the bound application component like an activity unbinds the service by calling <a title="Android unbindService" href="http://developer.android.com/reference/android/content/ContextWrapper.html#unbindService%28android.content.ServiceConnection%29" target="_blank" rel="noopener noreferrer"><code>unbindService()</code></a> method.</p>



<p class="wp-block-paragraph">Android Service onUnbind method can alter the flow for Android bound service on the basis of its return value, it can either be <code>true</code> or <code>false</code>.</p>



<ol class="wp-block-list"><li>For <code>true</code> it signifies that if a binding is created again for this service, instead of <code>onBind</code> method, <code>onRebind</code> method would be called.</li><li>If <code>false</code> is returned then both <code>onBind</code> and <code>onUnbind</code> methods are called only once. In other words if a new binding is created for this case none of these methods would be called. For each subsequent binding, same object of the service will be returned from the Android Binder class when service is connected.</li></ol>



<p class="wp-block-paragraph"></p>



<h2 class="wp-block-heading">Only one call to Android service onBind Method</h2>



<p class="wp-block-paragraph">Although if you were reading this&nbsp;<a title="Bound Service Example In Android" href="http://www.truiton.com/2014/11/bound-service-example-android/">Bound Service Example In Android</a> thoroughly you might have got this point till now. That service&#8217;s <code>onBind</code> method would be called only once in both the cases of <code>onUnbind</code> method. So choose wisely according to specs. To view full source code, please have at the link below:</p>



<p class="wp-block-paragraph" style="text-align:center"><a class="fasc-button fasc-size-large fasc-type-flat fasc-rounded-medium ico-fa fasc-ico-before fa-github" style="background-color: #0364af; color: #ffffff;" target="_blank" rel="noopener noreferrer" href="https://github.com/Truiton/BoundService">Full Source Code</a></p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">Another important thing that I observed while exploring was that, if a service is bound to an application component, it cannot be stopped until unbind is called from that component. If a service has multiple bindings then all the bindings have to be removed, only then your service may stop. Hope this helped.</p>
<div class="saboxplugin-wrap" itemtype="http://schema.org/Person" itemscope itemprop="author"><div class="saboxplugin-tab"><div class="saboxplugin-gravatar"><img alt='Mohit Gupt' src='https://secure.gravatar.com/avatar/a816092ad56645d2635ccfceb9f7e9d44821c19dec126cb394c882ba574eaa04?s=100&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/a816092ad56645d2635ccfceb9f7e9d44821c19dec126cb394c882ba574eaa04?s=200&#038;d=mm&#038;r=g 2x' class='avatar avatar-100 photo' height='100' width='100' itemprop="image"/></div><div class="saboxplugin-authorname"><a href="https://www.truiton.com/author/mohitgupt/" class="vcard author" rel="author"><span class="fn">Mohit Gupt</span></a></div><div class="saboxplugin-desc"><div itemprop="description"><p>Born in New Delhi, India. A software engineer by profession, an android enthusiast and mobile development evangelist. My motive here is to create a group of skilled engineers, who can build better software. Reason being programming is my passion, and also it feels good to make a device do something you want. Professionally I have worked with many software engineering and product development firms. As of now too, I am employed as a senior engineer in a leading tech company. In total I may have worked on more than 20 projects professionally, but whenever I get spare time I share my thoughts here at Truiton.</p>
</div></div><div class="saboxplugin-web "><a href="http://www.truiton.com" target="_self" >www.truiton.com</a></div><div class="clearfix"></div><div class="saboxplugin-socials "><a title="Wordpress" target="_blank" href="https://www.truiton.com/author/mohitgupt/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-wordpress" role="img" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 512 512"><path fill="currentColor" d="M61.7 169.4l101.5 278C92.2 413 43.3 340.2 43.3 256c0-30.9 6.6-60.1 18.4-86.6zm337.9 75.9c0-26.3-9.4-44.5-17.5-58.7-10.8-17.5-20.9-32.4-20.9-49.9 0-19.6 14.8-37.8 35.7-37.8.9 0 1.8.1 2.8.2-37.9-34.7-88.3-55.9-143.7-55.9-74.3 0-139.7 38.1-177.8 95.9 5 .2 9.7.3 13.7.3 22.2 0 56.7-2.7 56.7-2.7 11.5-.7 12.8 16.2 1.4 17.5 0 0-11.5 1.3-24.3 2l77.5 230.4L249.8 247l-33.1-90.8c-11.5-.7-22.3-2-22.3-2-11.5-.7-10.1-18.2 1.3-17.5 0 0 35.1 2.7 56 2.7 22.2 0 56.7-2.7 56.7-2.7 11.5-.7 12.8 16.2 1.4 17.5 0 0-11.5 1.3-24.3 2l76.9 228.7 21.2-70.9c9-29.4 16-50.5 16-68.7zm-139.9 29.3l-63.8 185.5c19.1 5.6 39.2 8.7 60.1 8.7 24.8 0 48.5-4.3 70.6-12.1-.6-.9-1.1-1.9-1.5-2.9l-65.4-179.2zm183-120.7c.9 6.8 1.4 14 1.4 21.9 0 21.6-4 45.8-16.2 76.2l-65 187.9C426.2 403 468.7 334.5 468.7 256c0-37-9.4-71.8-26-102.1zM504 256c0 136.8-111.3 248-248 248C119.2 504 8 392.7 8 256 8 119.2 119.2 8 256 8c136.7 0 248 111.2 248 248zm-11.4 0c0-130.5-106.2-236.6-236.6-236.6C125.5 19.4 19.4 125.5 19.4 256S125.6 492.6 256 492.6c130.5 0 236.6-106.1 236.6-236.6z"></path></svg></span></a><a title="Twitter" target="_blank" href="http://twitter.com/mohitgupt" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 30 30"><path d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z" /></svg></span></a><a title="Facebook" target="_blank" href="https://www.facebook.com/Mr.Mohit.Gupt" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 264 512"><path fill="currentColor" d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"></path></svg></span></a></div></div></div><p>The post <a href="https://www.truiton.com/2014/11/bound-service-example-android/">Bound Service Example In Android</a> appeared first on <a href="https://www.truiton.com">Truiton</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.truiton.com/2014/11/bound-service-example-android/feed/</wfw:commentRss>
			<slash:comments>20</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">737</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: www.truiton.com @ 2026-07-07 02:19:36 by W3 Total Cache
-->