CN105095045A - Method and system for monitoring background service of Android system - Google Patents

Method and system for monitoring background service of Android system Download PDF

Info

Publication number
CN105095045A
CN105095045A CN201510321575.8A CN201510321575A CN105095045A CN 105095045 A CN105095045 A CN 105095045A CN 201510321575 A CN201510321575 A CN 201510321575A CN 105095045 A CN105095045 A CN 105095045A
Authority
CN
China
Prior art keywords
service
background service
background
android system
remote
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.)
Pending
Application number
CN201510321575.8A
Other languages
Chinese (zh)
Inventor
罗启明
王会
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Meibeike Technology Co Ltd
Original Assignee
Shenzhen Meibeike Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Meibeike Technology Co Ltd filed Critical Shenzhen Meibeike Technology Co Ltd
Priority to CN201510321575.8A priority Critical patent/CN105095045A/en
Publication of CN105095045A publication Critical patent/CN105095045A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention belongs to the technical field of electronic information, and specifically relates to a method and a system for monitoring a background service of an Android system. The method comprises the steps of: starting the Android system; registering a remote service of the background service in the system; after the registration, judging whether the background service is closed by the system; if so, starting the background service through the remote service of the system; and if not, judging whether the background service is within a normal work range through the remote service of the system. As the remote service of the Android system is used for starting the background service and judging the functions of the background service are in the normal work range, the continuous and normal operation of the background service is guaranteed, and the system resource consumption is reduced.

Description

The background service method for supervising of android system and system thereof
Technical field
The invention belongs to electronic information technical field, be specifically related to a kind of background service method for supervising based on android system and system thereof.
Background technology
Due to the resource-constrained of android system, and the APP in android system applies and system background servicing many, and the system resource taken is also many, and system resource can be caused so in short supply.And according to android system self-characteristic, temporary close can be in other background service of non-duty and releasing resource, thus in running order background service, but other background service temporarily do not worked can be caused like this cannot normally to work to below, to such an extent as to cannot use when user uses this to write backstage.
Summary of the invention
For the deficiency that above-mentioned prior art exists, the object of this invention is to provide a kind of normal work continuously and reduce the background service method for supervising based on android system and the system thereof of system resources consumption.
Given this, the invention provides the background service method for supervising of android system, this method for supervising comprises:
Start android system;
The remote service of background service is registered in this system;
After having registered, this system judges whether this background service is closed, if be closed, then starts this background service by this system remote service; If be not closed, then judge whether this background service is within normal range of operation by this system remote service.
Preferably, describedly in this system, register being specially to call in onCreat () method in this system and registering background service remote service of the remote service of background service, its particular content is:
By this system clock function setting current time t in onCreat () method n, wherein n=0,1,2 ..., t 0for background service first time called before start time;
The time interval T that a background service receives once this system remote service call is set again by this intrasystem timing function.
Further, the time point that described background service receives this system remote service call is at every turn specially: t 1=t 0+ T, t 2=t 1+ T, t 3=t 2+ T ... t n=t n-1+ T.
Preferably, describedly judge whether background service is within normal range of operation by this system remote service and judge whether this background service is within normal range of operation specifically by the onStartCommand () method of this system remote service call background service.
Further, when background service is within normal range of operation, then normally run always; When background service is within non-normal working scope, then restart this background service.
Given this, the present invention also provides a kind of background service supervisory system based on android system using method described in technique scheme, comprises the device end based on android system and background service.
Further, the described device end based on android system comprises the service interface for registering background service remote service, and described service interface obtains described background service.
It is that the method for the invention and system adopt android system remote service to start this background service that the present invention compared with prior art has following beneficial effect, and the function of background service is judged whether it is within normal working range, if not within normal scope, the function of this service can be restarted, make it always within normal working range, never close, thus ensure normal operation.The method and system are particularly useful for the privately owned cloud aspect of family.
Accompanying drawing explanation
The process flow diagram of the background service method for supervising that Fig. 1 is android system described in one embodiment of the invention.
Fig. 2 for registering the process flow diagram of the remote service of background service in this system described in Fig. 1.
Fig. 3 judges whether background service is in the process flow diagram within normal range of operation for this system remote service described in Fig. 1.
The structured flowchart of the background service supervisory system that Fig. 4 is android system described in another embodiment of the present invention.
Reference numeral comprises:
10-is based on the device end of android system, and 101-service interface, 20-is based on the background service of android system.
Embodiment
Below in conjunction with accompanying drawing, the embodiment of the present invention is described in detail.
As shown in Figure 1, embodiments provide a kind of background service method for supervising based on android system, described background service comprises multiple background service, and this method for supervising comprises:
Start android system;
The remote service of background service is registered in this system;
After having registered, this system judges whether this background service is closed, if be closed, then starts this background service by this system remote service; If be not closed, then judge whether this background service is within normal range of operation by this system remote service.
Shown in composition graphs 2, in this system, register being specially to call in onCreat () method in this system and registering background service remote service of the remote service of background service described in the embodiment of the present invention, its particular content is:
By this system clock function setting current time t in onCreat () method n, wherein n=0,1,2 ..., t 0for background service first time called before start time;
The time interval T that a background service receives once this system remote service call is set again by this intrasystem timing function.
The time point that described background service receives this system remote service call is at every turn specially: t 1=t 0+ T, t 2=t 1+ T, t 3=t 2+ T ... t n=t n-1+ T.
Such as: by clock setting current time t that android system carries in this onCreat () method 0, and arranged by the timer of android system and receive primary system remote service second every T=10 and call.The normal operation of background service can be ensured like this, the system resource of consumption can be made again to reduce.
As shown in Figure 3, describedly in embodiments of the present invention judge whether background service is within normal range of operation by this system remote service and judge whether this background service is within normal range of operation specifically by the onStartCommand () method of this system remote service call background service.When background service is within normal range of operation, then normally run always; When background service is within non-normal working scope, then restart this background service.
By this, technical scheme described in the embodiment of the present invention is served by android system remote login compared to existing technology, and judge the work of serving whether in the middle of normal operation by service itself, make it always in the middle of normal working range if can not restart in the middle of normal operation.
As shown in Figure 4, another embodiment of the present invention provides a kind of background service supervisory system based on android system using method described in technique scheme, comprises the device end 10 based on android system and background service 20.The described device end 10 based on android system comprises the service interface 101 for registering background service 20 remote service, and described service interface 101 obtains described background service 20.
At android system registration remote service interface 101, obtain this service interface 101, the background service own to oneself judges, if the background service of itself is closed and can restarts by calling in the android system in this monitoring service system in onCreat () method, and in the onStartCommand () method that can receive, some key jobs of restarted background service are judged, and make it keep within normal range of operation always.
Above content is only preferred embodiment of the present invention, and for those of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, this description should not be construed as limitation of the present invention.

