CN109857537A - Background service starts method, apparatus, medium and electronic equipment - Google Patents

Background service starts method, apparatus, medium and electronic equipment Download PDF

Info

Publication number
CN109857537A
CN109857537A CN201910167279.5A CN201910167279A CN109857537A CN 109857537 A CN109857537 A CN 109857537A CN 201910167279 A CN201910167279 A CN 201910167279A CN 109857537 A CN109857537 A CN 109857537A
Authority
CN
China
Prior art keywords
page assembly
background service
behalf
application program
page
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.)
Granted
Application number
CN201910167279.5A
Other languages
Chinese (zh)
Other versions
CN109857537B (en
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.)
Netease Media Technology Beijing Co Ltd
Original Assignee
Netease Media Technology Beijing 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 Netease Media Technology Beijing Co Ltd filed Critical Netease Media Technology Beijing Co Ltd
Priority to CN201910167279.5A priority Critical patent/CN109857537B/en
Publication of CN109857537A publication Critical patent/CN109857537A/en
Application granted granted Critical
Publication of CN109857537B publication Critical patent/CN109857537B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment provides a kind of background service starting method, apparatus, medium and electronic equipments, are related to field of computer technology.This method comprises: obtaining the application program needs target background service to be started when listening to application program and being switched to running background;The page assembly for starting a non-dominant display, which is used as, acts on behalf of page assembly, and the target background service and the page assembly of acting on behalf of are bound;Start the target background service by the page assembly of acting on behalf of.The technical solution of the embodiment of the present invention can guarantee to be not prohibited by corresponding background service when application program is switched to running background, improve the compatibility of application program respective operations system, promote the usage experience of user.

Description

