PDA

View Full Version : Phone Listner API in Android?



arunk
09-29-2008, 07:56 AM
Hi,

I am new to Android. I have developed application for blackberry. I want to develop the same application for Android also.

My applications primary feature is to disconnect all outgoing calls.

Is there anything like phone listner in Android?

How feasible its to implemnt an application which overrides the native phone application?


Arun

Big Al
09-29-2008, 11:24 AM
Why would you want to diconnect all outgoing calls?

Jorsher
09-29-2008, 11:32 AM
What exactly are you trying to do? Is this to close multiple calls at once or what?

Welcome to the forum!

arunk
09-30-2008, 02:17 AM
When my application is running if someone make a call, I want to disconnect the call and dial a modified number.

Same way I want to get Call Initiated, call connected, call disconnected, call incoming and call answered events.

In blackberry PhoneListner class is prividing all these. Same way Symbian and Windows mobile also provides this. So I want to develop our application in android also. But I didnt find any API for that.

is it possible to do this in Android?

stopcrazypp
09-30-2008, 02:30 AM
Hi,

I am new to Android. I have developed application for blackberry. I want to develop the same application for Android also.

My applications primary feature is to disconnect all outgoing calls.

Is there anything like phone listner in Android?

How feasible its to implemnt an application which overrides the native phone application?


Arun

Are you looking for this?:
http://code.google.com/android/reference/android/telephony/PhoneStateListener.html

arunk
09-30-2008, 03:35 AM
No its not the one I am looking for.

I want to create my own phone application and for that I need a proper telephoney API....


In blackberry its

http://www.blackberry.com/developers/docs/4.5.0api/net/rim/blackberry/api/phone/PhoneListener.html

is there some listner interface like this in Android?

stopcrazypp
09-30-2008, 02:34 PM
No its not the one I am looking for.

I want to create my own phone application and for that I need a proper telephoney API....


In blackberry its

http://www.blackberry.com/developers/docs/4.5.0api/net/rim/blackberry/api/phone/PhoneListener.html

is there some listner interface like this in Android?
Whatever is avaliable on the sdk on calling should in the telephony section. Looking over that section I haven't seen anything on intercepting calls, so it is not the full telephony api that you need. Most likely it is not included for security or other reasons. If so you will might have to wait until October 22 when they open the source code so you can see the internal APIs on their phone app which they have not included in the sdk.

But probably you will get better answers by going to
http://groups.google.com/group/android-developers
and asking about your specific feature so they can include it in the next release; the actual people working on the sdk will post there sometimes and can answer your questions directly.

I found this mentioning that there is no ability to intercept calls currently because of security reasons.
http://groups.google.com/group/android-developers/browse_thread/thread/d97a759a3708cbe3/3369f0fb80e07f5e

Edit:
You can do feature requests on the public issue tracker and you can browse existing issues and see if they have been resolved:
http://code.google.com/p/android/issues/list

arunk
10-01-2008, 12:22 AM
thanks stopcrazypp (http://androidcommunity.com/forums/member.php?u=2159)

arunk
03-10-2009, 01:44 AM
Is there a chance of implementing a proper telephony API in Android?

ickyfehmleh
03-10-2009, 11:20 AM
Is there a chance of implementing a proper telephony API in Android?

Perhaps you should begin by defining "proper telephony API".

arunk
03-11-2009, 01:01 AM
I want to initiate and disconnect calls programatically and should be able to listen to events like call initiated, call rejected, call answered, call disconned, call incoming..call on hold, call resumed... Thats what I mean...

Stryder
03-11-2009, 02:12 AM
I want to initiate and disconnect calls programatically and should be able to listen to events like call initiated, call rejected, call answered, call disconned, call incoming..call on hold, call resumed... Thats what I mean...

You mean remotely? Like listen to a conversation from a computer or something of that nature?

buntaro.pup
03-11-2009, 02:39 AM
seems to me that the SDK has got you covered with the native telephony API...specifically these two packages:

http://d.android.com/reference/android/telephony/package-summary.html

http://d.android.com/reference/android/telephony/gsm/package-summary.html


as for some of the events you mentioned explicitly, you may want to explore the manifest.permission class...here's a couple of exposed attributes which will no doubt be very useful to you:

http://developer.android.com/reference/android/Manifest.permission.html#CALL_PHONE

http://developer.android.com/reference/android/Manifest.permission.html#PROCESS_OUTGOING_CALLS


perhaps you'll write a nice library which wraps some of the more commonly accessed functionality??? or is this just a pipe dream for the lazy developer (such as myself) ;-)

cheers.