My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 54: Add API for call filtering
296 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----

Restricted
  • Only users with Commit permission may comment.


Sign in to add a comment
 
Reported by hongb...@gmail.com, Jan 20, 2008
The API should support to reject a call.

 
Jan 23, 2008
#2 hongb...@gmail.com
The calling app can reject a call. But what I mean is that reject a call in my own
application by with the SDK.
Jan 25, 2008
#3 morri...@gmail.com
This Issue has been reviewed and accepted.
An engineer will be assigned to work on it according to its priority.
Status: Reviewed
Feb 14, 2008
#4 hongb...@gmail.com
The SDK should support below functions:
1. reject an incoming call before the incoming call dialog pops up
2. replace the incoming call dialog
3. prevent the incoming call dialog
Apr 10, 2008
#5 parashar...@gmail.com
Is this issue solved or not ? How can we reject a call through an application ?
Jun 18, 2008
#6 kirbyw...@gmail.com
There should also be a blocked contact feature. When a certain pre-set phone number
calls, Android Calling app does not respond. It should though, make a notification of
when that person calls. Much needed. Please consider
Jun 26, 2008
#8 enob...@gmail.com
Would definitely be great to have the ability to catch a new incoming call event and
prevent / replace the dialog to offer the recipient options regarding the incoming
call.  My entire application depends on this ability.
Aug 8, 2008
#9 joebo...@gmail.com
+1 vote to extend the api too allow injecting custom handlers for incoming call events.
Oct 6, 2008
#10 percussi...@gmail.com
High priority please
Oct 18, 2008
#11 enu1...@gmail.com
plz tell me Is this issue solved or not?? 
Oct 30, 2008
#12 militias...@gmail.com
See Issue 1137 for a related idea that might be combined with this.
Nov 12, 2008
#13 Heta...@gmail.com
If any API is Developed we can easily build Call Firewall Software, The API should
pass on Incoming Caller Number, Matched Name etc. to the Application Registered to
this function.

Which Can Reject any Call and Send Predefined SMS
Reject a Call from Spammer.
Just Accept and Hangup a Spammer call this will Charge him a lot.

I am using MagiCall 2.0 Software and Call Firewall Software in Windows which is very
good for Business Person and High Profile Users who have Plenty of call which is want
to Reject Automatically
Feb 2, 2009
#14 jimonand...@gmail.com
May I know the status of this issue?

Feb 2, 2009
#15 docw...@gmail.com
@jimonandroid

Given that it doesn't currently have an Owner, I assume that it isn't being worked on
at the moment.
Feb 3, 2009
#16 kamal.ha...@gmail.com
Hello Anyone knows the status of this issue.Pls let us where we can find the status 
of any issue.


Feb 6, 2009
#17 jbq+legacy@google.com
(No comment was entered for this change.)
Labels: -Type-Defect Type-Enhancement
Feb 20, 2009
#18 waynedea...@gmail.com
Lol well since the last update I inadvertently reject incoming calls just by operating the volume control.
Mar 11, 2009
#19 jakefede...@gmail.com
Related bug/ RFE: calls to AudioManager.setVolume() with the Ringer as the stream,
and the FLAG_REMOVE_SOUND_AND_VIBRATE flag will not turn off the Vibrator, but will
turn off the ringer
Apr 7, 2009
#20 Honglian...@gmail.com
I really hope it to be released in next release.
May 11, 2009
#21 peacoc...@gmail.com
Yes to all the above. Long overdue.
Jun 12, 2009
#22 srkrish...@gmail.com
Does Anyone knows the status of call reject issue.
Pls let us where we can find the status of this issue.


