Background
At present, a commonly used Android terminal screen protection method is a mode that a mobile terminal enters a screen protection mode by screen saving or screen locking by pressing a power key, and then a screen lock is started.
However, after entering the screen saver, the mobile terminal cannot detect the data flow in time, so that a feasible machine for destroying the security of the mobile terminal is created for some malicious programs.
In addition, the mobile terminal adopts the screen saver method, and the screen-opening password needs to be verified when the screen is awakened at the later stage, so that although the safety of the terminal is improved, the terminal is difficult to avoid using, and a user feels cumbersome, and even if the user forgets to open the screen lock, the mobile terminal can not be opened forever. Moreover, by adopting the method for protecting the screen and waking up the screen, when the mobile phone is lost, the defect that the position of the mobile phone cannot be positioned exists.
Disclosure of Invention
The invention aims to provide a screen protection and privacy maintenance method based on Android, so that the problems in the prior art are solved.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a screen protection and privacy maintenance method based on Android comprises the following steps:
s0, writing an external interface for setting a memo contact associated with a screen unlocking lock, setting a mobile phone number of the memo contact, binding a screen unlocking password to the mobile phone number of the memo contact, and binding GPS geographic position information of the mobile terminal to the mobile phone number of the memo contact;
s1, monitoring the click event of the screen of the mobile terminal, judging whether the click event exists in one period, if so, entering the next screen monitoring process, otherwise, executing S2;
s2, calling an external interface of the user-defined screen saver image to enter the screen saver;
s3, calling an external interface of the memo contact person with the associated screen lock, and sending the GPS geographical position information of the mobile terminal to the memo contact person at regular time; after entering a screen saver, starting safety detection, judging whether potential safety hazards exist in the permission application, if so, determining that the permission application is dangerous permission application, automatically closing the mobile terminal or refusing the dangerous permission application, and if not, entering the next round of safety detection;
s4, judging whether the screen saver quits, if so, allowing to input the screen-on password, and executing S5, otherwise, jumping to S3;
and S5, judging whether the screen opening password is correct or not, if so, ending the process, otherwise, judging whether the input times of the wrong password exceed a set value or not, if so, calling an external interface of the memo contact person with the associated screen opening lock, and sending the screen opening password to the memo contact person.
Preferably, S1 further includes the step of writing an external interface for calling the system gallery, and using the selected file as the playing picture of the screen saver to form the external interface of the customized screen saver image.
Preferably, in S5, the mobile terminal sends the screen-opening password to the memo contact through a short message.
Preferably, the mobile terminal sends the GPS geographical position information to the memo contact at regular time through a short message.
The invention has the beneficial effects that: according to the Android-based screen protection and privacy maintenance method provided by the embodiment of the invention, the logic of entering the screen saver is set by utilizing the event monitoring of the Android system, and after entering the screen saver, other program software is automatically closed or the application of dangerous authorities related to other program software is refused through safety detection, so that the safety protection of the mobile terminal entering the screen saver is realized; in addition, by setting the interface of the memo contact person associated with the screen unlocking lock, when the screen unlocking password is forgotten, the interface is called to send the screen unlocking password of the terminal to the set memo contact person, and the problem that the mobile terminal cannot be opened forever because the screen unlocking lock is forgotten is solved. Therefore, the mobile terminal can be protected simply, safely and intelligently by adopting the method provided by the embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, an embodiment of the present invention provides a screen protection and privacy maintenance method based on Android, including the following steps:
s0, writing an external interface for setting a memo contact associated with a screen unlocking lock, setting a mobile phone number of the memo contact, binding a screen unlocking password to the mobile phone number of the memo contact, and binding GPS geographic position information of the mobile terminal to the mobile phone number of the memo contact;
s1, monitoring the click event of the screen of the mobile terminal, judging whether the click event exists in one period, if so, entering the next screen monitoring process, otherwise, executing S2;
s2, calling an external interface of the user-defined screen saver image to enter the screen saver;
s3, calling an external interface of the memo contact person with the associated screen lock, and sending the GPS geographical position information of the mobile terminal to the memo contact person at regular time; after entering a screen saver, starting safety detection, judging whether potential safety hazards exist in the permission application, if so, determining that the permission application is dangerous permission application, automatically closing the mobile terminal or refusing the dangerous permission application, and if not, entering the next round of safety detection;
s4, judging whether the screen saver quits, if so, allowing to input the screen-on password, and executing S5, otherwise, jumping to S3;
and S5, judging whether the screen opening password is correct or not, if so, ending the process, otherwise, judging whether the input times of the wrong password exceed a set value or not, if so, calling an external interface of the memo contact person with the associated screen opening lock, and sending the screen opening password to the memo contact person.
Firstly, combining a screen click event of a mobile terminal with a Service component of an Android system, and setting a unique and intelligent screen saver entering method; when entering a screen security, a safety monitoring module is automatically started, some dangerous authorities and authority combinations are enumerated by utilizing an authority detection mode of an Android system, dangerous software is refused or closed as long as dangerous authority application of a terminal is found, and a user is informed; by calling the interface of the memo contact person with the associated screen-opening lock arranged outside, the screen-opening password of the terminal can be sent to the set memo contact person when the screen-opening password is forgotten or the wrong screen-opening password is continuously input, so that the problem that the screen-opening password is forgotten is solved.
Therefore, by adopting the method provided by the embodiment of the invention, the logic of entering the screen saver is set by utilizing the event monitoring of the Android system, and after entering the screen saver, other program software is automatically closed or the application of the dangerous authority related to other program software is refused through safety detection, so that the safety protection of the mobile terminal entering the screen saver is realized; in addition, by setting the interface of the memo contact person associated with the screen unlocking lock, when the screen unlocking password is forgotten, the interface is called to send the screen unlocking password of the terminal to the set memo contact person, and the problem that the mobile terminal cannot be opened forever because the screen unlocking lock is forgotten is solved.
In this embodiment of the present invention, step S1 may further include writing an external interface for calling a system gallery, and forming an external interface for a custom screen saver image by using the selected file as a playing picture of the screen saver.
In the embodiment of the present invention, step S1 may further include writing an external interface for setting a memo contact associated with the screen unlocking lock, setting a mobile phone number of the memo contact, and binding the screen unlocking password to the mobile phone number of the memo contact.
In S5, the mobile terminal sends the screen opening password to the memo contact person through a short message.
In a preferred embodiment of the present invention, the GPS geographic location information of the mobile terminal is bound to the mobile phone number of the memo contact, and after S2, the method further includes the step of calling an external interface of the memo contact, which is set to be associated with the screen unlocking lock, and sending the GPS geographic location information of the mobile terminal to the memo contact at regular time.
By adopting the method, the positioning of the mobile terminal can be sent to the memo contact person at regular intervals by starting a GPS (global positioning system) timing task, so that the problem that the position of the mobile phone cannot be positioned under the condition that the mobile terminal is lost is solved, and the mobile terminal is further protected safely.
In the embodiment of the invention, the mobile terminal can send the GPS geographical position information to the memo contact at regular time through the short message.
In a specific implementation process, the method provided by the embodiment of the invention can be implemented according to the following steps:
step 1, customizing a global broadcast and a service by using components provided by an android system, compiling and calling an external interface of a system gallery, and taking a selected file as a playing picture of screen protection. I.e., to provide a method of setting a screen saver image.
And 2, reading the contact person mode by using the android system, setting a binding memo contact person, compiling a short message sending function, and sending a GPS (global positioning system) and a screen saver unlocking password of the mobile phone. Namely, a method for acquiring the position information of a mobile phone GPS (global positioning system) and a method for acquiring a screen lock password and calling the system to send a short message are provided.
And 3, compiling a background running program to realize the monitoring of the on and off of the mobile phone screen, and compiling a timing task to realize the function of automatically locking the screen and entering the screen saver without clicking events in the period. Namely, a method for turning off and lighting up a screen of a mobile phone is provided.
And 4, compiling a screen locking password lock, calling the method in the second step to add the phone number of the memo contact person in order to overcome the defects that the screen saver of the traditional mobile phone cannot remember the password and cannot be found back under the condition that the mobile phone is lost, binding the GPS and the screen saver password to the phone number, and triggering the method in the step 2 under the condition that the screen saver password is input wrongly. Namely, a method for solving the problems of password recovery due to password loss and positioning after mobile phone loss is provided.
And 5, compiling a dangerous authority monitoring function of the mobile phone, namely solving the defect that the traditional screen saver only simply protects a mobile phone screen but cannot protect the privacy of the mobile phone, and providing a method for detecting the privacy authority of the mobile phone.
And 6, combining the step 4 and the step 5 to realize the internal loop detection of the program, and putting the task thread in the background of the system, so that the logic function is kept in a state of waiting to be executed until the program is artificially and actively ended.
By adopting the technical scheme disclosed by the invention, the following beneficial effects are obtained: according to the Android-based screen protection and privacy maintenance method provided by the embodiment of the invention, the logic of entering the screen saver is set by utilizing the event monitoring of the Android system, and after entering the screen saver, other program software is automatically closed or the application of dangerous authorities related to other program software is refused through safety detection, so that the safety protection of the mobile terminal entering the screen saver is realized; in addition, by setting the interface of the memo contact person associated with the screen unlocking lock, when the screen unlocking password is forgotten, the interface is called to send the screen unlocking password of the terminal to the set memo contact person, and the problem that the mobile terminal cannot be opened forever because the screen unlocking lock is forgotten is solved. Therefore, the mobile terminal can be protected simply, safely and intelligently by adopting the method provided by the embodiment of the invention.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements should also be considered within the scope of the present invention.