CN107317923B - Method, device and terminal for controlling GPS running state - Google Patents
Method, device and terminal for controlling GPS running state Download PDFInfo
- Publication number
- CN107317923B CN107317923B CN201710465825.4A CN201710465825A CN107317923B CN 107317923 B CN107317923 B CN 107317923B CN 201710465825 A CN201710465825 A CN 201710465825A CN 107317923 B CN107317923 B CN 107317923B
- Authority
- CN
- China
- Prior art keywords
- application program
- application
- positioning service
- requesting
- terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/10—Details of telephonic subscriber devices including a GPS signal receiver
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
- Position Fixing By Use Of Radio Waves (AREA)
- Telephone Function (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a method, a device and a terminal for controlling a GPS running state. The method for controlling the running state of the GPS provided by the invention comprises the following steps: detecting whether a first application program with a request positioning service authority exists in the currently running application program, wherein the request positioning service authority of the application program is obtained by acquiring an authority endowing operation input by a user; if yes, detecting whether a second application program requesting the positioning service exists in the first application programs; if a second application program which is requesting the positioning service exists in the first application programs, controlling the operation of the GPS; and if the second application program which is requesting the positioning service does not exist in the first application programs, controlling the GPS to stop running. The method, the device and the terminal for controlling the GPS running state effectively reduce the running time of the GPS, reduce the power consumption of the terminal and prolong the endurance time of the terminal battery, thereby prolonging the service life of the terminal battery.
Description
Technical Field
The present invention relates to communications engineering technologies, and in particular, to a method, an apparatus, and a terminal for controlling a GPS operating state.
Background
Most of application programs in the existing Android system require positioning, even if a certain application program continuously requests positioning service when running in a background, the GPS is always in an open state, so that the power consumption of a terminal provided with the Android system is increased, the endurance time is shorter and shorter, the service life of the battery of the terminal is shortened, and resources are wasted.
In the prior art, a method of freezing a certain application program is generally adopted to stop requesting positioning service, so that the running time of a GPS is reduced. But if an application is frozen, the application cannot be used continuously. When the application program is unfrozen, the problem that the application program can not control the request positioning service when the application program runs occurs, and therefore the running state of the GPS can not be controlled. That is, in the prior art, the application program can be stopped from requesting the positioning service only when the application program is not running, and the expected power saving effect cannot be achieved, so that the expected effect of prolonging the service life of the battery cannot be achieved.
Disclosure of Invention
The invention provides a method, a device and a terminal for controlling a GPS running state, which aim to overcome the technical problem that the GPS running state cannot be controlled in the prior art.
In a first aspect, the present invention provides a method for controlling an operating state of a GPS, comprising:
detecting whether a first application program with a request positioning service authority exists in application programs currently running; wherein, the request positioning service authority of the application program is obtained by acquiring authority given operation input by a user;
if yes, detecting whether a second application program requesting the positioning service exists in the first application programs;
if a second application program which is requesting the positioning service exists in the first application programs, controlling the GPS to be in an opening state;
and if the second application program which is requesting the positioning service does not exist in the first application programs, controlling the GPS to be in a closed state.
In one possible design, a preset application program list is stored in the terminal, and the preset application program list comprises an identifier of an application program with a request for positioning service authority;
the detecting whether a first application program with the authority of requesting the positioning service exists in the currently running application programs comprises the following steps:
and detecting whether the currently running application program has a first application program with the permission of requesting the positioning service or not according to the preset application program list.
In one possible design, before detecting whether a first application with the permission to request location service exists in the currently running applications according to the preset application list, the method further includes:
inquiring an application program which is stored in the current terminal and has a function of requesting location service;
displaying the identification of each application program with the function of requesting the positioning service;
determining the mark selected by the user in the display interface of the mark as a target mark;
and generating the preset application program list according to each target identifier.
In one possible design, before detecting whether a first application with the permission to request location service exists in the currently running applications according to the preset application list, the method further includes:
detecting whether an application program newly installed after a preset application program list currently stored in the terminal exists in the terminal;
if so, displaying prompt information, wherein the prompt information is used for instructing a user to input an instruction for determining that the identifier of the newly installed application program is added to the preset application program list currently stored in the terminal or an instruction for instructing the user to input an instruction for determining that the identifier of the newly installed application program is not added to the preset application program list currently stored in the terminal;
if an instruction input by a user and used for determining that the identification of the newly installed application program is added to a preset application program list currently stored in the terminal is obtained, adding the identification of the newly installed application program to the preset application program list currently stored in the terminal to obtain a new preset application program list;
according to the preset application program list, the step of detecting whether a first application program with a request positioning service authority exists in the currently running application programs comprises the following steps:
and detecting whether a first application program with the permission of requesting the positioning service exists in the application programs currently running according to the new preset application program list.
In one possible design, before detecting whether a first application having a right to request a location service exists in the currently running applications, the method further includes:
and detecting whether the application program running in the foreground is changed, wherein the detection result is yes.
In one possible design, before detecting whether a first application having a right to request a location service exists in the currently running applications, the method further includes:
and detecting whether the display interface of the application program running in the foreground is switched, wherein the detection result is yes.
In a second aspect, the present invention provides an apparatus for controlling an operating state of a GPS, comprising:
the system comprises a first detection module, a second detection module and a third detection module, wherein the first detection module is used for detecting whether a first application program with a request positioning service authority exists in the currently running application program or not, and the request positioning service authority of the application program is obtained by acquiring authority endowing operation input by a user;
the first detection module is further configured to detect whether a second application program requesting a location service exists in each first application program if the first application program having the permission of requesting the location service exists in the currently running application programs;
the control module is used for controlling the GPS to be in an opening state if a second application program which is requesting the positioning service exists in each first application program; and if the second application program which is requesting the positioning service does not exist in the first application programs, controlling the GPS to be in a closed state.
In one possible design, the apparatus further includes:
the query module is used for querying the application program which is stored in the current terminal and has the function of requesting the positioning service;
the display module is used for displaying the identification of each application program with the function of requesting the positioning service;
the determining module is used for determining the identifier selected by the user in the display interface of the identifier as a target identifier;
and the list generation module is used for generating the preset application program list according to each target identifier.
In a third aspect, the present invention also provides a terminal, including the apparatus for controlling the GPS operation state as described above.
In a fourth aspect, the present invention also provides a computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method according to the first aspect and the various implementations of the first aspect.
In a fifth aspect, the invention also provides a program product comprising a computer program, the computer program being stored on a readable storage medium. The computer program is for implementing the methods described in the various implementations of the first aspect.
The method for controlling the running state of the GPS comprises the following steps: detecting whether a first application program with a request positioning service authority exists in the currently running application programs, wherein the request positioning service authority of the application program is obtained by acquiring an authority endowing operation input by a user; if yes, detecting whether a second application program requesting the positioning service exists in the first application programs; if a second application program which is requesting the positioning service exists in the first application programs, controlling the operation of the GPS; and if the second application program which is requesting the positioning service does not exist in the first application programs, controlling the GPS to stop running. The method for controlling the running state of the GPS effectively reduces the running time of the GPS, reduces the power consumption of the terminal, and prolongs the endurance time of the terminal battery, thereby prolonging the service life of the terminal battery.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart illustrating a first embodiment of a method for controlling the operating status of a GPS according to the present invention;
FIG. 2 is a diagram illustrating a list of preset applications provided by the present invention;
FIG. 3 is a schematic diagram of a terminal application display interface provided in the present invention
FIG. 4 is a flowchart of a second embodiment of a method for controlling the operating state of a GPS according to the present invention;
FIG. 5 is a schematic diagram of a display interface of identifiers of applications with a function of requesting location services according to the present invention;
FIG. 6 is a schematic structural diagram of a first embodiment of an apparatus for controlling the operating state of a GPS according to the present invention;
FIG. 7 is a schematic structural diagram of a second embodiment of an apparatus for controlling the operating state of a GPS according to the present invention;
FIG. 8 is a schematic structural diagram of a third embodiment of an apparatus for controlling an operating state of a GPS according to the present invention;
fig. 9 is a schematic structural diagram of a terminal provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a first embodiment of a method for controlling a GPS operating state according to the present invention, and as shown in fig. 1, the method of this embodiment may include:
step S101, detecting whether a first application program with a request positioning service authority exists in the currently running application program, wherein the request positioning service authority of the application program is obtained by acquiring an authority endowing operation input by a user;
step S102, if yes, whether a second application program requesting positioning service exists in the first application programs is detected;
step S103, if a second application program which is requesting positioning service exists in the first application programs, controlling the GPS to be in an opening state;
step S104, if the second application program which is requesting the positioning service does not exist in the first application programs, controlling the GPS to be in a closing state.
Specifically, the executing main body of this embodiment is a device for controlling the running state of the GPS, and the device for controlling the running state of the GPS is disposed in the terminal, optionally, the device for controlling the running state of the GPS may be implemented by an APP (Application) installed in the terminal, and the terminal may be a mobile phone, a tablet, or the like, in which an Android system is installed.
In this embodiment, the apparatus for controlling the GPS operating state detects whether a first application having a permission to request positioning service exists in the currently operating applications, where the permission to request positioning service of the application is obtained by obtaining a permission assignment operation input by a user.
The permission of the application program requesting the positioning service is obtained by obtaining permission giving operation input by a user, and the permission giving operation is that the user selects the application program actually needing the positioning service from the application program with the function of requesting the positioning service and stored in the terminal (permission giving operation), the permission giving operation is input to a device for controlling the running state of the GPS, and the device for controlling the running state of the GPS determines the application program with the permission of requesting the positioning service according to the permission giving operation. For example, a plurality of applications are generally installed in the terminal, and not every application needs the positioning service, but only the application that actually needs the positioning service is given the authority to request the positioning service, such as "drip express", "weather application", and other applications. Although the applications such as the "kukou video client" and the "business bank client" have the function of requesting the positioning service, the applications do not need the positioning service and do not have the authority to request the positioning service.
The implementation method for giving the application program the request of the positioning service authority can be as follows: storing a preset application program list in the terminal, wherein the preset application program list comprises an identifier of an application program with a request for positioning service authority; that is, the corresponding applications identified in the preset application list all have the authority to request the location service.
FIG. 2 is a diagram illustrating a list of preset applications provided by the present invention; fig. 3 is a schematic diagram of a terminal application display interface provided by the present invention. Referring to fig. 2 and 3, the preset application list includes identifiers of a plurality of applications, and the identifiers of the applications are consistent with icons of the applications on the terminal application display interface.
Those skilled in the art will understand that the implementation method for giving the application program the right to request the location service is not limited to the above method, and may also be: setting a set in the terminal, wherein the set comprises an identifier of an application program with a request for positioning service authority; i.e. the corresponding applications identified in the set all have the right to request location services.
If the identifier with the authority of requesting the positioning service is stored in the preset application program list, the step of detecting whether a first application program with the authority of requesting the positioning service exists in the currently running application programs comprises the following steps: and detecting whether a first application program with the authority of requesting the positioning service exists in the application programs currently running according to a preset application program list.
Specifically, the currently running applications in the present embodiment include an application running in the foreground and an application running in the background.
The device for controlling the running state of the GPS firstly obtains the identification of each application program currently running, namely obtains the icon of each application program currently running on the display interface of the terminal application program.
And then, detecting whether the obtained identifications have identifications existing in a preset application program list or not, if not, judging that the first application program with the authority of requesting positioning service does not exist in the currently running application program, and controlling the GPS to be in a closed state by the device for controlling the running state of the GPS. For example, the currently running applications include application 1, application 2, application 3, and application 4; the application program 1 is an application program running in the foreground, and the application programs 2, 3 and 4 are application programs running in the background; and the identifier of the application program 1, the identifier of the application program 2, the identifier of the application program 3 and the identifier of the application program 4 do not exist in the preset application program list, the device for controlling the running state of the GPS controls the GPS to be in a closed state. That is, even if application 1 and/or application 2 and/or application 3 and/or application 4 is requesting a positioning service, the GPS is controlled to be in the off state. Since these applications have a function of requesting a location service, the user does not need to perform the location service, and does not have a right to request the location service.
In the embodiment, when the first application program with the permission of requesting the positioning service does not exist in the currently running application programs, the GPS is controlled to be in the closed state, the running time of the GPS is effectively shortened, the power consumption of the terminal is reduced, the endurance time of a terminal battery is prolonged, and therefore the service life of the terminal battery is prolonged.
If the obtained identifiers have identifiers existing in a preset application program list, a first application program with a request positioning service authority exists in the currently running application programs.
After the device for controlling the running state of the GPS determines that the currently running application program has a first application program with the authority of requesting the positioning service, whether a second application program requesting the positioning service exists in each first application program is detected.
Specifically, if there is no second application requesting the positioning service in each first application, the device controlling the running state of the GPS controls the GPS to be in the off state. For example, the currently running applications include application 1, application 2, application 3, and application 4; the application program 1 is an application program running in the foreground, and the application programs 2, 3 and 4 are application programs running in the background; the identifier of the application 1 and the identifier of the application 3 exist in the preset application list, and neither the application 1 nor the application 3 requests the positioning service at the present time, the apparatus controlling the running state of the GPS controls the GPS to be in the off state.
If the second application program requesting the positioning service exists in the first application programs, the device for controlling the running state of the GPS controls the GPS to be in the starting state. For example, the currently running applications include application 1, application 2, application 3, and application 4; the application program 1 is an application program running in the foreground, and the application programs 2, 3 and 4 are application programs running in the background; the identifier of the application 1 and the identifier of the application 3 are stored in a preset application list, and the application 1 is requesting a positioning service at the current time, the device controlling the running state of the GPS controls the GPS to be in an on state.
In the embodiment, the GPS is controlled to be in the starting state only when the first application program with the permission of requesting the positioning service exists in the currently running application programs and the second application program requesting the positioning service exists in each first application program, so that the running time of the GPS is effectively reduced, the power consumption of the terminal is reduced, the endurance time of a terminal battery is prolonged, and the service life of the terminal battery is prolonged.
It should be understood by those skilled in the art that the foregoing steps S101 to S104 may be performed in real time, so as to update the running state of the GPS in time when a new application is started or the display interface of the current foreground running application is switched or the background running application is switched to the foreground running application. In order to further save the power consumption of the terminal, steps S101 to S104 may be triggered to be performed under the following conditions:
1. and detecting whether the application program running in the foreground is changed, wherein the detection result is yes.
It includes the following two cases:
(1) an application program is newly added in the application programs which are currently running; for example, the user newly starts the application 1 at the first time, and the newly started application becomes an application running in the foreground.
(2) Changing the application program running in the background to run in the foreground, for example, the application program running currently comprises an application program 1 and an application program 2; the application program 1 is an application program running in the foreground, the application program 2 is an application program running in the background, and at the first moment, the application program 2 is updated to be the application program running in the foreground, and the application program 1 is updated to be the application program running in the background.
2. The display interface of the application program running in the foreground is updated; for example, the 'Payment client' application program is updated to the 'search result page' display interface from the 'home page' display interface at the first moment.
It will be appreciated by those skilled in the art that the first time is the time when step S101 is triggered.
The method for controlling the running state of the GPS comprises the following steps: detecting whether a first application program with a request positioning service authority exists in application programs currently running; if yes, detecting whether a second application program requesting positioning service exists in the first application programs, wherein the positioning service requesting permission of the application program is obtained by acquiring permission giving operation input by a user; if a second application program which is requesting the positioning service exists in the first application programs, controlling the GPS to be in an opening state; and if the second application program which is requesting the positioning service does not exist in the first application programs, controlling the GPS to be in a closed state. The method for controlling the running state of the GPS effectively reduces the running time of the GPS, reduces the power consumption of the terminal, and prolongs the endurance time of the terminal battery, thereby prolonging the service life of the terminal battery.
A detailed description will be given below of one of the methods for acquiring the preset application list in the embodiment of the method shown in fig. 1, by using a specific embodiment.
Fig. 4 is a flowchart of a second embodiment of the method for controlling a GPS operating state according to the present invention, and as shown in fig. 4, the method of this embodiment may include:
step S201, inquiring an application program which is stored in the current terminal and has a function of requesting positioning service;
step S202, displaying identifiers of application programs with the function of requesting positioning service;
step S203, determining the identifier selected by the user on the display interface of the identifier of the application program with the function of requesting the positioning service as a target identifier;
and step S204, obtaining a preset application program list according to each target identifier.
Specifically, steps S201 to S204 may be performed before the method of the embodiment shown in fig. 1 is performed for the first time.
The device for controlling the running state of the GPS inquires the application programs with the function of requesting the positioning service according to the self-carried functions of the application programs stored in the terminal and displays the identification of each application program with the function of requesting the positioning service.
Fig. 5 is a schematic diagram of a display interface of identifiers of applications having a function of requesting location services according to the present invention.
Referring to fig. 5, a user selects an identifier corresponding to an application program requiring location service (as shown in fig. a) from a display interface 501 having identifiers of application programs requesting location service, and a device controlling the GPS operating state determines the identifier selected by the user as a target identifier (as shown in fig. B). Next, the device for controlling the GPS operation status obtains a preset application list 502 according to each target identifier (as shown in fig. C).
In addition, since the user may install some new applications according to the needs of the user, in order to normally operate the applications, the preset application list needs to be updated before the method of the embodiment shown in fig. 1 is executed again, specifically: before the method shown in fig. 1 needs to be executed again subsequently, the apparatus for controlling the operating state of the GPS first detects whether an application program newly installed after obtaining the preset application program list currently stored in the terminal exists in the terminal, and if so, displays a prompt message to the user, where the prompt message is used to instruct the user to input an instruction to determine to add the identifier of the newly installed application program to the preset application program list currently stored in the terminal or to input an instruction to determine not to add the identifier of the newly installed application program to the preset application program list currently stored in the terminal. For example, the prompt message may include a selection button icon of "whether the identification is added to the preset application list", an identification of the newly installed application, and "yes" and "no", and the prompt message may also include a selection button icon of "whether the identification of the newly installed application is added to the preset application list", and "yes" and "no".
And if an instruction input by a user for determining that the identifier of the newly installed application program is added to the preset application program list currently stored in the terminal is obtained, adding the identifier of the newly installed application program to the preset application program list currently stored in the terminal to obtain a new preset application program list. At this time, detecting whether a first application program with the authority of requesting location service exists in the currently running application programs includes: and detecting whether a first application program with the authority of requesting the positioning service exists in the application programs currently running according to the new preset application program list.
The new preset application list is used as the preset application list currently stored in the terminal when detecting whether a newly installed application exists in the terminal before the method of the embodiment shown in fig. 1 is executed next time.
Furthermore, as can be understood by those skilled in the art, in the application scenario of the present embodiment, the first time of the previous embodiment is a time of triggering updating of the preset application list, and step S101 in the previous embodiment is executed after the preset application list is updated.
In this embodiment, by obtaining the preset application list, the device for controlling the operating state of the GPS may detect whether the first application having the permission to request the positioning service exists in the currently operating applications according to the preset application list.
Fig. 6 is a schematic structural diagram of a first embodiment of the apparatus for controlling a GPS operating state according to the present invention, and as shown in fig. 6, the apparatus of this embodiment may include: a first detection module 11 and a control module 12; the first detection module 11 is configured to detect whether a first application program having a location service permission request exists in an application program currently running, where the location service permission request of the application program is obtained by obtaining a permission assignment operation input by a user; the first detection module 11 is further configured to detect whether a second application program requesting a location service exists in each first application program if the first application program having the permission of requesting the location service exists in the currently running application programs; the control module 12 is configured to control the GPS to be in an on state if a second application program that is requesting a positioning service exists in each first application program; and if the second application program which is requesting the positioning service does not exist in the first application programs, controlling the GPS to be in a closed state.
Before detecting whether a first application program having a permission of requesting a location service exists in the currently running application programs, the first detection module 11 is further configured to detect whether the application program running in the foreground is changed, where a detection result is yes.
Before detecting whether a first application program with a request for location service authority exists in the currently running application programs, the first detection module 11 is further configured to detect whether a display interface of the application program running in the foreground is switched, where a detection result is yes.
The first detecting module 11 is specifically configured to detect whether a first application having a request for location service authority exists in currently running applications according to a preset application list.
The apparatus of this embodiment may be configured to implement the technical solutions of the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
Fig. 7 is a schematic structural diagram of a second embodiment of the apparatus for controlling a GPS operating state according to the present invention, as shown in fig. 7, the apparatus of this embodiment may further include, on the basis of the apparatus structure shown in fig. 6: a query module 13, a display module 14, a determination module 15 and a list generation module 16.
The query module 13 is configured to query an application program having a function of requesting location services, which is stored in the current terminal; a display module 14, configured to display an identifier of each application having a function of requesting location services; the determining module 15 is configured to determine, as a target identifier, an identifier selected by a user in a display interface of an identifier of an application program having a function of requesting a location service; and a list generating module 16, configured to generate a preset application list according to each target identifier.
The apparatus of this embodiment may be configured to implement the technical solutions of the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of a third embodiment of the apparatus for controlling a GPS operating state according to the present invention, as shown in fig. 8, the apparatus of this embodiment may further include, on the basis of the apparatus structure shown in fig. 7: a second detection module 17.
And the second detection module 17 is configured to detect whether an application program newly installed after obtaining the preset application program list currently stored in the terminal exists in the terminal. The display module 14 is further configured to display a prompt message if an application program newly installed after obtaining the preset application program list currently stored in the terminal exists in the terminal, where the prompt message is used to instruct a user to input an instruction for determining to add an identifier of the newly installed application program to the preset application program list currently stored in the terminal or input an instruction for determining not to add the identifier of the newly installed application program to the preset application program list currently stored in the terminal; the list generating module 16 is further configured to, if an instruction input by the user to determine to add the identifier of the newly installed application to the preset application list currently stored in the terminal is obtained, add the identifier of the newly installed application to the preset application list currently stored in the terminal to obtain a new preset application list.
The apparatus of this embodiment may be configured to implement the technical solutions of the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
Fig. 9 is a schematic structural diagram of a terminal provided in the present invention, and as shown in fig. 9, the terminal 21 of this embodiment includes: the apparatus 22 for controlling the GPS operation state of fig. 6, 7 or 8.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, the computer is caused to execute a method corresponding to the method embodiment of the present invention.
The invention also provides a program product comprising a computer program, the computer program being stored in a readable storage medium. The computer program is used for implementing the corresponding method of the method embodiment of the invention.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (8)
1. A method for controlling an operation state of a GPS, the method being used for a terminal, comprising:
when the display interface of the application program running in the foreground is switched or the application program running in the background is changed into an application program which is newly added in the application program running in the foreground or running in the foreground, detecting whether a first application program with a request positioning service authority exists in the application programs running at present; wherein, the request positioning service authority of the application program is obtained by acquiring authority given operation input by a user;
if not, controlling the GPS to be in a closing state;
if yes, detecting whether a second application program requesting the positioning service exists in the first application programs;
if a second application program which is requesting the positioning service exists in the first application programs, controlling the GPS to be in an opening state; or if the second application program requesting the positioning service does not exist in the first application programs, controlling the GPS to be in a closed state.
2. The method according to claim 1, characterized in that a preset application program list is stored in the terminal, and the preset application program list comprises an identifier of an application program having a request for location service authority;
the detecting whether a first application program with the authority of requesting the positioning service exists in the currently running application programs comprises the following steps:
and detecting whether a first application program with the authority of requesting the positioning service exists in the application programs currently running according to the preset application program list.
3. The method of claim 2, before detecting whether the first application having the authority to request the location service exists in the currently running applications according to the preset application list, the method further comprises:
inquiring an application program which is stored in the terminal and has a function of requesting location service;
displaying the identification of each application program with the function of requesting the positioning service;
determining the mark selected by the user in the display interface of the mark as a target mark;
and generating the preset application program list according to each target identifier.
4. The method of claim 3, before detecting whether the first application having the authority to request the location service exists in the currently running applications according to the preset application list, the method further comprises:
detecting whether an application program newly installed after a preset application program list currently stored in the terminal exists in the terminal;
if so, displaying prompt information, wherein the prompt information is used for instructing a user to input an instruction for determining that the identifier of the newly installed application program is added to the preset application program list currently stored in the terminal or an instruction for instructing the user to input an instruction for determining that the identifier of the newly installed application program is not added to the preset application program list currently stored in the terminal;
if an instruction input by a user and used for determining that the identification of the newly installed application program is added to a preset application program list currently stored in the terminal is obtained, adding the identification of the newly installed application program to the preset application program list currently stored in the terminal to obtain a new preset application program list;
according to the preset application program list, the step of detecting whether a first application program with a request positioning service authority exists in the currently running application programs comprises the following steps:
and detecting whether a first application program with the permission of requesting the positioning service exists in the application programs currently running according to the new preset application program list.
5. An apparatus for controlling an operation state of a GPS for a terminal, comprising:
the first detection module is used for detecting whether a first application program with a request positioning service authority exists in the currently running application programs or not when the display interface of the foreground running application program is switched or the background running application program is changed into a new application program which runs in the foreground or is added in the foreground running application program; the request positioning service authority of the application program is obtained by acquiring authority given operation input by a user;
the first detection module is further configured to detect whether a second application program requesting a location service exists in each first application program if the first application program having the permission of requesting the location service exists in the currently running application programs;
the control module is used for controlling the GPS to be in an opening state if a second application program which is requesting the positioning service exists in each first application program; or if the second application program which is requesting the positioning service does not exist in the first application programs, controlling the GPS to be in a closing state;
the control module is further configured to control the GPS to be in an off state if the first application having the permission to request the positioning service does not exist in the currently running application.
6. The apparatus of claim 5, further comprising:
the query module is used for querying the application program which is stored in the terminal and has the function of requesting the positioning service;
the display module is used for displaying the identification of each application program with the function of requesting the positioning service;
the determining module is used for determining the identifier selected by the user in the display interface of the identifier as a target identifier;
and the list generating module is used for generating a preset application program list according to each target identifier.
7. A terminal comprising the apparatus for controlling the operational state of GPS according to claim 5 or 6.
8. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710465825.4A CN107317923B (en) | 2017-06-19 | 2017-06-19 | Method, device and terminal for controlling GPS running state |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710465825.4A CN107317923B (en) | 2017-06-19 | 2017-06-19 | Method, device and terminal for controlling GPS running state |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107317923A CN107317923A (en) | 2017-11-03 |
CN107317923B true CN107317923B (en) | 2021-06-01 |
Family
ID=60181906
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710465825.4A Active CN107317923B (en) | 2017-06-19 | 2017-06-19 | Method, device and terminal for controlling GPS running state |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107317923B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109246605A (en) * | 2018-10-12 | 2019-01-18 | 连尚(新昌)网络科技有限公司 | Using method, electronic equipment and the medium for obtaining geographical location information in terminal |
CN112181126A (en) * | 2020-09-28 | 2021-01-05 | 珠海格力电器股份有限公司 | Navigation application program detection method and device, computer equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101902765A (en) * | 2010-03-29 | 2010-12-01 | 北京冠图创新信息技术有限公司 | Method and system for controlling working of mobile station GPS |
CN105553963A (en) * | 2015-12-10 | 2016-05-04 | 小米科技有限责任公司 | Control method and device of positioning services |
CN105550204A (en) * | 2015-12-01 | 2016-05-04 | 小米科技有限责任公司 | Method and device for controlling position locating module |
US9386042B1 (en) * | 2014-10-08 | 2016-07-05 | Vce Company, Llc | Methods, systems, and computer readable mediums for utilizing geographical location information to manage applications in a computer network system |
CN105933521A (en) * | 2016-04-22 | 2016-09-07 | 广东小天才科技有限公司 | Method and device for selecting positioning mode by mobile terminal |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8972760B1 (en) * | 2013-12-20 | 2015-03-03 | Futurewei Technologies, Inc. | Method and apparatus for reducing power consumption in a mobile electronic device using a second launcher |
CN105208642B (en) * | 2015-10-10 | 2018-08-21 | 魅族科技(中国)有限公司 | A kind of method and terminal of application management |
CN105960004B (en) * | 2016-06-30 | 2020-04-07 | 宇龙计算机通信科技(深圳)有限公司 | Mobile terminal positioning function control method and mobile terminal |
CN106850978B (en) * | 2017-01-19 | 2020-08-28 | 北京安云世纪科技有限公司 | Application program control method and related equipment |
CN106713662B (en) * | 2017-01-23 | 2020-03-24 | 北京安云世纪科技有限公司 | Method and device for optimizing performance of positioning system and mobile terminal |
-
2017
- 2017-06-19 CN CN201710465825.4A patent/CN107317923B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101902765A (en) * | 2010-03-29 | 2010-12-01 | 北京冠图创新信息技术有限公司 | Method and system for controlling working of mobile station GPS |
US9386042B1 (en) * | 2014-10-08 | 2016-07-05 | Vce Company, Llc | Methods, systems, and computer readable mediums for utilizing geographical location information to manage applications in a computer network system |
CN105550204A (en) * | 2015-12-01 | 2016-05-04 | 小米科技有限责任公司 | Method and device for controlling position locating module |
CN105553963A (en) * | 2015-12-10 | 2016-05-04 | 小米科技有限责任公司 | Control method and device of positioning services |
CN105933521A (en) * | 2016-04-22 | 2016-09-07 | 广东小天才科技有限公司 | Method and device for selecting positioning mode by mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN107317923A (en) | 2017-11-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11416061B2 (en) | Terminal control method and apparatus, and terminal | |
EP2608500B1 (en) | Mobile terminal and controlling method thereof | |
US20170195969A1 (en) | Mobile terminal managing method and system, mobile terminal | |
KR20150011181A (en) | Method and apparatus for contriolling display of electronic device | |
CN102571940B (en) | Application program remote installation system, method, intelligent terminal, application server | |
US9575618B2 (en) | Multi-user process management | |
US20200396325A1 (en) | Application switching method and terminal | |
US11096177B2 (en) | Operation mode switching method and user equipment | |
CN107317923B (en) | Method, device and terminal for controlling GPS running state | |
CN104503828A (en) | Process management method and terminal | |
WO2018157584A1 (en) | Calling method and terminal | |
EP3486823A1 (en) | System notification service control method, apparatus, terminal device, and storage medium | |
CN110750284B (en) | Application quick starting method, terminal and computer readable storage medium | |
CN107979843B (en) | WiFi hotspot connection processing method, device and medium for terminal | |
CN108595195B (en) | Application program updating method, device, terminal and storage medium | |
US20200401467A1 (en) | Management and control method for application, terminal, and storage medium | |
US9794773B2 (en) | Mobile device management | |
CN103729113A (en) | Method and device for controlling switching of virtual navigation bars | |
CN106792955B (en) | Method and device for switching analog network and terminal equipment | |
CN105303101A (en) | Method and terminal for controlling application operation | |
CN113359499B (en) | Method and device for controlling household appliance, household appliance and readable storage medium | |
US20190324518A1 (en) | Method for operating a device having a switchable power saving mode for reducing its power consumption | |
CN115225966A (en) | Application starting method and device, terminal equipment and storage medium | |
CN110737320B (en) | Power consumption detection method and device, electronic equipment and storage medium | |
CN106575234B (en) | Program execution system and resident program startup method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |