Joke Collection Website - Public benefit messages - Can SMS interception stop strange calls?
Can SMS interception stop strange calls?
As long as there is a signal when the phone is turned on, you can receive the other party's information. When it is set to call rejection or blacklist, if the other party sends a short message, the mobile phone can still receive the short message. SMS is stored in your mobile phone blacklist or call rejection record, which includes not only the call rejection record, but also the SMS interception record.
SMS interception is actually a relatively simple one. There are many related introductions on the Internet. Here, I mainly introduce some problems encountered in the writing process.
First of all, the principle of SMS interception is to monitor the broadcast of SMS, and then judge the number of SMS and whether it is blacklisted. If so, the broadcast transmission is ended by broadcasting. Among them, the most important problem in the process of doing this is not to receive the interception, but to receive the interception first, because the short message broadcast is orderly broadcast, so whoever receives the broadcast first can have the right to end the transmission of the broadcast, so we must actually find ways to raise our permission to receive the broadcast to the highest level. There are two main methods here, 1 is to set the maximum weight limit, and 2 is to set the registration method as dynamic registration.
Setting the maximum permissions actually means setting the highest priority when registering for broadcasting. The api of Android system states that the maximum permission is 1000, but in fact it receives an int value, and the system has no online judgment value, so we can set the maximum value of int, and this permission is the highest.
Then, if they are all the maximum permissions and whose priority is higher, it is the second point, dynamic registration monitoring. Because the broadcast registered dynamically in the source code is put into the monitoring list before the static broadcast, we use dynamic registration to set up monitoring here.
Then if everyone uses dynamic registration, who will receive it first? This place seems to be related to the package name of the application. I don't quite understand. The earlier the installation time, the higher the priority, and the higher the alias order of software package names in the system (not the alphabetical order of software package names written by us).
Then let's look at the concrete implementation. First, build a service, and then ensure that the service always runs in the background (it can always exist through daemons, listening to boot broadcasts, etc.). ), and then register the broadcast and deregister it in the onStartCommand and onDestroy methods of the service respectively.
- Previous article:What should oppo mobile phone do if it receives SMS verification code bombing?
- Next article:What are the pitfalls of Yi 'an Insurance?
- Related articles
- Can¡¯t all the text messages on N72 be deleted? If yes, please tell me where to select it, and what is the password to select call restriction? I can¡¯t find it in the manual.
- Investment planning scheme [3]
- Complete works of teachers' day greetings
- Is the payment information at the beginning of Alipay 1069 true?
- A message congratulating you on your promotion and salary increase.
- Is Suzhou National Gastrointestinal Survey True?
- New Year¡¯s greetings to medical staff
- A plan to participate in volunteer activities
- Romantic love stories on Valentine's Day in May
Romantic love stories on Valentine's Day in May (1)
1. Since I met you, you stole your heart. The earth loses its gravity and the soul leave
- How to send invitations to the school banquet?