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

  • Home
  • SEARCH
  • 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 6845679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:31:49+00:00 2026-05-27T00:31:49+00:00

I am programming an app, that automatically answers a call. The problem is, that

  • 0

I am programming an app, that automatically answers a call. The problem is, that it should not answer one if I am already in a call and someone is ringing.
Is there a way to achieve that?

According to the doc, if I check the status with TelephonyManager it would be CALL_STATE_RINGING and not CALL_STATE_OFFTHEHOOK.

Do I have to add a variable that is set true on a changing Telephone state so I know that there is an ongoing call or is there a better solution?

Thanks!

/edit: I answer the call without the permission Modify_Phone_State, so it is only about finding out if there is already a call ongoing.

  • 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-27T00:31:50+00:00Added an answer on May 27, 2026 at 12:31 am

    Okay, so as there is apparently no way to figure this out, I stored a Boolean in a SharedPreference as soon as the State goes to OFFTHEHOOK (true).

    When the state changes to IDLE, I set the Boolean to false. So this means, if RINGING is fired while someone is already calling, I read out that the variable is true, and then discard the following actions.

    For those who want more information on how to answer a call, have a look at the AutoAnswer Project

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

Sidebar

Related Questions

I'm currently programming an app for iphone that uses the tab bar. One of
I have a problem: I am programming an app that is using a searchBar
I'm programming an app for the iPhone. I'm not very good with loops just
I'm writing a GUI app with wxwidgets in C++ for one of my programming
I am programming an app that shows a lot of verses/poems so text wrapping
I am programming an app that will store a database locally and would like
I'm programming app that need to make a check on a contact, when user
Ok, I was programming an app that loaded merged dictionaries on runtime to change
I'm programming an app that will be a basic video game, but the keyUp:(NSEvent
I'm programming an app that will have a free version. I have added another

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.