Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to block calls in android

I want to block calls from few numbers, for that I want to write a app of my own. So what are the APIs which I should be using?

Basically I want to get notified when a call comes, i want to compare numbers if it is what i want to block, i want to cut the call or mute it or if possible mute it and record it.

like image 275
Anurag Uniyal Avatar asked Jul 05 '09 05:07

Anurag Uniyal


People also ask

Can I block incoming calls on my Android?

Tap 'Call settings'. Tap 'Call rejection'. Tap 'Auto reject mode' to temporarily reject all incoming numbers. If you would like to reject only a specific number, tap 'Auto reject list'.

How do you block someone from calling you?

Go to Settings > Messages and turn on Filter Unknown Senders. To block a number that called you, open the Phone app and tap Recent. Find the number and tap the Info icon (it looks like a lowercase letter ”i” in a circle). Scroll down and tap Block this Caller.


1 Answers

OMG!!! YES, WE CAN DO THAT!!! I was going to kill myself after severe 24 hours of investigating and discovering... But I've found "fresh" solution!

// "cheat" with Java reflection to gain access to TelephonyManager's // ITelephony getter Class c = Class.forName(tm.getClass().getName()); Method m = c.getDeclaredMethod("getITelephony"); m.setAccessible(true); telephonyService = (ITelephony)m.invoke(tm); 

all all all of hundreds of people who wants to develop their call-control software visit this start point

there is a project. and there are important comments (and credits)

briefly: copy aidl file, add permissions to manifest, copy-paste source for telephony management )))

Some more info for you. AT commands you can send only if you are rooted. Than you can kill system process and send commands but you will need a reboot to allow your phone to receive and send calls =)))

I'm very hapy =) Now my Shake2MuteCall will get an update !

like image 128
foryou Avatar answered Sep 25 '22 19:09

foryou