Jun 27, 2009
#23 brian.st...@gmail.com
Asking if something is done yet and asking for status will achieve nothing, if you
care that much modify the source code yourself and submit a patch. The Android
developers are working very hard and cannot handle every request simultaneously.
Aug 7, 2009
#24 AxelSan...@gmail.com
Just bought my hero today, i must say it's nice phone, but i was really hoping for
the feature to block an incoming call in the api. It was infact the only reason for
buying the phone. I surly hope this will be a feature for the next release. Cheers 
Aug 24, 2009
#25 jbq+legacy@google.com
(No comment was entered for this change.)
Labels: Component-Framework
Aug 27, 2009
#26 jbq+legacy@google.com
(No comment was entered for this change.)
Labels: -Component-Framework Component-Device
Oct 16, 2009
#27 eyreball...@gmail.com
Do the last two comments from google mean this issue has been resolved ? If so, in
what version of Android ?
Nov 9, 2009
#28 kimh...@gmail.com
I'd like to have Android support the following programatically:

- Accept an incomming call
- Decline an incomming call
- Start an outgoing call
Nov 10, 2009
#29 horu...@gmail.com
I'd like to have support for these cases too :)

so is there a possibility using the NDK or not?
Dec 1, 2009
#30 trushs...@gmail.com
hello sir,

please make this enhancement quickly.
because every application alternatively deal with call & sms. All clients needs this
king of applications.

Jan 2, 2010
#31 ChrisSum...@gmail.com
W
Jan 3, 2010
#32 dharmesh...@gmail.com
i am looking to intrruppt incoming call in my application.
Jan 4, 2010
#33 phaze3131
yea we really need api support to handle call events, this is way overdue
Jan 4, 2010
#34 chris.boyle.name
Just a friendly reminder... if you're about to post a comment that says "me too!" or "you've got 
my vote" or "+1" or similar... please just star this issue and leave the comments-space clean.  
When you star the issue, your vote counts.  Issues with a larger number of people starring the 
issue are likely going to get more attention. More comments, however, are just going to clutter 
the system and annoy those who have already starred the issue, possibly encouraging them to 
unstar the issue, lowering its perceived importance.  Again, comments should be used to update 
progress on the issue itself, not for voting... please leave this to the star.  Thanks.
Jan 13, 2010
#36 tlx...@gmail.com
The major platforms: Symbian, iPhone, Windows Mobile DO have API for this
functionality (don't have to check the docs, it is enough to look at the software
available). 

What's more, this functionality was planned (mentioned in beta release of Android
SDK), nevertheless, someone decided not to include this in official API due to
"security reasons".

Personally, I see no "security problem" in just rejecting a call. F.e. access to
address list could be regarded as the same "security problem". Reasoning that way, if
a customer is looking for "secure" phone, he / she should buy the simplest/cheapest
phone possible.
Jan 13, 2010
#37 phaze3131
But noone is updating anything about this issue at all...

Yea there is no security risk if the app that uses the code does not misuse it, but
that is in the users choice to get the app or not, so it is our call.  I just want to
be in control of my device ya know?  Thats what Android is, open source giving the
power back to the users.  So lets keep this going and not let companies like Apple
outdo us like this eh?
Jan 16, 2010
#38 weiler.m...@gmail.com
I just stumbled upon a tool named "Little Black Book" in the market. Description:
"Maintains a list of people you are dating and allows you to enjoy privacy with just
a single member of that list by sending everybody else in the book directly to
voicemail."

So there is a way to reject calls already?
Jan 18, 2010
#39 phaze3131
To clarify, rejecting a call and forwarding it to voicemail are completely different.
 Forwarding to voicemail is well, forwarding to voicemail.  Rejecting a call is tell
your phone once it receives a call signal from a certain number, to do nothing,
literally, do nothing at all.  No voicemail, no call log, no vibrate, no ringing, no
silent, no anything.
Apr 3, 2010
#40 coding...@gmail.com
I am running 2.1 and use the Black List function found in SYSTEM / CALL SETTINGS.  
Incoming calls in black list will be rejected.
Apr 14, 2010
#41 huy.tran...@gmail.com
It's great if we can programatically handle incoming call in our application
May 19, 2010
#43 chaudhar...@gmail.com
hai plz inform me also i get same problem
Jun 1, 2010
#44 adeno...@gmail.com
We can handle incoming call, but we can't accept or reject a call programatically, yet
Jun 9, 2010
#45 sahilkhu...@gmail.com
Are we looking for call/sms reject applications which can reject calls from a Blacklisted numbers without letting the incoming call dialog to pop up ?
If thats the case then this will be a great feature for Android platform to support
Jun 9, 2010
#46 indra.bagus@gmail.com
Capability of sending any AT command to GSM/CDMA modem will be a great feature of next API release
Aug 19, 2010
#47 skylar.s...@gmail.com
Just to weigh in on this - I really don't buy the excuse for not including this in the API due to "security reasons". Android is built around the concept of the user granting permissions to applications they trust. If this a permissionable action and they grant it, it's their own fault. 

