CN105550007B - Control method and device for mobile terminal and mobile terminal - Google Patents
- ️Tue Feb 05 2019
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and for explaining only the invention, and is not considered as limiting the invention.On the contrary, this The embodiment of invention includes all changes fallen within the scope of the spiritual and intension of attached claims, modification and is equal Object.
Fig. 1 is the flow diagram for the control method for mobile terminal that one embodiment of the invention proposes, such as Fig. 1 institute Show, which includes:
S101: in the application program launching of mobile terminal, Service service to be launched in application program is intercepted.
Now with the quick universal of mobile terminal, user is by using more provided by the application program in mobile terminal Kind of function is come the needs of meeting itself, with the development of application program in android system, the kind of advertising service in application program Class is also more and more, during user uses application program, often will pop up advertising service, for can accidentally click advertisement Service leads to the installation kit of accidentally downloads ad service, and the flow of mobile terminal is consumed under this mode, brings economic damage to user It loses.
Wherein, mobile terminal can be smart phone, tablet computer, personal digital assistant, e-book etc. with various behaviour Make the hardware device of system, application program can refer to the software program operated on electronic equipment, and electronic equipment is, for example, People's computer (Personal Computer, PC), cloud device or mobile terminal.
Wherein, application program can refer to the software program operated on electronic equipment, and electronic equipment is, for example, personal electricity Brain (Personal Computer, PC), cloud device or mobile device, mobile device such as smart phone or plate electricity Brain etc..
Wherein, Service service is one of four big components in Android system (Activity component, Service clothes Business, BroadcastReceiver component, ContentProvider component), Service service is network-based, distributed Modular assembly, it executes specific task, abides by specific technical specification, these are standardized so that Service service can be with Other components held a concurrent post are operated, and Service service may operate in the process of application program.
In an embodiment of the present invention, Service service to be launched can be, for example, advertising service, to be launched Service service, which can be triggered specifically by ActivityManagerService component, to be started, wherein ActivityManagerService component be responsible for manage mobile terminal in all application programs Activity component starting and Service service starting etc..
For example, the application program in mobile terminal when the user clicks, after application program launching, can trigger simultaneously starting with from The associated advertising service of body, to carry out advertising to user.
In an embodiment of the present invention, it is triggered in starting application program in ActivityManagerService component It when Service is serviced, can be serviced by AdsFilterService interception component Service to be launched, and to intercepting Service service to be launched carry out subsequent processing.
S102: judge whether Service service to be launched belongs to the service in blacklist configuration file.
In an embodiment of the present invention, blacklist configuration file can be pre-configured with and be added by the operating system of mobile terminal It carries, blacklist configuration file can be adfilterservice.xml.
Optionally, mobile terminal can judge that Service service to be launched is by AdsFilterService component The no service belonged in blacklist configuration file.
S103: if Service service to be launched belongs to the service in blacklist configuration file, do not start to be launched Service service.
For example, when ActivityManagerService component triggers the Service service in starting application program, it can To be serviced by AdsFilterService interception component Service to be launched, and it is to be launched determining to intercept Service service belongs to the service in blacklist configuration file, i.e., the advertisement clothes that Service service to be launched intercepts for needs When business, starting processing is not carried out to Service service to be launched, to reduce the unnecessary flow loss of mobile terminal.
It is to be launched in application program by intercepting in the application program launching of mobile terminal in the present embodiment Service service, when Service service to be launched belongs to the service in blacklist configuration file, does not start to be launched Service service, can effectively reduce the flow loss of mobile terminal, promote the usage experience of user.
Fig. 2 is the flow diagram for the control method for mobile terminal that another embodiment of the present invention proposes, such as Fig. 2 institute Show, which includes:
S201: the opening and closing button for intercepting Service service is opened.
Specifically, the opening and closing button of Service service is intercepted in the display screen display of mobile terminal, wherein opening and closing is pressed Button includes releasing the button and close button, if detecting that user triggers intercepts releasing the button for Service service, opens shifting The mode for intercepting Service service of dynamic terminal, and after determining that mobile terminal opens the mode for intercepting Service service, it obtains Take blacklist configuration file.User passes through the opening and closing button for intercepting Service service in triggering mobile terminal display screen It is turned on or off the mode for intercepting Service service of mobile terminal, it is easy to operate.
S202: blacklist configuration file is obtained, and the Service service intercepted will be needed to be added to blacklist configuration file In.
In an embodiment of the present invention, blacklist configuration file can be pre-configured with and be added by the operating system of mobile terminal It carries, blacklist configuration file can be adfilterservice.xml.
For example, the operating system of mobile terminal can be from mobile terminal before the application program launching of mobile terminal Blacklist configuration file and the Service for needing to intercept service are obtained in background server, and the Service for needing to intercept is serviced It is added in blacklist configuration file, obtains the Service service for needing to intercept for example, the category that can be serviced according to Service Property judge the Service service whether be advertising service, if it is advertising service, then determine the Service service be needs block The Service service cut.
In this step, by obtaining blacklist configuration file, and the Service service intercepted will be needed to be added to blacklist In configuration file, it may be implemented to intercept the Service service being added in blacklist configuration file, promote making for user With experience.
S203: starting the system service of mobile terminal, and loads blacklist configuration file.
For example, can be by the ActivityManagerService component of the system service of starting mobile terminal, to add Carry blacklist configuration file adfilterservice.xml.
By starting the system service of mobile terminal, and blacklist configuration file is loaded, in mobile terminal plug-in Software aspects, which are realized, intercepts the Service service serviced in the blacklist configuration file belonged to after loading, and promotion is used for The versatility of the control method of mobile terminal.
S204: the Service service intercepted to needs is updated, and is serviced with obtaining updated Service, and according to Updated Service service updates blacklist configuration file.
Optionally, when the developer of application program carries out upgrading update to application program, in the start-up course of application program The middle new Service service of implantation, and when the user of mobile terminal is not intended to service using the new Service, mobile terminal The Service service that can be intercepted by the new Service service to needs is updated, in the application journey of mobile terminal When sequence starts, updated Service service to be launched in application program can be intercepted.
It in this step, is updated by the Service service intercepted to needs, to obtain updated Service clothes Business, and serviced according to updated Service and update blacklist configuration file, blacklist configuration file can be carried out more in time Newly, guarantee the robustness and applicability of the control method for mobile terminal.
S205: in the application program launching of mobile terminal, Service service to be launched in application program is intercepted.
In an embodiment of the present invention, Service service to be launched can be, for example, advertising service, to be launched Service service, which can be triggered specifically by ActivityManagerService component, to be started, wherein ActivityManagerService component be responsible for manage mobile terminal in all application programs Activity component starting and Service service starting etc..
For example, the application program in mobile terminal when the user clicks, after application program launching, can trigger simultaneously starting with from The associated advertising service of body, to carry out advertising to user.
In an embodiment of the present invention, it is triggered in starting application program in ActivityManagerService component It when Service is serviced, can be serviced by AdsFilterService interception component Service to be launched, and to intercepting Service service to be launched carry out subsequent processing.
S206: judging whether Service service to be launched belongs to the service in blacklist configuration file, if so, holding Row step S207, it is no to then follow the steps S208.
Optionally, mobile terminal can judge that Service service to be launched is by AdsFilterService component The no service belonged in blacklist configuration file, and belong in blacklist configuration file in judgement Service service to be launched Service when, triggering executes step S207, is determining that Service service to be launched is not belonging to the clothes in blacklist configuration file When business, start Service service to be launched.
S207: Service service to be launched is not started.
For example, when ActivityManagerService component triggers the Service service in starting application program, it can To be serviced by AdsFilterService interception component Service to be launched, and it is to be launched determining to intercept Service service belongs to the service in blacklist configuration file, i.e., the advertisement clothes that Service service to be launched intercepts for needs When business, starting processing is not carried out to Service service to be launched, to reduce the unnecessary flow loss of mobile terminal.
S208: start Service service to be launched.
For example, when ActivityManagerService component triggers the Service service in starting application program, it can To be serviced by AdsFilterService interception component Service to be launched, and it is to be launched determining to intercept Service service is not belonging to the service in blacklist configuration file, i.e., Service service to be launched is wide not need to intercept When accusing service, starting processing is carried out to Service service to be launched, so that the application program in mobile terminal can be transported normally Row.
In the present embodiment, user is by the opening and closing button that the interception Service in triggering mobile terminal display screen is serviced It can be turned on or off the mode for intercepting Service service of mobile terminal, it is easy to operate.By obtaining blacklist configuration text Part, and the Service service that intercepts will be needed to be added in blacklist configuration file may be implemented to configure to being added to blacklist Service service in file is intercepted, and the usage experience of user is promoted.By starting the system service of mobile terminal, and Blacklist configuration file is loaded, is realized in the software aspects of mobile terminal plug-in to the blacklist configuration text after belonging to load The Service service serviced in part is intercepted, and the versatility of the control method for mobile terminal is promoted.By being blocked to needs The Service service cut is updated, to obtain updated Service service, and more according to updated Service service New blacklist configuration file, can in time be updated blacklist configuration file, guarantee the control method for being used for mobile terminal Robustness and applicability.By intercepting Service to be launched in application program in the application program launching of mobile terminal Service, when Service service to be launched belongs to the service in blacklist configuration file, does not start Service to be launched Service, can effectively reduce the flow loss of mobile terminal, promote the usage experience of user.It is serviced in Service to be launched When the service being not belonging in blacklist configuration file, starting processing is carried out to Service service to be launched, so that mobile terminal In application program can operate normally.
Fig. 3 is the structural schematic diagram for the control device for mobile terminal that another embodiment of the present invention proposes, such as Fig. 3 institute Show, which includes:
Blocking module 301, it is to be launched in application program for intercepting in the application program launching of mobile terminal Service service.
Judgment module 302, for judging whether Service service to be launched belongs to the clothes in blacklist configuration file Business.
Processing module 303, for when Service service to be launched belongs to the service in blacklist configuration file, no Start Service service to be launched.
Optionally, in another embodiment, processing module 303 is also used to: if Service service to be launched is not belonging to Service in blacklist configuration file then starts Service service to be launched.
Optionally, in another embodiment, as shown in figure 4, this is used for the control device 30 of mobile terminal further include:
Opening module 304, for opening the opening and closing button for intercepting Service service.
Module 305 is obtained, for obtaining blacklist configuration file, and it is black that the Service service intercepted will be needed to be added to In list configuration file.
Loading module 306 for starting the system service of mobile terminal, and loads blacklist configuration file.
Update module 307, the Service service for intercepting to needs is updated, to obtain updated Service Service, and serviced according to updated Service and update blacklist configuration file.
It should be noted that the aforementioned explanation to the control method embodiment for mobile terminal is also applied for the reality The control device 30 for mobile terminal of example is applied, realization principle is similar, and details are not described herein again.
It is to be launched in application program by intercepting in the application program launching of mobile terminal in the present embodiment Service service, when Service service to be launched belongs to the service in blacklist configuration file, does not start to be launched Service service, can effectively reduce the flow loss of mobile terminal, promote the usage experience of user.
The embodiment of the invention also provides a kind of mobile terminal, which includes shell, processor, memory, electricity Road plate and power circuit, wherein circuit board is placed in the space interior that shell surrounds, and processor and memory are arranged in circuit board On;Power circuit, for each circuit or the device power supply for mobile terminal;Memory is for storing executable program code; Processor runs program corresponding with executable program code by reading the executable program code stored in memory, with For executing:
S101 ': in the application program launching of mobile terminal, Service service to be launched in application program is intercepted.
Now with the quick universal of mobile terminal, user is by using more provided by the application program in mobile terminal Kind of function is come the needs of meeting itself, with the development of application program in android system, the kind of advertising service in application program Class is also more and more, during user uses application program, often will pop up advertising service, for can accidentally click advertisement Service leads to the installation kit of accidentally downloads ad service, and the flow of mobile terminal is consumed under this mode, brings economic damage to user It loses.
Wherein, mobile terminal can be smart phone, tablet computer, personal digital assistant, e-book etc. with various behaviour Make the hardware device of system, application program can refer to the software program operated on electronic equipment, and electronic equipment is, for example, People's computer (Personal Computer, PC), cloud device or mobile terminal.
Wherein, application program can refer to the software program operated on electronic equipment, and electronic equipment is, for example, personal electricity Brain (Personal Computer, PC), cloud device or mobile device, mobile device such as smart phone or plate electricity Brain etc..
Wherein, Service service is one of four big components in Android system (Activity component, Service clothes Business, BroadcastReceiver component, ContentProvider component), Service service is network-based, distributed Modular assembly, it executes specific task, abides by specific technical specification, these are standardized so that Service service can be with Other components held a concurrent post are operated, and Service service may operate in the process of application program.
In an embodiment of the present invention, Service service to be launched can be, for example, advertising service, to be launched Service service, which can be triggered specifically by ActivityManagerService component, to be started, wherein ActivityManagerService component be responsible for manage mobile terminal in all application programs Activity component starting and Service service starting etc..
For example, the application program in mobile terminal when the user clicks, after application program launching, can trigger simultaneously starting with from The associated advertising service of body, to carry out advertising to user.
In an embodiment of the present invention, it is triggered in starting application program in ActivityManagerService component It when Service is serviced, can be serviced by AdsFilterService interception component Service to be launched, and to intercepting Service service to be launched carry out subsequent processing.
S102 ': judge whether Service service to be launched belongs to the service in blacklist configuration file.
In an embodiment of the present invention, blacklist configuration file can be pre-configured with and be added by the operating system of mobile terminal It carries, blacklist configuration file can be adfilterservice.xml.
Optionally, mobile terminal can judge that Service service to be launched is by AdsFilterService component The no service belonged in blacklist configuration file.
S103 ': if Service service to be launched belongs to the service in blacklist configuration file, do not start wait open Dynamic Service service.
For example, when ActivityManagerService component triggers the Service service in starting application program, it can To be serviced by AdsFilterService interception component Service to be launched, and it is to be launched determining to intercept Service service belongs to the service in blacklist configuration file, i.e., the advertisement clothes that Service service to be launched intercepts for needs When business, starting processing is not carried out to Service service to be launched, to reduce the unnecessary flow loss of mobile terminal.
It is to be launched in application program by intercepting in the application program launching of mobile terminal in the present embodiment Service service, when Service service to be launched belongs to the service in blacklist configuration file, does not start to be launched Service service, can effectively reduce the flow loss of mobile terminal, promote the usage experience of user.
In another embodiment, processor runs and can be performed by reading the executable program code stored in memory The corresponding program of program code, for executing:
S201 ': the opening and closing button for intercepting Service service is opened.
Specifically, the opening and closing button of Service service is intercepted in the display screen display of mobile terminal, wherein opening and closing is pressed Button includes releasing the button and close button, if detecting that user triggers intercepts releasing the button for Service service, opens shifting The mode for intercepting Service service of dynamic terminal, and after determining that mobile terminal opens the mode for intercepting Service service, it obtains Take blacklist configuration file.User passes through the opening and closing button for intercepting Service service in triggering mobile terminal display screen It is turned on or off the mode for intercepting Service service of mobile terminal, it is easy to operate.
S202 ': obtaining blacklist configuration file, and the Service service intercepted will be needed to be added to blacklist configuration text In part.
In an embodiment of the present invention, blacklist configuration file can be pre-configured with and be added by the operating system of mobile terminal It carries, blacklist configuration file can be adfilterservice.xml.
For example, the operating system of mobile terminal can be from mobile terminal before the application program launching of mobile terminal Blacklist configuration file and the Service for needing to intercept service are obtained in background server, and the Service for needing to intercept is serviced It is added in blacklist configuration file, obtains the Service service for needing to intercept for example, the category that can be serviced according to Service Property judge the Service service whether be advertising service, if it is advertising service, then determine the Service service be needs block The Service service cut.
In this step, by obtaining blacklist configuration file, and the Service service intercepted will be needed to be added to blacklist In configuration file, it may be implemented to intercept the Service service being added in blacklist configuration file, promote making for user With experience.
S203 ': starting the system service of mobile terminal, and loads blacklist configuration file.
For example, can be by the ActivityManagerService component of the system service of starting mobile terminal, to add Carry blacklist configuration file adfilterservice.xml.
By starting the system service of mobile terminal, and blacklist configuration file is loaded, in mobile terminal plug-in Software aspects, which are realized, intercepts the Service service serviced in the blacklist configuration file belonged to after loading, and promotion is used for The versatility of the control method of mobile terminal.
S204 ': the Service service intercepted to needs is updated, to obtain updated Service service, and root It is serviced according to updated Service and updates blacklist configuration file.
Optionally, when the developer of application program carries out upgrading update to application program, in the start-up course of application program The middle new Service service of implantation, and when the user of mobile terminal is not intended to service using the new Service, mobile terminal The Service service that can be intercepted by the new Service service to needs is updated, in the application journey of mobile terminal When sequence starts, updated Service service to be launched in application program can be intercepted.
It in this step, is updated by the Service service intercepted to needs, to obtain updated Service clothes Business, and serviced according to updated Service and update blacklist configuration file, blacklist configuration file can be carried out more in time Newly, guarantee the robustness and applicability of the control method for mobile terminal.
S205 ': in the application program launching of mobile terminal, Service service to be launched in application program is intercepted.
In an embodiment of the present invention, Service service to be launched can be, for example, advertising service, to be launched Service service, which can be triggered specifically by ActivityManagerService component, to be started, wherein ActivityManagerService component be responsible for manage mobile terminal in all application programs Activity component starting and Service service starting etc..
For example, the application program in mobile terminal when the user clicks, after application program launching, can trigger simultaneously starting with from The associated advertising service of body, to carry out advertising to user.
In an embodiment of the present invention, it is triggered in starting application program in ActivityManagerService component It when Service is serviced, can be serviced by AdsFilterService interception component Service to be launched, and to intercepting Service service to be launched carry out subsequent processing.
S206 ': judging whether Service service to be launched belongs to the service in blacklist configuration file, if so, holding Row step S207 ', it is no to then follow the steps S208 '.
Optionally, mobile terminal can judge that Service service to be launched is by AdsFilterService component The no service belonged in blacklist configuration file, and belong in blacklist configuration file in judgement Service service to be launched Service when, triggering executes step S207 ', is determining that Service service to be launched is not belonging in blacklist configuration file When service, start Service service to be launched.
S207 ': Service service to be launched is not started.
For example, when ActivityManagerService component triggers the Service service in starting application program, it can To be serviced by AdsFilterService interception component Service to be launched, and it is to be launched determining to intercept Service service belongs to the service in blacklist configuration file, i.e., the advertisement clothes that Service service to be launched intercepts for needs When business, starting processing is not carried out to Service service to be launched, to reduce the unnecessary flow loss of mobile terminal.
S208 ': start Service service to be launched.
For example, when ActivityManagerService component triggers the Service service in starting application program, it can To be serviced by AdsFilterService interception component Service to be launched, and it is to be launched determining to intercept Service service is not belonging to the service in blacklist configuration file, i.e., Service service to be launched is wide not need to intercept When accusing service, starting processing is carried out to Service service to be launched, so that the application program in mobile terminal can be transported normally Row.
In the present embodiment, user is by the opening and closing button that the interception Service in triggering mobile terminal display screen is serviced It can be turned on or off the mode for intercepting Service service of mobile terminal, it is easy to operate.By obtaining blacklist configuration text Part, and the Service service that intercepts will be needed to be added in blacklist configuration file may be implemented to configure to being added to blacklist Service service in file is intercepted, and the usage experience of user is promoted.By starting the system service of mobile terminal, and Blacklist configuration file is loaded, is realized in the software aspects of mobile terminal plug-in to the blacklist configuration text after belonging to load The Service service serviced in part is intercepted, and the versatility of the control method for mobile terminal is promoted.By being blocked to needs The Service service cut is updated, to obtain updated Service service, and more according to updated Service service New blacklist configuration file, can in time be updated blacklist configuration file, guarantee the control method for being used for mobile terminal Robustness and applicability.By intercepting Service to be launched in application program in the application program launching of mobile terminal Service, when Service service to be launched belongs to the service in blacklist configuration file, does not start Service to be launched Service, can effectively reduce the flow loss of mobile terminal, promote the usage experience of user.It is serviced in Service to be launched When the service being not belonging in blacklist configuration file, starting processing is carried out to Service service to be launched, so that mobile terminal In application program can operate normally.
It should be noted that in the description of the present invention, term " first ", " second " etc. are used for description purposes only, without It can be interpreted as indication or suggestion relative importance.In addition, in the description of the present invention, unless otherwise indicated, the meaning of " multiple " It is two or more.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be of the invention Embodiment person of ordinary skill in the field understood.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any One or more embodiment or examples in can be combined in any suitable manner.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example Property, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentioned Embodiment is changed, modifies, replacement and variant.