Detailed explanation of Android secret code

Android Secret Code

Many of us should have done this operation. Opening the dial-up keyboard and entering * # * #4636# * #* and other characters will pop up an interface to display some information related to the mobile phone. This function is called Android secret code in Android. In addition to these preset secret codes, we can also implement our own secret code, which is very simple to implement.

To implement your own secret code, you only need to register a broadcast receiver with the system without any permission, as shown below:

You only need to register the action as Android provider. Telephony. SECRET_ Code, and scheme is Android_ secret_ Code, so that when the user enters * # * #0123# * #* #* on the dial-up keyboard, the receiver registered by us will be called. The received intent information will be typed in the receiver as follows:

This logic is handled in a dial-up application. If a third-party dial-up application is used and the application does not handle it, it may fail.

So what does this function do? It depends on the needs of the application. Since the broadcast receiver runs in your own application process, it can read all the data in your application. For example, you can dump the application status after receiving the broadcast, open an activity, make some special settings, and enable / disable some functions (for example, flyme can display some auxiliary functions in the settings after entering * # * #6961# * #* # *, and enable root, etc.).

However, different receivers can register the same Android: host, which may conflict with the settings of other applications. However, generally, applications should not use this function. It is better to put the control of non system level applications in the application.

Thank you for reading, hope to help you, thank you for your support to this site!

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
分享
二维码
< <上一篇
下一篇>>