Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block both calls when my first caller is taking with first caller. #3

Open
bsuhas opened this issue Dec 20, 2018 · 0 comments
Open

Comments

@bsuhas
Copy link

bsuhas commented Dec 20, 2018

Scenario: When the first call is ongoing(user talking with the first caller) in between second caller call to same user & that new caller is in my Blocklist when my call blocking logic runs both calls ended immediately.

In the above case, I want to end call of second caller only. How to achieve this?

Is there any way to identify & block the particular call?

TelephonyManager telephony = (TelephonyManager) context
                    .getSystemService(Context.TELEPHONY_SERVICE);
            String s = telephony.getClass().getName();
            Class c = Class.forName(telephony.getClass().getName());
            Method m = c.getDeclaredMethod("getITelephony");
            m.setAccessible(true);
            ITelephony telephonyService = (ITelephony) m.invoke(telephony);
            telephonyService.endCall();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant