Is it possible for an Android application to complete the call it initiated?

Looking through the forums, it seems that there is no way to end calls, but on the Android developers page, the PROCESS_OUTGOING_CALLS permission is β€œAllows the application to track, modify, or interrupt outgoing calls.” I cannot find documentation on how to end a call even with this permission. Is this possible, or is it just a page error?

http://developer.android.com/reference/android/Manifest.permission.html#PROCESS_OUTGOING_CALLS

+3
source share
1 answer

, , , . , , , , . ( ..) . :

    public class phoneReceiver extends BroadcastReceiver {
      public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals(Intent.ACTION_NEW_OUTGOING_CALL)) {
        abortBroadcast();
        if (getResultData()!=null) {
          String number = null;
          setResultData(number);
        }
      }
    }
}
+2

Source: https://habr.com/ru/post/1753411/