Claims (7)

  1. The background service method for supervising of 1.Android system, this method for supervising comprises:
    Start android system;
    The remote service of background service is registered in this system;
    After having registered, this system judges whether this background service is closed, if be closed, then starts this background service by this system remote service; If be not closed, then judge whether this background service is within normal range of operation by this system remote service.
  2. 2. the background service method for supervising of android system according to claim 1, it is characterized in that, describedly in this system, register being specially to call in onCreat () method in this system and registering background service remote service of the remote service of background service, its particular content is:
    By this system clock function setting current time t in onCreat () method n, wherein n=0,1,2 ..., t 0for background service first time called before start time;
    The time interval T that a background service receives once this system remote service call is set again by this intrasystem timing function.
  3. 3. the background service method for supervising of android system according to claim 2, is characterized in that, the time point that described background service receives this system remote service call is at every turn specially: t 1=t 0+ T, t 2=t 1+ T, t 3=t 2+ T ... t n=t n-1+ T.
  4. 4. the background service method for supervising of android system according to claim 1, it is characterized in that, describedly judge whether background service is within normal range of operation by this system remote service and judge whether this background service is within normal range of operation specifically by the onStartCommand () method of this system remote service call background service.
  5. 5. the background service method for supervising of android system according to claim 4, is characterized in that, when background service is within normal range of operation, then normally runs always; When background service is within non-normal working scope, then restart this background service.
  6. 6. the right to use requires a background service supervisory system for the android system of method described in any one in 1 to 5, comprises the device end based on android system and background service.
  7. 7. the background service supervisory system of android system according to claim 6, it is characterized in that, the described device end based on android system comprises the service interface for registering background service remote service, and described service interface obtains described background service.
CN201510321575.8A 2015-06-12 2015-06-12 Method and system for monitoring background service of Android system Pending CN105095045A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510321575.8A CN105095045A (en) 2015-06-12 2015-06-12 Method and system for monitoring background service of Android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510321575.8A CN105095045A (en) 2015-06-12 2015-06-12 Method and system for monitoring background service of Android system

Publications (1)

Publication Number Publication Date
CN105095045A true CN105095045A (en) 2015-11-25

Family

ID=54575541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510321575.8A Pending CN105095045A (en) 2015-06-12 2015-06-12 Method and system for monitoring background service of Android system

Country Status (1)

