Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create auto answering machine for Android [closed]

Is it possible to write an auto answering machine for Android? For example, when an incoming call event occurs, the application plays a voice message.

How can I do this?

like image 885
mahdi Avatar asked Jan 18 '11 16:01

mahdi


People also ask

Is there any answering machine app for Android?

Auto Answer & Callback All you need is Auto Answer & Callback android app to attend incoming calls automatically. Yes! It lets you answer a call automatically even when you are engaged. This Android app can help you auto-answer incoming calls while driving or riding a bike.

Why does my phone answer calls automatically?

This is because the Auto-Answer Calls feature is enabled on the phones. This is normal and does not indicate an issue with the watch/band. Disable the feature in one of the following ways: iOS phones: Go to Settings > Accessibility > Touch > Call Audio Routing and disable Auto-Answer Calls.


2 Answers

Android applications do not have access to the in-call audio stream at this time. So, presently, your application is not possible, sorry.

like image 50
CommonsWare Avatar answered Sep 19 '22 08:09

CommonsWare


At the end of 2013, it's still not possible. There are many other answers (possibly I'll write a FAQ sum-up after finishing this task), but shortly,

  • it is required for phone hardware's vendor to implement additional "input pin" in the modem and expose it to Android audio layers (kernel -> HAL) to accept prepared audio streams (like 8khz wav).

Currently, some Qualcomm procs supports that.

Why it's done so? My opinion: to avoid audio processing latency to be heard by non-Android users -> to avoid humiliation from non-Android users. (Well, android is created for lags). Other opinions include: privacy reasons, will of phone manufacturers (especially these Chinese, who sell 1000's kinds of GSM-based alarms, sensors, etc), lazyness, and energy saving.

When you're in call on Android, something like this happens:

  1. OS -> chipset: set microphone volume to 100%, disable energy saving, activate DSP/DAC/ADC components.
  2. voice -> microphone -> GSM baseband processor: encoded raw data
  3. voice -> microphone -> mirror to Android's mediarecorder audio source: mic data

(someone expected microphone -> Android -> own filter -> GSM route, ha?)

This architecture simply has no common defined place for sending data from Android to GSM channels; from an ordinary manufacturer's point of view, this is like giving a direct access to GSM radio chip to enable turning Android into soft-radio working in 900-2400 MHZ range.. e.g. something esotheric, illegal and unnecessary for end-user. Anything available in libmedia, MediaSource etc - has nothing in common with raw uplink access.

For unknown reasons, there are back-doors available from different vendors; I still found nothing with MTK chipset, but googling for Qualcomm/Android/voice/uplink/alsa/root seems to be giving a good start here :)

P.S. There is also a DTMF signalling facility, available with a little undocumented API usage.


P. P.S. Answering machine is something that plays voice to someone who called the number of that certain answering machine. Its not a recorder, and is different from voice mail. I don't get why 100% of the answering machine questions are about recording or auto-accepting the call.

like image 44
kagali-san Avatar answered Sep 19 '22 08:09

kagali-san