Background service starts method, apparatus, medium and electronic equipment
Technical field
The embodiment of the present invention is related to field of computer technology, more specifically, the embodiment of the present invention is related to background service Starting method, background service starter, computer readable storage medium and electronic equipment.
Background technique
This part intends to provides background or context for the embodiment of the present invention stated in claims.Retouching herein It states and recognizes it is the prior art not because not being included in this section.
With the development of science and technology, operation of Android (Android) operating system because of its powerful function and simplicity More and more welcomed by the people, the version of Android operation system is also constantly updated with the progress of science and technology.Android behaviour Make to be needed in systematic difference program development using background service (Service), background service is as a kind of running background but does not have The service that interactive interface is shown is that application program operation is indispensable, such as application program is handled by background service Logic calculation provides data support of UI etc..
In 8.0 version of Android (Android) operating system issued at present, system forbids application program to be switched to backstage Start background service when operation.
Summary of the invention
But the application program developed at present requires greatly starting background service, Er Qieyong when switching to running background Also it is accustomed to switching over application program into use between foreground and backstage in family.
Therefore 8.0 version of Android operation system and the above version of publication leads to many application program adaptation Android operations After 8.0 version of system, when being switched to running background, background service can not start or directly generate application crash Problem reduces the usage experience of user.
Thus, it is also very desirable to a kind of improved background service starting method, so that adaptation 8.0 version of Android operation system And the application program of the above version can start background service when being switched to running background.
In the present context, the embodiment of the present invention is intended to provide a kind of background service starting method, background service starting Device, computer readable storage medium and electronic equipment.
In the first aspect of the embodiment of the present invention, a kind of background service starting method is provided, comprising: answer listening to When being switched to running background with program, obtaining the application program needs target background service to be started;It is non-dominant to start one The page assembly of display, which is used as, acts on behalf of page assembly, and the target background service and the page assembly of acting on behalf of are bound;It is logical It crosses the page assembly of acting on behalf of and starts the target background service.
In some embodiments of the invention, aforementioned schemes are based on, are switched to running background listening to application program When, it obtains before the application program needs target background service to be started further include: obtain the page group of the application program The corresponding status information of part, to record the current state of the page assembly according to the state information;By the status information It is saved in target storage domain.
In some embodiments of the invention, aforementioned schemes are based on, the method also includes: listening to application program quilt When switching to front stage operation, the corresponding status information of page assembly of the application program is obtained;It is opened based on the status information The page assembly is moved, to act on behalf of page assembly by the way that page assembly replacement is described;Start institute by the page assembly State target background service.
In some embodiments of the invention, aforementioned schemes are based on, start the page assembly of a non-dominant display as generation Managing page assembly includes: to determine the theme for acting on behalf of page assembly by preset rules;According to the page assembly acted on behalf of Theme creation is described to act on behalf of page assembly.
In some embodiments of the invention, aforementioned schemes are based on, is determined by preset rules and described acts on behalf of page assembly Theme include: will the background that act on behalf of page assembly, title bar, navigation bar and taskbar icon carry out transparence at Reason.
In some embodiments of the invention, aforementioned schemes are based on, described determine by preset rules described acts on behalf of the page The theme of component further include: the page assembly of acting on behalf of is hidden processing, so that terminal device does not record agency's page The corresponding status information of face component.
In some embodiments of the invention, aforementioned schemes are based on, and by the target background service and agency's page Face component binding includes: the identification information for obtaining the target background service;Wherein, after the identification information includes the target The sign-on ID and version information of platform service;Based on the identification information, by the target background service and agency's page Face component is bound.
In the second aspect of the embodiment of the present invention, a kind of background service starter is provided, comprising: background service obtains Unit is taken, needs target to be started for when listening to application program and being switched to running background, obtaining the application program Background service;Background service binding unit, the page assembly for starting a non-dominant display, which is used as, acts on behalf of page assembly, and will The target background service and the page assembly of acting on behalf of are bound;Background service start unit, for acting on behalf of the page by described Component starts the target background service.
In some embodiments of the invention, aforementioned schemes are based on, background service acquiring unit is configured as: described in acquisition The corresponding status information of the page assembly of application program, to record the current shape of the page assembly according to the state information State;The status information is saved in target storage domain.
In some embodiments of the invention, aforementioned schemes are based on, background service starter further includes that page assembly is extensive Multiple unit, page assembly recovery unit are configured as: when listening to application program and being switched to front stage operation, being answered described in acquisition With the corresponding status information of the page assembly of program;Start the page assembly based on the status information, to pass through the page Component replacement in face is described to act on behalf of page assembly;Start the target background service by the page assembly.
In some embodiments of the invention, aforementioned schemes are based on, background service binding unit includes: that theme determines list Member, for determining the theme for acting on behalf of page assembly by preset rules;Page assembly creating unit is acted on behalf of, for according to institute It states and acts on behalf of the theme creation of page assembly and described act on behalf of page assembly.
In some embodiments of the invention, aforementioned schemes are based on, theme determination unit is configured as: by agency's page Background, title bar, navigation bar and the taskbar icon of face component carry out transparency process.
In some embodiments of the invention, aforementioned schemes are based on, theme determination unit is configured as: by agency's page Face component is hidden processing, so that terminal device does not record and described acts on behalf of the corresponding status information of page assembly.
In some embodiments of the invention, aforementioned schemes are based on, background service binding unit is configured as: described in acquisition The identification information of target background service;Wherein, the identification information includes the sign-on ID and version of the target background service This information;Based on the identification information, the target background service and the page assembly of acting on behalf of are bound.
In the third aspect of the embodiment of the present invention, a kind of computer readable storage medium is provided, is stored thereon with meter Calculation machine program realizes the background service starting side as described in above-mentioned first aspect when the computer program is executed by processor Method.
In the fourth aspect of the embodiment of the present invention, a kind of electronic equipment is provided, comprising: processor;And memory, It is stored with computer-readable instruction on the memory, is realized when the computer-readable instruction is executed by the processor as above State the starting method of background service described in first aspect.
Technical solution according to an embodiment of the present invention, on the one hand, page assembly alternate application program is acted on behalf of by starting one Page assembly before being switched to running background starts background service, and application program can be made to be switched to running background Shi Qidong background service, avoids the problem that application crash;On the other hand, pass through the page assembly of one non-dominant display of starting As acting on behalf of page assembly, and page assembly starting background service is acted on behalf of according to this, application program starting at backstage can be made The normal use for servicing and not influencing user, improves the usage experience of user.
Detailed description of the invention
The following detailed description is read with reference to the accompanying drawings, the above-mentioned and other purposes of exemplary embodiment of the present, Feature and advantage will become prone to understand.In the accompanying drawings, it shows by way of example rather than limitation of the invention several Embodiment, in which:
Fig. 1 diagrammatically illustrates the schematic block diagram of exemplary application scene according to some embodiments of the present invention;
Fig. 2 schematically shows the process signals of background service starting method according to some embodiments of the present invention Figure;
Fig. 3 schematically shows the flow diagram of the starting of background service according to some embodiments of the present invention;
Fig. 4 schematically shows the processes that application program according to some embodiments of the present invention switches to front stage operation Schematic diagram;
Fig. 5 schematically shows the process signal that page assembly is acted on behalf of in setting according to some embodiments of the present invention Figure;
Fig. 6 schematically shows the schematic block diagram of background service starter according to some embodiments of the present invention;
Fig. 7 schematically shows the schematic diagram of storage medium according to example embodiment of the present invention;And
Fig. 8 schematically shows the block diagram of the electronic equipment of the example embodiment according to invention.
In the accompanying drawings, identical or corresponding label indicates identical or corresponding part.
Specific embodiment
The principle and spirit of the invention are described below with reference to several exemplary embodiments.It should be appreciated that providing these Embodiment is used for the purpose of making those skilled in the art can better understand that realizing the present invention in turn, and be not in any way It limits the scope of the invention.On the contrary, thesing embodiments are provided so that the disclosure is more thorough and complete, and can be by this Scope of disclosure is completely communicated to those skilled in the art.
One skilled in the art will appreciate that the embodiment of the present invention can be implemented as a kind of system, device, equipment, method or Computer program product.Therefore, the present disclosure may be embodied in the following forms, it may be assumed that complete hardware, complete software (packet Include firmware, resident software, microcode etc.) or hardware and software combine form.
According to an embodiment of the invention, proposing a kind of background service starting method, background service starter, computer Readable storage medium storing program for executing and electronic equipment.
Herein, it is to be understood that related term page assembly (Activity component) refers to mobile phone operation The load at foreground UI (User Interface, user interface interaction) interface in system, such as Android (Android) operating system Body.System background service (Service) refers to service in terminal device running background, can not interacting, passes through page assembly It could start.In addition, any number of elements in attached drawing is used to example rather than limitation and any name are only used for area Point, without any restrictions meaning.
Below with reference to several representative embodiments of the invention, the principle and spirit of the present invention are explained in detail.
Summary of the invention
The inventors discovered that system is forbidden using journey in 8.0 version of Android (Android) operating system issued at present Sequence starts background service when being switched to running background, after leading to many application program adaptation 8.0 versions of Android operation system, Background service can not start or directly lead to the problem of application crash when being switched to running background, reduce user's Usage experience.
Based on above content, basic thought of the invention is, when listening to application program and being switched to running background, Obtaining application program needs target background service to be started, and the page assembly for then starting a non-dominant display, which is used as, acts on behalf of the page Component, and by target background service and page assembly binding is acted on behalf of, to start target background service by acting on behalf of page assembly.It is logical The page assembly for crossing non-dominant display starts the target background service of application program as page assembly is acted on behalf of, and can not only make Application program starts background service when being switched to running background, avoids the problem that application crash;And it is non-dominant aobvious That shows acts on behalf of page assembly application program can be made to start service at backstage and do not influence the normal use of user, improves user Usage experience.
After introduced the basic principles of the present invention, lower mask body introduces various non-limiting embodiments of the invention.
Application scenarios overview
The schematic block of exemplary application scene according to some embodiments of the present invention is shown referring initially to Fig. 1, Fig. 1 Figure.As shown in Figure 1, the background service activation system may include: to act on behalf of page assembly generation unit 110 and background service opens Moving cell 120.Wherein, page assembly generation unit 110 is acted on behalf of for when listening to application program and being switched to running background, The page assembly for starting a non-dominant display, which is used as, acts on behalf of page assembly;Background service start unit 120 is used for according to acting on behalf of page What face component generation element 110 generated acts on behalf of the corresponding background service of page assembly binding application program, and by acting on behalf of the page Component starts background service.
It should be understood that application scenarios shown in FIG. 1 are only that the embodiment of the present invention can be wherein achieved One example, the scope of application of the embodiment of the present invention are not limited by any aspect of the application scenarios.
Illustrative methods
Below with reference to the application scenarios of Fig. 1, it is described with reference to Figure 2 background service according to an exemplary embodiment of the present invention and opens Dynamic method.It should be noted which is shown only for the purpose of facilitating an understanding of the spirit and principles of the present invention for above-mentioned application scenarios, this hair Bright embodiment is unrestricted in this regard.On the contrary, the embodiment of the present invention can be applied to applicable any scene.
Fig. 2 schematically shows the process signals of background service starting method according to some embodiments of the present invention Figure.
Referring to shown in Fig. 2, in step S210, when listening to application program and being switched to running background, application is obtained Program needs target background service to be started.
In the exemplary embodiment, target background service (Service) can refer to that application program is being cut in Android system Backstage is shifted to, background service required for operation application program, such as target background service is maintained to can be network connection service, It is also possible to data and calculates service, certainly, target background service is also possible to other background services, such as target background service is also It can be audio service, the present invention does not do particular determination to this.System when listening to application program and being switched to running background, The correlation module of the application program is detected to determine target background service that application program is needed in running background, and Obtaining determining application program needs target background service to be started.
In step S220, the page assembly of one non-dominant display of starting, which is used as, acts on behalf of page assembly, and from the background by target Service and act on behalf of page assembly binding.
In the exemplary embodiment, page assembly (Activity) can refer to an application component, provide a screen Curtain is so that user can be interacted by page assembly and application program (it is also assumed that being foreground UI in Android operation system The carrier at interface), background service needs page assembly just to can star.Acting on behalf of page assembly (acting on behalf of Activity) can refer to The page assembly of identical as parent page assembly function but not dominant display.Non- dominant display can refer to be acted on behalf of by setting The theme of page assembly, make to act on behalf of the correlation module region of page assembly not display interface (such as screen of terminal device) into Row is presented, such as the background of page assembly is acted on behalf of in setting or title bar is transparent.Page assembly is acted on behalf of in system starting one, and will Target background service is bound with page assembly is acted on behalf of so as to act on behalf of page assembly replacement page assembly.
Specifically, system obtain target background service identification information, and by identification information by target background service with Page assembly is acted on behalf of to be bound.Identification information can be the sign-on ID and version information of feeling the pulse with the finger-tip mark background service, pass through Identification information binds target background service with page assembly is acted on behalf of, and can be avoided since there are same services (such as two The network connection service title and operating path on a application program backstage are identical, but sign-on ID and version information It is different) the problem of causing application crash, the success rate of starting target background service is improved, promote user uses body It tests.
In step S230, start target background service by acting on behalf of page assembly.
In the exemplary embodiment, system passes through the generation of starting when detecting that application program has been switched to running background Manage the background service of page assembly substitution page assembly starting application program.Page assembly is acted on behalf of at this time in front stage operation, the page Component system after saving status information can be marked as Stopped state (if a page assembly Activity It is completely covered by other Activity, is called halted state Stopped.The Activity still keep institute it is stateful and at Member's information, but it is no longer visible, and its window is hidden).
The technical solution of example embodiment according to fig. 2, on the one hand, page assembly alternate application program is acted on behalf of by starting one Page assembly before being switched to running background starts background service, and application program can be made to be switched to running background Shi Qidong background service, avoids the problem that application crash;On the other hand, pass through the page assembly of one non-dominant display of starting As acting on behalf of page assembly, and page assembly starting background service is acted on behalf of according to this, application program starting at backstage can be made The normal use for servicing and not influencing user, improves the usage experience of user.
Fig. 3 schematically shows the flow diagram of the starting of background service according to some embodiments of the present invention.
Refering to what is shown in Fig. 3, step S310, since 8.0 version of Android system and the above version forbid application program on backstage Start target background service when operation, therefore when system listens to application program and is switched to running background, starting one is non-aobvious What property was shown acts on behalf of page assembly;
Step S320 will bind with target background service in the page assembly of acting on behalf of of front stage operation, and pass through agency Page assembly starts target background service.
Fig. 4 schematically shows the processes that application program according to some embodiments of the present invention switches to front stage operation Schematic diagram.
Refering to what is shown in Fig. 4, in step S410, when listening to application program and being switched to front stage operation, application is obtained The corresponding status information of the page assembly of program.
In the exemplary embodiment, before status information can refer to that application program is switched to running background, user and application The associated information of the current state that the page assembly of program interacts, such as status information can be the associated system of page assembly One Resource Locator (Uniform Resource Locator, URL), is also possible to the UI (User of current page component Interface, user interface interaction) related informations, the present invention such as status information do not do particular determination to this.
Specifically, system is when listening to application program and being switched to running background, it is also necessary to obtain the page of application program Component corresponding status information in face to record the current state of page assembly according to status information, and status information is saved in Target storage domain.Target storage domain can refer to that the storage unit of the corresponding terminal device of application program, such as target are deposited Storage area domain can be the RAM (Random Access Memory, random access memory) of terminal device.Certainly, target stores Region is also possible to other storage units, such as target storage domain can also be flash memory (Flash Memory), this Particular determination is not done in invention to this.
In the step s 420, page assembly is started based on status information, to act on behalf of page assembly by page assembly replacement.
In the exemplary embodiment, when listening to application program and being switched to front stage operation, system can be according to acquisition The corresponding page assembly of the corresponding status information starting of the page assembly of application program, such as system are associated by page assembly UI (the User of uniform resource locator (Uniform Resource Locator, URL) or current page component Interface, user interface interaction) (i.e. recovery page assembly is in application program quilt for the status informations starting such as information page assembly Switch to corresponding state when running background), and page assembly is acted on behalf of according to the replacement of the page assembly of starting, i.e., start at this time For page assembly in front stage operation, acting on behalf of page assembly can be that Killed state (terminates process, i.e., will act on behalf of by system marks Activity is deleted in the corresponding memory of terminal device).
In step S430, target background service is started by page assembly.
In the exemplary embodiment, system is bound by the page assembly started with target background service, and passes through page Face component starts target background service, so that state when application recovery is switched to running background.Similarly, system obtains The corresponding identification information of target background service is taken, and is bound page assembly and target background service according to identification information, And target background service is started by page assembly.
Fig. 5 schematically shows the process signal that page assembly is acted on behalf of in setting according to some embodiments of the present invention Figure.
Refering to what is shown in Fig. 5, determining the theme for acting on behalf of page assembly by preset rules in step S510.
In the exemplary embodiment, preset rules can refer to the function that developer needs to realize according to page assembly is acted on behalf of And preset setting condition, such as preset rules can be the related setting condition for making to act on behalf of page assembly display transparence, It can be the setting condition of record user's operation track, the present invention not affected particular determination to this.Theme can refer to Android work The appearance of modules and one group of attribute set of format such as view and the window of page assembly are specified in journey, such as act on behalf of page group The theme of part can specify the attributes such as the font size for acting on behalf of page assembly, background color.
Specifically, by setting act on behalf of the theme of page assembly will act on behalf of the background of page assembly, title bar, navigation bar with And the attribute informations such as taskbar icon carry out fully transparentization processing.For example, the specific implementation in Android engineering can be with table It is existing are as follows:
<style name=" theme_transparent ">
<item name="android:windowIsTranslucent">true</item>(setting page assembly Window is transparent)
<item name="android:windowBackground">@null</item>(the back of setting page assembly Scape is transparent)
<itemname="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="windowActionBar">false</item>(setting page assembly navigation bar be It is bright)
<item name="windowNoTitle">true</item>(title bar of setting page assembly is transparent)
</style>
Further, page assembly will be acted on behalf of and is hidden processing, so that terminal device, which does not record, acts on behalf of page assembly pair The status information answered.Hiding processing can be the state for referring to that setting theme makes Android system not record page assembly in Android engineering (here it is also assumed that being user's history operation trace, i.e., user carries out not returning to agency when returning to operation information The corresponding UI of Activity, and it is to return to the corresponding UI of Activity that application program is switched to before running background).Citing For, the specific implementation in Android engineering can show themselves in that
<activity
Android:name=" com.netease.***.ServiceProxyActivity "
Android:theme="@style/biz_transparent "
Android:launchMode=" singleInstance "
Android:excludeFromRecents=" true "/>
It should be noted that the program code in Android engineering shown in this example embodiment is only schematically to say It is bright, it does not cope with the disclosure and causes any restrictions.
In step S520, page assembly is acted on behalf of according to the theme creation for acting on behalf of page assembly is described.
In the exemplary embodiment, system determines the theme for acting on behalf of page assembly according to preset rules, and by acting on behalf of the page Page assembly is acted on behalf of in the theme creation of component, so as to act on behalf of, page assembly is non-dominant to be shown in foreground.
It should be noted that although describing each step of method in the present invention in the accompanying drawings with particular order, This does not require that or implies must execute these steps in this particular order, or have to carry out step shown in whole Just it is able to achieve desired result.Additional or alternative, it is convenient to omit multiple steps are merged into a step and held by certain steps Row, and/or a step is decomposed into execution of multiple steps etc..
Exemplary means
After describing the method for exemplary embodiment of the present, next, with reference to Fig. 6 to the exemplary implementation of the present invention The background service starter of example.
In Fig. 6, background service starter 600 may include: background service acquiring unit 610, background service binding Unit 620 and background service start unit 630.Wherein: background service acquiring unit 610 is for listening to application program quilt When switching to running background, obtaining the application program needs target background service to be started;Background service binding unit 620 is used In starting the page assembly of a non-dominant display as acting on behalf of page assembly, and by the target background service and agency's page Face component binding;Background service start unit 630 is used to start the target background service by the page assembly of acting on behalf of.
In some embodiments of the invention, aforementioned schemes are based on, background service acquiring unit 610 is configured as: obtained The corresponding status information of the page assembly of the application program, to record the current of the page assembly according to the state information State;The status information is saved in target storage domain.
In some embodiments of the invention, aforementioned schemes are based on, background service starter 600 further includes page assembly Recovery unit, page assembly recovery unit are configured as: when listening to application program and being switched to front stage operation, described in acquisition The corresponding status information of the page assembly of application program;Start the page assembly based on the status information, by described Page assembly replacement is described to act on behalf of page assembly;Start the target background service by the page assembly.
In some embodiments of the invention, aforementioned schemes are based on, background service binding unit 620 includes: that theme determines Unit, for determining the theme for acting on behalf of page assembly by preset rules;Page assembly creating unit is acted on behalf of, basis is used for The theme creation for acting on behalf of page assembly is described to act on behalf of page assembly.
In some embodiments of the invention, aforementioned schemes are based on, theme determination unit is configured as: by agency's page Background, title bar, navigation bar and the taskbar icon of face component carry out transparency process.
In some embodiments of the invention, aforementioned schemes are based on, theme determination unit is configured as: by agency's page Face component is hidden processing, so that terminal device does not record and described acts on behalf of the corresponding status information of page assembly.
In some embodiments of the invention, aforementioned schemes are based on, background service binding unit 620 is configured as: obtained The identification information of the target background service;Wherein, the identification information include the sign-on ID of the target background service with And version information;Based on the identification information, the target background service and the page assembly of acting on behalf of are bound.
Exemplary media
After describing the device of exemplary embodiment of the present, next, being deposited to exemplary embodiment of the present Storage media is illustrated.
In some embodiments, various aspects of the invention are also implemented as a kind of medium, are stored thereon with program generation Code is retouched in above-mentioned " illustrative methods " part when said program code is executed by the processor of equipment for realizing this specification Step in the background service starting method for the exemplary embodiments various according to the present invention stated.
For example, step S210 as shown in Figure 2 may be implemented when executing said program code in the processor of the equipment, When listening to application program and being switched to running background, obtaining the application program needs target background service to be started;Step Rapid S220, the page assembly of one non-dominant display of starting as acting on behalf of page assembly, and by the target background service with it is described Act on behalf of page assembly binding;Step S230 starts the target background service by the page assembly of acting on behalf of.
Refering to what is shown in Fig. 7, describe embodiment according to the present invention for realizing above-mentioned background service starting method Program product 700, can be using portable compact disc read only memory (CD-ROM) and including program code, and can be at end It is run in end equipment, such as PC.However, program product of the invention is without being limited thereto.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, In carry readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetic signal, Optical signal or above-mentioned any appropriate combination.Readable signal medium can also be any readable Jie other than readable storage medium storing program for executing Matter.
The program for executing operation of the present invention can be write with any combination of one or more programming languages Code, described program design language include object oriented program language-Java, C++ etc., further include conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user It calculates and executes in equipment, partly executes on a user device, partially executing on a remote computing or completely long-range It calculates and is executed on equipment or server.In the situation for being related to remote computing device, remote computing device can be by any number of The network of class, including local area network (LAN) or wide area network (WAN), are connected to user calculating equipment.
Exemplary computer device
In background service starting method, background service starter and the storage for describing exemplary embodiment of the present After medium, next, introducing the electronic equipment of an exemplary embodiment of the present invention.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or Program product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, completely Software implementation (including firmware, microcode etc.) or hardware and software in terms of combine embodiment, may be collectively referred to as here Circuit, " module " or " system ".
In some possible embodiments, it is single that electronic equipment according to the present invention can include at least at least one processing Member and at least one storage unit.Wherein, the storage unit is stored with program code, when said program code is described When processing unit executes, so that the processing unit executes described in above-mentioned " illustrative methods " part of this specification according to this Invent the step in the data processing method of various exemplary embodiments.For example, the processing unit can be executed such as institute in Fig. 2 The step S210 shown, when listening to application program and being switched to running background, obtaining the application program needs mesh to be started Mark background service;Step S220, the page assembly of one non-dominant display of starting, which is used as, acts on behalf of page assembly, and will be after the target Platform service and the page assembly of acting on behalf of are bound;Step S230 starts target backstage clothes by the page assembly of acting on behalf of Business.
Electronic equipment 800 according to example embodiment of the present invention is described referring to Fig. 8.Electronics shown in Fig. 8 is set Standby 800 be only an example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in figure 8, electronic equipment 800 is showed in the form of universal computing device.The component of electronic equipment 800 can wrap It includes but is not limited to: at least one above-mentioned processing unit 801, at least one above-mentioned storage unit 802, the different system components of connection The bus 803 of (including storage unit 802 and processing unit 801), display unit 807.
Bus 803 includes data/address bus, control bus and address bus.
Storage unit 802 may include the readable medium of form of volatile memory, such as random access memory (RAM) 8021 and/or cache memory 8022, it can further include read-only memory (ROM) 8023.
Storage unit 802 can also include program/utility with one group of (at least one) program module 8024 8025, such program module 8024 includes but is not limited to: operating system, one or more application program, other program moulds It may include the realization of network environment in block and program data, each of these examples or certain combination.
Electronic equipment 800 can also be with one or more external equipments 804 (such as keyboard, sensing equipment, bluetooth equipment Deng) communicate, this communication can be carried out by input/output (I/O) interface 805.Also, electronic equipment 800 can also pass through Network adapter 806 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, such as Internet) communication.As shown, network adapter 806 is communicated by bus 803 with other modules of electronic equipment 800.It should Understand, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 800, including but unlimited In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number According to backup storage system etc..
It should be noted that although be referred in the above detailed description background service starter several units/modules or Subelement/module, but it is this division be only exemplary it is not enforceable.In fact, according to an embodiment of the invention, The feature and function of two or more above-described units/modules can embody in a units/modules.On conversely, The feature and function of one units/modules of text description can be to be embodied by multiple units/modules with further division.
In addition, although describing the operation of the method for the present invention in the accompanying drawings with particular order, this do not require that or Hint must execute these operations in this particular order, or have to carry out shown in whole operation be just able to achieve it is desired As a result.Additionally or alternatively, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/or by one Step is decomposed into execution of multiple steps.
Although by reference to several spirit and principle that specific examples describe the present invention, it should be appreciated that, this hair It is bright to be not limited to disclosed specific embodiment, the feature in these aspects, which cannot combine, not to be meant that yet to the division of various aspects It is benefited to carry out, it is this to divide the convenience merely to statement.The present invention is directed to cover spirit and scope of the appended claims Interior included various modifications and equivalent arrangements.

Claims (10)

1. a kind of background service starts method characterized by comprising
When listening to application program and being switched to running background, obtaining the application program needs target backstage to be started to take Business;
Start the page assembly of a non-dominant display as acting on behalf of page assembly, and by the target background service and the agency Page assembly binding;
Start the target background service by the page assembly of acting on behalf of.
2. background service according to claim 1 starts method, which is characterized in that be switched to listening to application program When running background, obtain before the application program needs target background service to be started further include:
The corresponding status information of page assembly of the application program is obtained, to record the page group according to the state information The current state of part;
The status information is saved in target storage domain.
3. background service according to claim 2 starts method, which is characterized in that the method also includes:
When listening to application program and being switched to front stage operation, the corresponding state letter of page assembly of the application program is obtained Breath;
Start the page assembly based on the status information, to act on behalf of page assembly by the way that page assembly replacement is described;
Start the target background service by the page assembly.
4. background service according to claim 1 starts method, which is characterized in that the page group of one non-dominant display of starting Part conduct acts on behalf of page assembly and includes:
The theme for acting on behalf of page assembly is determined by preset rules;
Page assembly is acted on behalf of according to the theme creation for acting on behalf of page assembly is described.
5. background service according to claim 4 starts method, which is characterized in that determine the agency by preset rules The theme of page assembly includes:
The background for acting on behalf of page assembly, title bar, navigation bar and taskbar icon are subjected to transparency process.
6. background service according to claim 4 starts method, which is characterized in that described by described in preset rules determination Act on behalf of the theme of page assembly further include:
The page assembly of acting on behalf of is hidden processing, so that terminal device does not record and described acts on behalf of the corresponding shape of page assembly State information.
7. background service according to claim 1 starts method, which is characterized in that and by the target background service and institute It states to act on behalf of page assembly and bind and includes:
Obtain the identification information of the target background service;Wherein, the identification information includes the note of the target background service Volume mark and version information;
Based on the identification information, the target background service and the page assembly of acting on behalf of are bound.
8. a kind of background service starter characterized by comprising
Background service acquiring unit, for obtaining the application program when listening to application program and being switched to running background Need target background service to be started;
Background service binding unit, the page assembly for starting a non-dominant display, which is used as, acts on behalf of page assembly, and will be described Target background service and the page assembly of acting on behalf of are bound;
Background service start unit, for starting the target background service by the page assembly of acting on behalf of.
9. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that the computer program is processed Device realizes background service starting method as claimed in any of claims 1 to 7 in one of claims when executing.
10. a kind of electronic equipment characterized by comprising
Processor;And
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is held by the processor Background service starting method as claimed in any of claims 1 to 7 in one of claims is realized when row.
CN201910167279.5A 2019-03-06 2019-03-06 Background service starting method, device, medium and electronic equipment Active CN109857537B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910167279.5A CN109857537B (en) 2019-03-06 2019-03-06 Background service starting method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910167279.5A CN109857537B (en) 2019-03-06 2019-03-06 Background service starting method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109857537A true CN109857537A (en) 2019-06-07
CN109857537B CN109857537B (en) 2021-07-09

Family

ID=66900005

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910167279.5A Active CN109857537B (en) 2019-03-06 2019-03-06 Background service starting method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109857537B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941344A (en) * 2019-12-09 2020-03-31 Oppo广东移动通信有限公司 Method for obtaining gazing point data and related device
CN112416212A (en) * 2020-11-25 2021-02-26 维沃移动通信有限公司 Program access method, device, electronic equipment and readable storage medium
CN112817654A (en) * 2021-01-26 2021-05-18 广州欢网科技有限责任公司 Method and device for restoring application software from background to foreground and controller

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914335A (en) * 2013-01-05 2014-07-09 中国移动通信集团公司 Invoking method, equipment and system for background service
CN105095045A (en) * 2015-06-12 2015-11-25 深圳市美贝壳科技有限公司 Method and system for monitoring background service of Android system
CN105138372A (en) * 2015-08-27 2015-12-09 上海斐讯数据通信技术有限公司 Backstage service management and control system and method based on Android system
CN107291336A (en) * 2017-07-13 2017-10-24 北京元心科技有限公司 Method and device for starting application programs among multiple systems and terminal equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914335A (en) * 2013-01-05 2014-07-09 中国移动通信集团公司 Invoking method, equipment and system for background service
CN105095045A (en) * 2015-06-12 2015-11-25 深圳市美贝壳科技有限公司 Method and system for monitoring background service of Android system
CN105138372A (en) * 2015-08-27 2015-12-09 上海斐讯数据通信技术有限公司 Backstage service management and control system and method based on Android system
CN107291336A (en) * 2017-07-13 2017-10-24 北京元心科技有限公司 Method and device for starting application programs among multiple systems and terminal equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
C1392851600: "Android(O)8.0怎样在后台启动service CSDN博客", 《ANDROID(O)8.0怎样在后台启动SERVICE》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941344A (en) * 2019-12-09 2020-03-31 Oppo广东移动通信有限公司 Method for obtaining gazing point data and related device
CN110941344B (en) * 2019-12-09 2022-03-15 Oppo广东移动通信有限公司 Method for obtaining gazing point data and related device
CN112416212A (en) * 2020-11-25 2021-02-26 维沃移动通信有限公司 Program access method, device, electronic equipment and readable storage medium
CN112817654A (en) * 2021-01-26 2021-05-18 广州欢网科技有限责任公司 Method and device for restoring application software from background to foreground and controller

Also Published As

Publication number Publication date
CN109857537B (en) 2021-07-09

Similar Documents

Publication Publication Date Title
US7093199B2 (en) Design environment to facilitate accessible software
US9244658B2 (en) Multi-step auto-completion model for software development environments
US11734028B2 (en) Modifying readable and focusable elements on a page during execution of automated scripts
CN106897081A (en) The bootstrap technique and device of application, terminal
CN109857537A (en) Background service starts method, apparatus, medium and electronic equipment
US20130117719A1 (en) Context-Based Adaptation for Business Applications
US20190278431A1 (en) Window control for simultaneously running applications
CN110765746B (en) Form automatic generation method and system based on event agent
CN108804158A (en) Application call method, the control method of terminal device, terminal device and computer readable storage medium
CN110532159A (en) Data decryptor method, apparatus, equipment and computer readable storage medium
US20230409816A1 (en) Document update method and apparatus, device, and medium
CN114661375A (en) Application integration method and device
CN110275741B (en) Content display method and electronic equipment
CN117742832A (en) Page guiding configuration method, page guiding method and equipment
CN111061522B (en) Method, device, equipment and storage medium for generating front-end card assembly based on back end
CN105159673A (en) Method and device for setting control style
CN110083407B (en) Method and device for realizing step bar in applet, electronic equipment and storage medium
CN115618144B (en) Dynamic layout method, system, equipment and medium based on webpage
US11126410B2 (en) Method and apparatus for building pages, apparatus and non-volatile computer storage medium
CN106197394A (en) Air navigation aid and device
US10061686B2 (en) Method, electronic apparatus, system, and storage medium for automated testing of application user interface
CN111506848A (en) Webpage processing method, device, equipment and readable storage medium
KR102158544B1 (en) Method and system for supporting spell checking within input interface of mobile device
US9477448B2 (en) Screen-oriented computing program refactoring
CN112988139A (en) Method and device for developing event processing file

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