This is long overdue from the API.
Sep 9, 2010
#48 abhitni...@gmail.com
Can you ppl please tell me how much time it would take to fix this problem? I am stuck with since 2 weeks to accept and reject incoming call, Please give me some solution otherwise It would be very difficult to continue my current project..
Android ppl should think about this. It is a big deal and they can't take this as minor problem.About in 80% projects it is required to do something with incomign call and outgoing call....plz fix it as soon as possible .. 
Thanks in advance ...   
Sep 9, 2010
#49 ran.ma...@gmail.com
There wont be an API update till Gingerbread, around December.
So stop whining.
(I'm NOT a google employee)


Oct 4, 2010
#50 abdelham...@free.fr
+1 vote to extend the api too allow injecting custom handlers for incoming and outgoing call.
Oct 18, 2010
#51 mr8...@gmail.com
I have found a way to do this by reflection you can get a reference to ITelephony interface from TelephonyManager, and after call on it endCall().
Oct 18, 2010
#52 claudiobastos@gmail.com
@mr85mr Can you write in an article/site how to do that?

Oct 18, 2010
#53 timo...@gmail.com
Yeah, a howto would be rather welcome :)
Oct 18, 2010
#54 frank.pa...@gmail.com
Search the net for ITelephony.aidl. The program myLock is a good example for
use. It's not a howto, though..

Comment #53 on issue 54 by timonoj: Can't reject a call


https://code.google.com/p/android/issues/detail?id=54
Yeah, a howto would be rather welcome :)
Oct 18, 2010
#55 teddscof...@gmail.com
A word of caution, there is nothing preventing Google or Manufactures from
changing method signatures on you so there is still a possibility this
approach won't work on all phones.  But then again, that kind of goes with
the territory of using reflection to open up private objects : )

For info on using existing AIDL services in general, check out this blog
write up:

http://blog.codetastrophe.com/2008/12/accessing-hidden-system-service-apis-in.html

I'd suggest reading that blog first to get your head around the approach of
tapping into the existing services via AIDL if it is something you are new
to like I was.

The myLock, auto-answer and teddsdroidtools (my project) open source
projects all utilize this technique.  These can be used for
research/inspiration on how to answer/reject calls this way and they're all
on Google code:

https://code.google.com/p/mylockforandroid/
https://code.google.com/p/auto-answer/
https://code.google.com/p/teddsdroidtools/

Here's a direct link to the source of the activity in my project that
actually does the answering and rejecting:

https://code.google.com/p/teddsdroidtools/source/browse/trunk/teddsdroidtools/src/tss/droidtools/phone/CallAnswerActivity.java

- Tedd
Oct 18, 2010
#56 claudiobastos@gmail.com
@teddscofield
Thank you very much
Oct 18, 2010
#58 mr8...@gmail.com
The only thing I could not do, is to understand when an outgoing call is answered, and capture time of a conversation during a call, because to do this we have need of Phone object accessible by getDefaultPhone(), but this function must be called from Looper thread...
This is a little testcase:
String phoneFactoryName = "com.android.internal.telephony.PhoneFactory";
String phoneName = "com.android.internal.telephony.Phone";
Class phoneFactoryClass = Class.forName(phoneFactoryName);
Class phoneClass = Class.forName(phoneName);
Method getDefaultPhone = phoneFactoryClass.getMethod("getDefaultPhone");
Object phoneObject = getDefaultPhone.invoke(null);

