how to create auto answering machine for android [closed]

喜欢而已 提交于 2019-12-20 09:38:20

问题


is it possible to write an auto answering machine for android ? for example when incoming call event occurs, this application start to play voice.

how can i do this ?


回答1:


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




回答2:


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.




回答3:


AirVoice can do that. Requires root access and works on certain phones only.

Can someone explain why is it so hard?

The vrecorder application can record the in-call audio stream and AutoAnswer can automatically answer incoming call, without requiring rooting the phone.

The solution (if it works) is not reliable as the phone might be powered off or have bad or no signal reception.

Serious users would be better off to using dedicated VoiceMail (VM) providers, such as http://freephoneline.ca or http://www.youmail.com. To use these services you purchase virtual phone number (with a subscription plan) from them and configure your carrier to forward unanswered incoming phone calls to the virtual phone number. They would then pickup the phone call, play greeting of your choice, do voice-to-text transcription (if available) and send the message to a dedicated app on your phone.



来源:https://stackoverflow.com/questions/4726229/how-to-create-auto-answering-machine-for-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!