Saturday, 15 September 2012

java - Intercept incoming call in a rooted Android (Jelly Bean) -



java - Intercept incoming call in a rooted Android (Jelly Bean) -

i'm looking intercept calls in order block calls numbers not stored in contacts , to avoid sorts of notifications set default phone app – in status bar, on icon (number of missed calls), etc.

all devices samsung galaxy core duos, have blocking mode undesirable way of blocking calls numbers not stored in contacts. my main problem finding way disable (avoid) aforementioned notifications. know can empty phone call log, , doing it, notifications stay, both in status bar , on icon. beingness said, believe either both or none can solved.

is there way rooted devices running jelly bean?

since there's no proper way of using abortboradcast() in case, android.intent.action.phone_state not beingness received via ordered broadcast (no system's sendorderedbroadcast() call, received short message, plain old sendbroadcast() instead), receivers must receive intent "at same time".

to create goal perchance impossible, far can see, things start happening before broadcast. furthermore, nil "legally receivable" happens before phone call sendbroadcast(), thoroughly yet briefly described in this blog post. way, post submitted in 2009. has related problem changed since then?

is possible solve using shell? if yes, how?

the code that's emptying phone call log following:

context.getcontentresolver().delete(android.provider.calllog.calls.content_uri, null, null);

i have permissions needed (for instance: write_call_log, read_contacts, write_contacts) , works. phone call log shows empty when touch phone app icon or status bar notification.

i solved using piece of code:

runtime runtime = runtime.getruntime(); seek { runtime.exec("service phone call phone 5 \n"); } grab (exception e) { e.printstacktrace(); }

it marks phone call ended, instead of marking missed, , ended calls not show notifications of kind.

if 5 doesn't work, seek other digits, 4, 6, 8, etc.

java android linux android-4.2-jelly-bean gsm

No comments:

Post a Comment