binder 1 failed

0 Suyash Shrivastava · October 22, 2015
While running the recieveBroadcast app...I am getting runtime error  attach of thread binder 1 failed. What does that mean?
i would appreciate any help

Post a Reply


Oldest  Newest  Rating
0 Gary Whitney · October 23, 2015
I reviewed the code from #37 and #38 and it does not use a bindService() so I will assume your thread failed to bind to the Activity that generated it.
I am going to attach my code for you to compare to yours. It should be similar except for the package info and comments. The code works but may not be exactly the same as the tutorial because I tend to personalize it by changing names from Bucky's... to something else.
[source code] Android Development Tutorial - 37 and 38 Broadcasting

//37 note: changed company name in #38


import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    protected void onCreate(Bundle savedInstanceState) {

    public void sendOutBroadcast(View view){
        Intent i = new Intent();// no explict class like last tutorial
        i.setAction("");// use package as a unique identifier.
        i.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES); // for all versions of android

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

    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();

        //noinspection SimplifiableIfStatement
        if (id == {
            return true;

        return super.onOptionsItemSelected(item);

***** activity_main.xml



package info.glwhitney.receivebroadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class ReceiveBroadcast extends BroadcastReceiver {
    public ReceiveBroadcast() {

    public void onReceive(Context context, Intent intent) {
        Toast.makeText(context,"Broadcast has been received",Toast.LENGTH_LONG).show();

***** Manifest



  • 1

Java / Android Development


Very popular language used to create desktop applications, website applets, and Android apps.

Bucky Roberts Administrator