Is there an API to send calls to voicemail in Android?
I was looking for an API to send incoming calls to voi开发者_如何转开发cemail.
I know this can be done using the Contact app that comes with any Android phones. But is there an API for this?
ContactsContract.RawContacts has got a flag to indicate that call should be forwarded to voice mail
SEND_TO_VOICEMAIL read/write An indicator of whether calls from this raw contact should be forwarded directly to voice mail ('1') or not ('0'). To have an effect on the corresponding value of the aggregate contact, this field should be set at the time the raw contact is inserted.
You can use the PhoneStateListener to see when a call is coming in, but there's no way to connect and control phone calls themselves. Placing a phone call is a core and critical feature of a phone. I'm very sure this reason alone warrants no API for direct manipulation of phone calls.
精彩评论