Anyone knows how to do ?
Dec 22, 2010
#59 rahel.ka...@gmail.com
http://www.anddev.org/search.php?st=0&sk=t&sd=d&sr=posts&keywords=incoming+call+screen&start=15
https://code.google.com/p/auto-answer/source/browse/trunk/src/com/everysoft/autoanswer/AutoAnswerIntentService.java
Print Messages to a Log File

To write log messages from your application:

   1. Import android.util.Log.
   2. Use Log.v(), Log.d(), Log.i(), Log.w(), or Log.e() to log messages. (See the Log class.)
      E.g., Log.e(this.toString(), "error: " + err.toString())
   3. Launch DDMS from a terminal by executing ddms in your Android SDK /tools path.
   4. Run your application in the Android emulator.
   5. From the DDMS application, select the emulator (e.g., "emulator-5554") and click Device > Run logcat... to view all the log data.

Note: If you are running Eclipse and encounter a warning about the VM debug port when opening DDMS, you can ignore it if you're only interested in logs. However, if you want to further inspect and control your processes from DDMS, then you should close Eclipse before launching DDMS so that it may use the VM debugging port.
? Go to top

? Back to FAQs, Tips, and How-to






Hello there,
I am sorry but i just want to ask, is it possible to get and use the package called com.android.internal.telephony  in my application or is there any equivalent API similar to CTelephony of Symbian?. The public API for android telephony did not allow me what i wanted to do. Forexample something equivalent to Symbian's CTelephony look what is available about the call-states.

enum TCallStatus
		{
		/**
		Indicates that the status is unknown.
		*/
		EStatusUnknown,
		/**
		Idle line status (no active calls).
		*/
		EStatusIdle,
		/**
		Call dialling status .
		*/
		EStatusDialling,
		/**
		Call ringing status.
		*/
		EStatusRinging,
		/**
		Call answering status.
		*/
		EStatusAnswering,
		/**
		Call connecting status.
		*/
		EStatusConnecting,
		/**
		Call connected status.
		*/
		EStatusConnected,
		/**
		Call is undergoing temporary channel loss and it may or may not be reconnected.
		*/
		EStatusReconnectPending,
		/**
		Call disconnecting status.
		*/
		EStatusDisconnecting,
		/**
		Call on hold.
		*/
		EStatusHold,
		/**
		Call is transferring.
		*/
		EStatusTransferring,
		/**
		Call in transfer is alerting the remote party.
		*/
		EStatusTransferAlerting
		};
Is there any other API for android which is equivalent to this one. Further is it possible for me to answer or reject incoming call from my application? Please any help will be appreciable.

BR.Rahel 
Feb 21, 2011
#60 teddsdroidtools@gmail.com
Note regarding the AIDL trick to answer/reject calls:

This no longer works as of Android 2.3. Google has made the MODIFY_PHONE_STATE permission that is required unavailable for use by normal third party apps.

Note to Google regarding the Android SDK documentation of permissions:

Recommend providing some indication in the documentation as to which permissions are "system-only". For example, in this listing http://developer.android.com/reference/android/Manifest.permission.html#MODIFY_PHONE_STATE it would be extremely helpful if it said "system-only" or something along those lines.  I have not been able to easily locate such an indicator or listing which would be most helpful, save time and frustration, spell it out for simpletons like me, you get the idea ;)

Thanks!

- Tedd
Feb 22, 2011
#61 claudiobastos@gmail.com
there is anyway for us to accomplish that now ?

Feb 23, 2011
#62 skylar.s...@gmail.com
FYI - Here is the commit where David Brown removed the permission. His email address is in the commit log if you'd like to drop him a line and make our case about why it should be rolled back.

There is ABSOLUTELY NO WORK AROUND to the change he made - the permission is gone for third party app developers, only Google and phone manufacturers can use it now.

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=commit;h=f4ece2086f3b7060edc4b93a12f04c9af648867a
Feb 23, 2011
#63 tdh...@gmail.com
I wouldn't spam him. It was clearly never a public API, so there's no reason Google should have preserved it.

