Venkat
Venkat

Reputation: 3457

block a particular number?

I want to block few mobile numbers from my application.

I mean can receive the blocked mobile number call or message... but want it rejected right away, without the phone ringing.

Is it possible to do this from my application? If it is, please give me some samples..

 Class c = Class.forName(telephony.getClass().getName());
 Method m = c.getDeclaredMethod("getITelephony");
 m.setAccessible(true);
 telephonyService = (ITelephony) m.invoke(telephony);
 telephonyService.silenceRinger();
 telephonyService.endCall();
 } catch (Exception e) {
 e.printStackTrace();

Upvotes: 3

Views: 2092

Answers (1)

Ronak Mehta
Ronak Mehta

Reputation: 5979

@venkat goto this http://androidsourcecode.blogspot.in/ link it provide working sorce code to block o/g calls and also tested by me.

Upvotes: 2

Related Questions