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 7039563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:48:49+00:00 2026-05-28T01:48:49+00:00

Im developing an application,which blocks all outgoing calls and then after blocking that call

  • 0

Im developing an application,which blocks all outgoing calls and then after blocking that call ,another new call is initiated to a predefined number…

My problem is that,when i block the call using a broadcastreceiver,the second call which i programmatically initiate is also getting blocked…

Is any method to unregister the broadcast after blocking the first call,or any other method or technique???

This is my broadcastreceiver which i implemented for my app…

public class CallListenerActivity extends BroadcastReceiver {

Uri uri;

    @Override
    public void onReceive(Context context, Intent intent) {
            Bundle bundle = intent.getExtras();

            if(bundle == null)
                return;


            String phonenumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);

            Log.i("@@@OutgoingCallReceiver",phonenumber);
            Log.i("@@@OutgoingCallReceiver",bundle.toString());

            String info = "Detect Calls sample application\nOutgoing number: " + phonenumber;

           Toast.makeText(context, info, Toast.LENGTH_LONG).show();



           String phoneNumber = "5556";
           Uri uri = Uri.fromParts("tel", phoneNumber, null);

           Intent callIntent = new Intent(Intent.ACTION_CALL, uri);
           callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
           context.startActivity(callIntent);




    }
  • 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-05-28T01:48:49+00:00Added an answer on May 28, 2026 at 1:48 am

    You could try starting your original (CallListenerActivity? The one which registered the broadcast receiver) activity again using a flag stored as extra in the intent.
    Evaluate the intent in your activity and unregister the broadcast receiver if you see the flag in the extras. Then start the the call activity as shown in your example code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an application which draws some charts and I'm using Google Chart. After
M developing an application which starts with a login page. After loggin the user
I am developing an application which needs to pop up new JFrame B with
I'm developing a PHP application which uses Twig (but that's unimportant) as the view
I am developing application which has camera functionality. i want to save that captured
I have heard that when developing application which uses a database you should do
When developing an application which mostly interacts with a database, what is a good
I am developing an application which will be connected to Access database at the
I'm developing an application which has a lot of text and also different modules
I'm developing an application which currently have hundreds of objects created. Is it possible

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.