Also the commit says they are planning to create a proper public telephony API which is good.
Feb 23, 2011
#64 skylar.s...@gmail.com
I would spam him because the feature (while not publicly endorsed) shouldn't have been removed until they released a proper public API. 

I can filter sales via the Market by setting a minimum Android version and a maximum Android version... but I cannot exclude specific versions. So when 2.4+ is released, I will have an app that works on 1.0-2.2, and 2.4+... but not 2.3.

If they had maintained support until the public API was released developer code would look like this:

if(androidVersion < 2.3) {
   ... do it the old way
}
else {
   ... use the new Telephony API
}

Unfortunately, it now looks like this:

if(androidVersion < 2.3) {
   ... do it the old way
}
else if(androidVersion == 2.3) {
   ... cry piss and moan b.c. there's nothing I can do
}
else if(androidVersion > 2.3) {
   ... use the new Telephony API
}
Mar 4, 2011
#65 claudiobastos@gmail.com
Hi guys, 

I've contacted David Brown, (I couldn't wait myself) and ask him about this permission and telephony api.

He mention the response of hackbod in
http://stackoverflow.com/questions/4715250/android-how-to-grant-modify-phone-state-permission-for-apps-ran-on-gingerbread
reforcing that we shouldn't use it cause things could break as system evolves.

But he already knows that the telephony api needs to be implemented, and that Telephony Team is planning exposing the api, but just don't know when.

He also suggest that we continue to file and star feature requests to push things.

We have to wait...


Mar 5, 2011
#66 sonisoe74@gmail.com
sort of a modifcation of it, one feature that i've been dying to have since first started using mobile phone is unobstrusive incoming call notification/dialogue when you're doing something else.   when you're writing a note, txting, browsing, penciling-in your agenda, tking pictures, incoming calls just take over the screen leaving you annoyed. so, like i said above, there should be a dialogue-box popping up on the top of the screen with an option to answer/ignore/or even reject, or you could actually use the notification bar letting you know who's calling and if you want to answer/reject, just pulldown the notfctn bar.
May 24, 2011
#68 bacon.li...@live.com
The closest solution I have found is the freeware/donationware: 

Sanity

http://tagliamonte.net/



Call Blocker
method: interrupt the signal


This option is available in the freeware, crippleware version of Sanity

Unlike most of the software in the android market sanity is not malware masquerading as freeware.  [adware is malware]
Jul 17, 2011
#69 leduc...@gmail.com
Blacklist can reject incoming calls from specific nunbers
https://market.android.com/details?id=org.baole.app.blacklist&feature=search_result
Oct 22, 2011
#70 bacon.li...@live.com
@#69

Blacklist is malware(Adware) thereby impeaching the developer of Blacklist Pro.
Oct 22, 2011
#71 leduc...@gmail.com
@#70
Adware is different to malware
Mar 6, 2012
#72 shriramn...@gmail.com
How is the autoanswer application , able to reject the call and send a text ? Installed on Samsung Galaxy S2 , android version 2.3

Is this issue resolved ? Can some one help me to reject call on android version 2.3

Mar 6, 2012
#73 yuvalkas...@gmail.com
I'm able to reject calls on all 2.3 versions.
but not silence the ringer.

what I did is use the ITelephony AIDL
get the interface via:
{{{
Class c = Class.forName(tm.getClass().getName());
Method m = c.getDeclaredMethod("getITelephony");
m.setAccessible(true);
telephonyService = (ITelephony)m.invoke(tm);
}}}

then call endCall method on the received telephonyService whenever there's an incoming call (listen via TelephonyManager for LISTEN_CALL_STATE)

disclaimer: of course this is not an officially supported method and uses internal interface which might change in the future.
I have not tested this yet on higher versions. (but tested on 2.1, 2.3.1, 2.3.3, 2.3.4, 2.3.7)
Jun 19, 2013
#77 jbq@android.com
(No comment was entered for this change.)
Status: Assigned
Jan 8, 2014
Project Member #78 al...@android.com
(No comment was entered for this change.)
Status: New
Sign in to add a comment

Powered by Google Project Hosting