Country Link
CN (1) CN105095045A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108153646A (en) * 2017-12-26 2018-06-12 北京酷我科技有限公司 A kind of method of general monitoring Android front and backs
CN109857537A (en) * 2019-03-06 2019-06-07 网易传媒科技(北京)有限公司 Background service starts method, apparatus, medium and electronic equipment
CN110399179A (en) * 2019-07-29 2019-11-01 深圳市元征科技股份有限公司 Embedded device service management, system and electronic equipment and storage medium
CN110618836A (en) * 2019-09-11 2019-12-27 广东博力威科技股份有限公司 Method for regularly refreshing application software data of mobile phone by background running
CN111026450A (en) * 2019-12-11 2020-04-17 上海德拓信息技术股份有限公司 Method for continuous background operation of government affair terminal application

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102769897A (en) * 2011-05-03 2012-11-07 中兴通讯股份有限公司 Method and device for enabling mobile terminal to be in standby mode
CN103530559A (en) * 2013-09-27 2014-01-22 北京理工大学 Integrity protection system of Android system
CN103634404A (en) * 2013-12-05 2014-03-12 用友软件股份有限公司 Multi-application processing method, device and system
CN104009883A (en) * 2014-05-09 2014-08-27 烽火通信科技股份有限公司 Computer resource centralized remote real-time monitoring system and method
CN104572086A (en) * 2014-12-24 2015-04-29 惠州Tcl移动通信有限公司 Method and system for acquiring FPS (Frames Per Second) value based on Android Device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102769897A (en) * 2011-05-03 2012-11-07 中兴通讯股份有限公司 Method and device for enabling mobile terminal to be in standby mode
CN103530559A (en) * 2013-09-27 2014-01-22 北京理工大学 Integrity protection system of Android system
CN103634404A (en) * 2013-12-05 2014-03-12 用友软件股份有限公司 Multi-application processing method, device and system
CN104009883A (en) * 2014-05-09 2014-08-27 烽火通信科技股份有限公司 Computer resource centralized remote real-time monitoring system and method
CN104572086A (en) * 2014-12-24 2015-04-29 惠州Tcl移动通信有限公司 Method and system for acquiring FPS (Frames Per Second) value based on Android Device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108153646A (en) * 2017-12-26 2018-06-12 北京酷我科技有限公司 A kind of method of general monitoring Android front and backs
CN109857537A (en) * 2019-03-06 2019-06-07 网易传媒科技(北京)有限公司 Background service starts method, apparatus, medium and electronic equipment
CN110399179A (en) * 2019-07-29 2019-11-01 深圳市元征科技股份有限公司 Embedded device service management, system and electronic equipment and storage medium
CN110618836A (en) * 2019-09-11 2019-12-27 广东博力威科技股份有限公司 Method for regularly refreshing application software data of mobile phone by background running
CN111026450A (en) * 2019-12-11 2020-04-17 上海德拓信息技术股份有限公司 Method for continuous background operation of government affair terminal application

Similar Documents

Publication Publication Date Title
CN103218033B (en) A kind of method and device waking hardware device up
CN105095045A (en) Method and system for monitoring background service of Android system
CN108966322B (en) Data transmission method, base station and terminal
US9970966B2 (en) Method, device and computer storage medium for detecting power consumption of an application
CN106775965B (en) Processing method and device for timing task
EP2728471B1 (en) Method and terminal for managing application
EP3190771B1 (en) Method and device for managing instant communication application program, and mobile terminal thereof
CN105676987A (en) Method for shutting down background application of mobile terminal, device and mobile terminal
CN103176842A (en) Background process management method and mobile terminal thereof
MY190693A (en) Service execution method and device
CN105388991A (en) Timing wake-up processing system and method
PH12020500323A1 (en) Discontinuous reception method, terminal device and network device
CN101883003A (en) Mandatory running method of computer operating system
WO2015172283A1 (en) Method, device and mobile terminal for reducing power consumption
CN102238108A (en) Off-line message transmission method
CN112530056A (en) Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium
CN104023147B (en) A kind of method and system that make mobile terminal stablize dormancy
CN103294512A (en) Delay start method and system for timer
CN105138598A (en) Method and system for remotely timing task
CN105867577A (en) Terminal awakening method and terminal
CN104346563A (en) Information processing method and electronic equipment
CN106484075B (en) Method and device for adjusting application program wake-up time
CN107231386B (en) Application state conversion method and device and mobile terminal
WO2020113929A1 (en) Page skip control method and device
CN103260224A (en) Mobile terminal and method for achieving refreshing of charging animation during charging

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20151125

WD01 Invention patent application deemed withdrawn after publication