Call Reject support from Android 2.2 to 2.3

While working on call blocker android project I came across the problem when my app was blocking calls successfully on android 2.2 but not on 2.3. The reason google change its private telephony API. So I have to do some work around to make it work on 2.3.

I create java package com.android.internal.telephony in my project and create a new blank java file in that package, and called it ITelephony.java. Then I copied and pasted the code from here into that file, and saved it: http://www.google.com/codesearch/p?hl=en#LQbkWtxul78/gen/com/android/internal/telephony/ITelephony.java&q=file:(/%7C%5E)com/android/internal/telephony/ITelephony%5C.java$&sa=N&cd=1&ct=r
I have it working with emulators on ALL versions of Android higher than API level 5, which is Android 1.6. In other words, from 2.0 up to 2.3.3 (API levels 6 through 10) it is working! The only minor issue was with 2.2 where the dialup screen come for few millisecond if no application is running  on the set otherwise call block silently.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s