Phone tapping and interception application developed and implemented by Android

This paper describes the phone eavesdropping and interception application developed and implemented by Android. Share with you for your reference, as follows:

Today, I learned the communication between processes -- > Aidl. Based on the broadcast mechanism I learned a few days ago, I made a simple phone eavesdropping and recording application. The specific implementation methods are attached below for your reference. I hope you can provide some valuable opinions.

Business requirement analysis:

1. When the mobile phone is turned on, the monitoring service will be started to monitor and record incoming calls.

2. Set the phone blacklist. When the incoming call is a blacklist phone, hang up directly.

Implementation steps:

First, we need to define a phone monitoring service to monitor, record and intercept incoming calls. The specific codes are as follows:

PhoneListenerService:

Android does not disclose an API for ending a call. If you need 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 files from Android source code to the project:

As shown in the figure below The development tool will automatically generate itelephony. Exe in the gen directory java

We know that the service cannot be started by ourselves and needs to be started manually, so we need a broadcast. When the mobile phone is turned on, we send the broadcast and start the service of monitoring the phone. The following is a receiver I wrote to send a broadcast

BootCompleteReceiver:

Here's what we're going to do in Android manifest Configure relevant permissions in XML: the specific code is as follows:

AndroidManifest. xml:

Such an application to monitor the phone is done. When the mobile phone with this application is turned on, the incoming call is in the monitoring state, so that the incoming call of the mobile phone can be monitored, recorded or intercepted quietly, so as to achieve the purpose of concealment.

PS: for details on Android manifest function and permission settings, please refer to our online tools:

Description of Android manifest functions and permissions:

http://tools.jb51.net/table/AndroidManifest

For more Android related content, readers who are interested can view the special topics of this site: introduction and advanced tutorial of Android development, summary of Android view skills, summary of activity operation skills of Android programming, summary of skills of operating SQLite database for Android, summary of skills of operating JSON format data for Android, summary of operating skills of Android database Summary of Android file operation skills, summary of SD card operation methods for Android programming development, summary of Android resource operation skills and summary of Android control usage

I hope this article will help you in Android programming.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>