Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7856489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:43:50+00:00 2026-06-02T20:43:50+00:00

i have problem with sending Broadcast receive from one activity to other ..its not

  • 0

i have problem with sending Broadcast receive from one activity to other ..its not working my code is below..pls refer to it ..

sending class is:

    public class SendBroadcast extends Activity {
public static String BROADCAST_ACTION = "com.unitedcoders.android.broadcasttest.SHOWTOAST";

/** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    Button button1 = (Button) findViewById(R.id.button1);
    button1.setOnClickListener(new View.OnClickListener() {
    public void onClick(View view) {
        sendBroadcast();
        }

    });
}




  public void sendBroadcast(){

    Intent broadcast = new Intent();
    broadcast.setAction("com.unitedcoders.android.broadcasttest.SHOWTOAST");
    sendBroadcast(broadcast);
}

}

and reciving class is :

  public class ToastDisplay extends Activity {

private BroadcastReceiver receiver = new BroadcastReceiver() {

    @Override
    public void onReceive(Context context, Intent intent) {
        Log.i("asdasd","sdasdasd");
        // TODO Auto-generated method stub
        Toast.makeText(getApplicationContext(), "%%%%%%%%%%%%received", Toast.LENGTH_SHORT).show();

    }
};

@Override
protected void onResume() {
    IntentFilter filter = new IntentFilter();
    filter.addAction(SendBroadcast.BROADCAST_ACTION);
    registerReceiver(receiver, filter);

    super.onResume();
}

@Override
protected void onPause() {
    unregisterReceiver(receiver);
    super.onPause();
}

}

Manifest file is ::::

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.unitedcoders.android.broadcasttest"
  android:versionCode="1"
  android:versionName="1.0">
 <uses-sdk android:minSdkVersion="4" />

  <application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".SendBroadcast"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
  <activity android:name=".ToastDisplay">

    <intent-filter>
        <action android:name="com.unitedcoders.android.broadcasttest.SHOWTOAST">  </action>
    </intent-filter>
  </activity>

  </application>
  </manifest>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:43:51+00:00Added an answer on June 2, 2026 at 8:43 pm

    you have not registered your Receiver in Manifest :registered as

    <receiver android:name="receiver">
    <intent-filter>
    <action
    android:name="com.unitedcoders.android.broadcasttest.SHOWTOAST"/>
    </intent-filter>
    </receiver>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a little problem with sending an extra from one activity to another.
I have a problem sending POST request with VB6. The code below works properly
Hi I have a problem in sending data from php to pdf. I think
I have a little problem, I'm making project and I'm sending data from client
I have problem while sending messages from android to PC. Messages are send when
greetings all i have a problem that when sending an email from the server
Hello I faced the same problem I have 1 broadcast receiver from that I
i have problem in sending zip file in network.. all other formats i am
I have a problem sending email from a linux machine. The application sends several
I am a Rails noob and have a problem sending an email from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.