I have created a test internal application to reject the native phone calls.
I am using below code to reject the calls.
TelecomManager tm = (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE);
tm.endCall();
But the thing is; endCall method is Deprecated.
Is there any alternative for this method?
From the aosp documentation :
To end the call, your application needs to manage the calls by implementing the InCallService. Your custom service will then have the capabilities to get ongoing calls and disconnect them.