Android does not open an API for ending a call. to end a call, you must use AIDL to communicate with the telephone management service and call the API in the service to end the call. The method is as follows: 1> copy the following file from the Android source code to the project: com. android. internal. ITelephony under the telephony package. aidl (corresponding to the \ base \ telephony \ java \ com \ Android \ internal \ telephony directory under the android version source code directory) android. neighboringCellInfo In the telephony package. aidl Note: You need to create a corresponding package name in the project to store the above two aidl files. 2> call ITelephony. end call (): Method method = Class. forName ("android. OS. serviceManager "). getMethod ("GetService", String. class); www.2cto.com IBinder binder = (IBinder) method. invoke (null, new Object [] {TELEPHONY_SERVICE}); ITelephony telephony = ITelephony. stub. asInterface (binder); telephony. endCall (); 3> the above is only one of the usage of ITelephony. It can be used to implement the phone blacklist function-Listen to the phone call status and determine if the phone number is a blacklist number, that is, the phone is hung up as shown above. In addition, there are many other practical methods. For example, the call method can be used to directly call a phone and obtain the call status. I have not studied this method in depth. Add the permission to the AndroidManifest. xml file: <uses-permission android: name = "android. permission. CALL_PHONE"/>