CN108762833A - Application in Android system starts method and apparatus - Google Patents
Application in Android system starts method and apparatus Download PDFInfo
- Publication number
- CN108762833A CN108762833A CN201810469495.0A CN201810469495A CN108762833A CN 108762833 A CN108762833 A CN 108762833A CN 201810469495 A CN201810469495 A CN 201810469495A CN 108762833 A CN108762833 A CN 108762833A
- Authority
- CN
- China
- Prior art keywords
- resource file
- application
- loaded
- buffering area
- android system
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses the applications in Android system to start method and apparatus.The method includes:When application starts, judge whether the application needs to preload resource file;It is that the specified resource file of the application is loaded into the buffering area of memory;When loading the resource file of the application, judge that the data content of resource file to be loaded is that corresponding data content is directly read from the buffering area whether in the buffering area.The technical solution will be originally as independent using the resource file loading procedure serially executed in start-up course, carry out parallelization operation, it is greatly saved using the startup time, for the scene for starting application after cold start-up, i.e. intelligent terminal booting for the first time, 100 milliseconds or so of time can be saved, user can apparent aware application Acceleration of starting, while also ensuring that the content using itself has obtained completely showing.
Description
Technical field
The present invention relates to field of computer technology, and in particular to the application in Android system starts method and apparatus.
Background technology
Current many application developers make applying in startup interface, using inner boundary exhibition for its exploitation for number one
Show advertisement etc., these advertisements are packaged in as the resource file of picture/mb-type in application installation package mostly.This behavior nothing itself
It can be altogether unjustifiable, but it also brings using slow problem is started, this undoubtedly all causes negative effect to developer and user.
Invention content
In view of the above problems, it is proposed that the present invention overcoming the above problem in order to provide one kind or solves at least partly
The application stated in the Android system of problem starts method and apparatus.
One side according to the present invention provides in a kind of Android system and applies startup method, including:
When application starts, judge whether the application needs to preload resource file;
It is that the specified resource file of the application is loaded into the buffering area of memory;
When loading the resource file of the application, judge the data content of resource file to be loaded whether in the buffering
Qu Zhong is that corresponding data content is directly read from the buffering area.
Optionally, described to judge whether the application needs to preload resource file to include:
Judge whether the preloading resource file function of Android system opens.
Optionally, the buffering area that the specified resource file of the application is loaded into memory includes:
It calls Runnable interfaces to start resource file and loads thread, thread is loaded by the finger by the resource file
Determine resource file to be loaded into the buffering area of memory.
Optionally, this method further includes:
It is described apply start for the first time in Android system when, record loading sequence of the application to resource file;
It determines and records whether the application needs to preload resource file according to the loading sequence, and is answered described
The specified resource file preloaded is needed with needing the when of preloading resource file to further determine that and record the application.
Optionally, described to judge whether the application needs to preload resource file to include:
Judge whether the application records the specified resource file of load in need.
Optionally, the specified resource file includes the picture resource file of startup interface and/or the picture at first screen interface
Resource file.
Optionally, this method further includes:
Application interface is drawn according to the data content of reading.
Optionally, the method is applied to the ApplicationThread and/or ActivityThread of Android system
In.
Another aspect according to the present invention provides the application starter in a kind of Android system, including:
Control unit is preloaded, is suitable for, when application starts, judging whether the application needs to preload resource file;
Resource file pre-add carrier unit, if needing to preload resource file suitable for the application, by the finger of the application
Determine resource file to be loaded into the buffering area of memory;
Using control unit is started, it is suitable for, when loading the resource file of the application, judging the number of resource file to be loaded
According to content whether in the buffering area, it is, corresponding data content is directly read from the buffering area.
Optionally, the preloading control unit, suitable for judging whether the preloading resource file function of Android system is opened
It opens.
Optionally, the resource file pre-add carrier unit is suitable for that Runnable interfaces is called to start resource file loaded line
Journey loads thread by the resource file and the specified resource file is loaded into the buffering area of memory.
Optionally, the preloading control unit, be further adapted for it is described apply start for the first time in Android system when, record
The application determines and records whether the application needs to preload to the loading sequence of resource file according to the loading sequence
Resource file, and need the when of preloading resource file to further determine that and record the application in the application and need to preload
Specified resource file.
Optionally, the preloading control unit, suitable for judging whether the application records the specified resource of load in need
File.
Optionally, the specified resource file includes the picture resource file of startup interface and/or the picture at first screen interface
Resource file.
Optionally, the application starts control unit, is further adapted for drawing application interface according to the data content of reading.
Optionally, described device is applied to the ApplicationThread and/or ActivityThread of Android system
In.
Another aspect according to the present invention, provides a kind of intelligent terminal, wherein the intelligent terminal includes:Processor;With
And it is arranged to the memory of storage computer executable instructions, the executable instruction when executed holds the processor
Row is according to method described in any one of the above embodiments.
According to the present invention in another aspect, providing a kind of computer readable storage medium, wherein it is described computer-readable
The one or more programs of storage medium storage, one or more of programs when being executed by a processor, are realized as any of the above-described
Method described in.
It can be seen from the above, technical scheme of the present invention, by judging whether it needs to preload resource when application starts
File, if desired then in the normal start-up course of application, the loading procedure of parallel starting resource file loads specified resource
Into the buffering area of memory, in this way when application needs these specified resource files, can directly be read from the buffering area of memory
It takes.The technical solution will be originally as, progress independent using the resource file loading procedure serially executed in start-up course
Parallelization operates, and is greatly saved using the time is started, for starting application for the first time after cold start-up, i.e. intelligent terminal booting
For scene, can save 100 milliseconds or so of time, user can apparent aware application Acceleration of starting, also ensure simultaneously
It has obtained completely showing using the content of itself.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technical means of the present invention,
And can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, below the special specific implementation mode for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit are common for this field
Technical staff will become clear.Attached drawing only for the purpose of illustrating preferred embodiments, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows that the flow using startup method in a kind of Android system according to an embodiment of the invention is illustrated
Figure;
Fig. 2 shows the structural representations using starter in a kind of Android system according to an embodiment of the invention
Figure;
Fig. 3 shows the structural schematic diagram of intelligent terminal according to an embodiment of the invention;
Fig. 4 shows the structural schematic diagram of computer readable storage medium according to an embodiment of the invention.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
In Android system, the startup of application is a complicated process, in front first briefly to being related to resource file
Part illustrates.The installation kit APK of Android application is really a compressed package, and resource file is usually the lattice such as jpg, png
The picture file of formula, be stored in compressed package/res catalogues under.In the start-up course of application, need APK being loaded into memory,
Execute executable file therein, program code execution, but be not need all resource files are directly read, but
When needing to use resource file, then reads and be loaded into memory.Obviously, using can be loaded after startup start the page or it is first shield,
Resource file may can be used among these.Therefore, it just needs, according to the code logic of application, needing to use in start-up course
When to resource file, calling system executes IO read-write operations, and resource file is loaded into memory, then is used, such as into
It draws at row interface.And I/O operation is then time consuming " arch-criminal ".If simply the read operation of resource file taken
Disappear or delay, user cannot normally see corresponding contents, this has not only invaded user benefit, also invade the profit of developer
Benefit.
Inventor is designed for this, it is contemplated that and using start-up course it is a series process, it cannot fine land productivity
It is using paralell design, the loading procedure of a part of resource file is independent with the hardware resource of intelligent terminal, it realizes pre-
Load, the preloading procedure of other start-up courses and resource file for applying in this way is parallel, has saved the plenty of time.With reference to
Specific embodiment illustrates.
Fig. 1 shows that the flow using startup method in a kind of Android system according to an embodiment of the invention is illustrated
Figure.As shown in Figure 1, this method includes:
Step S110 judges whether the application needs to preload resource file when application starts.
If in fact, apply intelligent terminal booting after be activated, be only positioned at backstage, be not killed into
Journey, corresponding resource file are still also stored in core buffer, and in this case, there is no need to preload resource file
(having had the resource file loaded).Although this start-up course is not proper startup, also someone is referred to as
For thermal starting.
Step S120 is that the specified resource file of application is loaded into the buffering area of memory.
The step in, can not be and all load whole resource files of application, but for therein specified
Part, such as need in start-up course the part used.
Step S130, load the application resource file when, judge resource file to be loaded data content whether
In buffering area, it is that corresponding data content is directly read from buffering area.
It is previously noted that due to specifying the load of resource file and the other parts of application start-up course to execute parallel, the present age
Code logic is gone to when needing specified resource file, so that it may directly to read corresponding data content from buffering area, not needed
I/O read operation is executed again.
As it can be seen that method shown in FIG. 1, by judging whether it needs to preload resource file when application starts, if needing
Will be then in the normal start-up course of application, specified resource is loaded into memory by the loading procedure of parallel starting resource file
In buffering area, in this way when application needs these specified resource files, it can be directly read from the buffering area of memory.The technology
Scheme will be originally as, progress parallelization behaviour independent using the resource file loading procedure serially executed in start-up course
Make, is greatly saved using the time is started, the scene for starting application after cold start-up, i.e. intelligent terminal booting for the first time is come
Say, can save 100 milliseconds or so of time, user can apparent aware application Acceleration of starting, while also ensuring using this
The content of body has obtained completely showing.
In one embodiment of the invention, in the above method, judge whether the application needs to preload resource bundle
It includes:Judge whether the preloading resource file function of Android system opens.
In the present embodiment, it needs that a functional switch is arranged in Android system, that is to say, that remain using startup
Primary logic and modified parallelization logic, controlled by the switch.For example, in Android system
A new method is added in ApplicationThread and/or ActivityThread, for executing the parallel of resource file
Change load, then when preloading resource file function and opening, this method can be called, on the contrary it is then will not, also just further execution
Using the primary logic of startup.
Wherein, ActivityThread is a class of Android system, and the ActivityThread of instantiation is also UI lines
Journey is the main thread of application.ApplicationThread is an inner classes of ActivityThread again, these classes pass through
After instantiation, starting and running for concrete application is realized.
In an embodiment of the present invention, the modification for specifically starting logic can be above-mentioned
It is realized in ApplicationThread and/or ActivityThread, i other words method is applied to Android system
In ApplicationThread and/or ActivityThread.
In one embodiment of the invention, in the above method, the specified resource file of application is loaded into the slow of memory
Rushing area includes:It calls Runnable interfaces to start resource file and loads thread, thread is loaded by specified money by resource file
Source file is loaded into the buffering area of memory.
It is specific that one kind that the specified resource file of application is loaded into the buffering area of memory is given in the present embodiment
Implementation example, since serialisation procedure is become parallelization process, the mode for using multithreading in the present embodiment carries out reality
It is existing, more specifically, uses and call Runnable interfaces and the not form of Thread classes, due in the embodiment of the present invention
In be accomplished that one towards call object application resource file loading procedure, can be more excellent by the way of Runnable.
In one embodiment of the invention, the above method further includes:Apply start for the first time in Android system when, note
Loading sequence of the record application to resource file;Determine and record to apply whether need to preload resource file according to loading sequence,
And it needs the when of preloading resource file to further determine that in application and records using the specified resource file for needing to preload.
It addresses above, it is not absolutely required to all load the whole resource files applied in above process, at this
A kind of determining example for loading which resource file is just given in embodiment.Due to the resource file of different application loads
Difference, and with the update of application version, the resource file of load it can also happen that therefore variation applies one,
By the load of " study " its resource file, relatively accurately it can determine which resource file needed to preload.For example, answering
Started for the first time after being installed in systems with A, it, can not at this moment due to not knowing using which resource file A will load
Execute the preloading of resource file.But in this process, the loading sequence that its resource file can be recorded, in this way in next time
When starting using A, so that it may to determine which resource file loaded according to this loading sequence.
In one embodiment of the invention, in the above method, judge whether the application needs to preload resource bundle
It includes:Judge whether the application records the specified resource file of load in need.
This process is to be designed simply for certain, such as no startup interface, first screen interface do not have answering for picture etc.
With.If need not use resource file in start-up course, also there is no need to carry out the preloading of resource file.These can be with
It is determined by the information of record.
In one embodiment of the invention, in the above method, specified resource file includes the picture resource of startup interface
File and/or the picture resource file at first screen interface.
In general, the start-up course of application is just by the end of startup interface (for example, " earth " figure of certain instant messaging application
Piece is exactly startup interface) and first screen interface loaded, i.e., corresponding Activity be shown in foreground.The resource used among these
File is exactly mainly the picture resource file of startup interface and/or the picture resource file at first screen interface.
Not being due to picture resource file can directly be shown after being loaded into buffering area, it is also necessary to it is drawn, because
This in one embodiment of the invention, the above method further includes:Application interface is drawn according to the data content of reading.Among these
Texture rendering technology in interface in the prior art can be utilized, details are not described herein.
Fig. 2 shows the structural representations using starter in a kind of Android system according to an embodiment of the invention
Figure.As shown in Fig. 2, the application starter 200 in Android system includes:
Control unit 210 is preloaded, is suitable for, when application starts, judging whether the application needs to preload resource file.
If in fact, apply intelligent terminal booting after be activated, be only positioned at backstage, be not killed into
Journey, corresponding resource file are still also stored in core buffer, and in this case, there is no need to preload resource file
(having had the resource file loaded).Although this start-up course is not proper startup, also someone is referred to as
For thermal starting.
Resource file pre-add carrier unit 220, if suitable for using preloading resource file is needed, by the specified resource of application
File is loaded into the buffering area of memory;
The step in, can not be and all load whole resource files of application, but for therein specified
Part, such as need in start-up course the part used.
Using control unit 230 is started, it is suitable for, when loading the resource file of the application, judging resource file to be loaded
Whether data content is that corresponding data content is directly read from buffering area in buffering area.
It is previously noted that due to specifying the load of resource file and the other parts of application start-up course to execute parallel, the present age
Code logic is gone to when needing specified resource file, so that it may directly to read corresponding data content from buffering area, not needed
I/O read operation is executed again.
As it can be seen that device shown in Fig. 2, pre- applying the when of starting to judge whether it needs by the mutual cooperation of each unit
Resource file is loaded, if desired then in the normal start-up course of application, the loading procedure of parallel starting resource file will specify
Resource is loaded into the buffering area of memory, can be from the buffering area of memory in this way when application needs these specified resource files
In directly read.The technical solution will independently go out as using the resource file loading procedure serially executed in start-up course originally
Come, carry out parallelization operation, is greatly saved using the time is started, for being opened for the first time after cold start-up, i.e. intelligent terminal booting
For the scene of dynamic application, can save 100 milliseconds or so of time, user can apparent aware application Acceleration of starting, simultaneously
It also ensures and has obtained completely showing using the content of itself.
In one embodiment of the invention, in above-mentioned apparatus, control unit 210 is preloaded, is suitable for judging Android system
Preloading resource file function whether open.
In the present embodiment, it needs that a functional switch is arranged in Android system, that is to say, that remain using startup
Primary logic and modified parallelization logic, controlled by the switch.For example, in Android system
A new method is added in ApplicationThread and/or ActivityThread, for executing the parallel of resource file
Change load, then when preloading resource file function and opening, this method can be called, on the contrary it is then will not, also just further execution
Using the primary logic of startup.
Wherein, ActivityThread is a class of Android system, and the ActivityThread of instantiation is also UI lines
Journey is the main thread of application.ApplicationThread is an inner classes of ActivityThread again, these classes pass through
After instantiation, starting and running for concrete application is realized.
In an embodiment of the present invention, the modification for specifically starting logic can be above-mentioned
It is realized in ApplicationThread and/or ActivityThread, i other words device is applied to Android system
In ApplicationThread and/or ActivityThread.
In one embodiment of the invention, in above-mentioned apparatus, resource file pre-add carrier unit 220 is suitable for calling
Runnable interfaces start resource file and load thread, and load thread by resource file is loaded into memory by specified resource file
Buffering area in.
It is specific that one kind that the specified resource file of application is loaded into the buffering area of memory is given in the present embodiment
Implementation example, since serialisation procedure is become parallelization process, the mode for using multithreading in the present embodiment carries out reality
It is existing, more specifically, uses and call Runnable interfaces and the not form of Thread classes, due in the embodiment of the present invention
In be accomplished that one towards call object application resource file loading procedure, can be more excellent by the way of Runnable.
In one embodiment of the invention, in above-mentioned apparatus, control unit 210 is preloaded, is further adapted for pacifying applying
When starting for the first time in tall and erect system, to the loading sequence of resource file, being determined and recorded to apply according to loading sequence is for record application
It is no to need to preload resource file, and need the when of preloading resource file to further determine that in application and record pre- using needing
The specified resource file of load.
It addresses above, it is not absolutely required to all load the whole resource files applied in above process, at this
A kind of determining example for loading which resource file is just given in embodiment.Due to the resource file of different application loads
Difference, and with the update of application version, the resource file of load it can also happen that therefore variation applies one,
By the load of " study " its resource file, relatively accurately it can determine which resource file needed to preload.For example, answering
Started for the first time after being installed in systems with A, it, can not at this moment due to not knowing using which resource file A will load
Execute the preloading of resource file.But in this process, the loading sequence that its resource file can be recorded, in this way in next time
When starting using A, so that it may to determine which resource file loaded according to this loading sequence.
In one embodiment of the invention, in above-mentioned apparatus, control unit 210 is preloaded, suitable for judging that the application is
The no specified resource file for recording load in need.
This process is to be designed simply for certain, such as no startup interface, first screen interface do not have answering for picture etc.
With.If need not use resource file in start-up course, also there is no need to carry out the preloading of resource file.These can be with
It is determined by the information of record.
In one embodiment of the invention, in above-mentioned apparatus, specified resource file includes the picture resource of startup interface
File and/or the picture resource file at first screen interface.
In general, the start-up course of application is just by the end of startup interface (for example, " earth " figure of certain instant messaging application
Piece is exactly startup interface) and first screen interface loaded, i.e., corresponding Activity be shown in foreground.The resource used among these
File is exactly mainly the picture resource file of startup interface and/or the picture resource file at first screen interface.
Not being due to picture resource file can directly be shown after being loaded into buffering area, it is also necessary to it is drawn, because
This in above-mentioned apparatus, using control unit 230 is started, is further adapted for the data according to reading in one embodiment of the invention
Content draws application interface.Texture rendering technology in interface in the prior art can be utilized among these, and details are not described herein.
In conclusion technical scheme of the present invention, by judging whether it needs to preload resource text when application starts
Part, if desired then in the normal start-up course of application, specified resource is loaded by the loading procedure of parallel starting resource file
In the buffering area of memory, in this way when application needs these specified resource files, it can be directly read from the buffering area of memory.
The technical solution as applying the resource file loading procedure serially executed in start-up course independent, will carry out parallel originally
Change operation, is greatly saved using the time is started, for starting the scene of application after cold start-up, i.e. intelligent terminal booting for the first time
For, can save 100 milliseconds or so of time, user can apparent aware application Acceleration of starting, while also ensuring application
The content of itself has obtained completely showing.
It should be noted that:
Algorithm and display be not inherently related to any certain computer, virtual bench or miscellaneous equipment provided herein.
Various fexible units can also be used together with teaching based on this.As described above, it constructs required by this kind of device
Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that can utilize various
Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:It is i.e. required to protect
Shield the present invention claims the more features of feature than being expressly recited in each claim.More precisely, as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific implementation mode are expressly incorporated in the specific implementation mode, wherein each claim itself
All as a separate embodiment of the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment
Change and they are arranged in the one or more equipment different from the embodiment.It can be the module or list in embodiment
Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it may be used any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power
Profit requires, abstract and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization, or to run on one or more processors
Software module realize, or realized with combination thereof.It will be understood by those of skill in the art that can use in practice
Microprocessor or digital signal processor (DSP) start dress come the application realized in Android system according to the ... of the embodiment of the present invention
The some or all functions of some or all components in setting.The present invention is also implemented as described here for executing
Method some or all equipment or program of device (for example, computer program and computer program product).This
The program of the realization present invention of sample can may be stored on the computer-readable medium, or can be with one or more signal
Form.Such signal can be downloaded from internet website and be obtained, and either be provided on carrier signal or with any other
Form provides.
For example, Fig. 3 shows the structural schematic diagram of intelligent terminal according to an embodiment of the invention.The intelligent terminal packet
It includes processor 310 and is arranged to the memory 320 of storage computer executable instructions (computer readable program code).Storage
Device 320 can be such as flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk or ROM etc
Electronic memory.Memory 320 has computer-readable program of the storage for executing any method and step in the above method
The memory space 330 of code 331.For example, the memory space 330 for storing computer readable program code may include difference
For realizing each computer readable program code 331 of the various steps in above method.Computer readable program code
331 can read or be written to the production of this one or more computer program from one or more computer program product
In product.These computer program products include such as hard disk, and the program code of compact-disc (CD), storage card or floppy disk etc carries
Body.Such computer program product is usually the computer readable storage medium described in such as Fig. 4.Fig. 4 is shown according to this
A kind of structural schematic diagram of the computer readable storage medium of invention one embodiment.The computer readable storage medium 400 is deposited
The computer readable program code 331 for executing steps of a method in accordance with the invention is contained, it can be by the place of intelligent terminal 300
It manages device 310 to read, when computer readable program code 331 is run by intelligent terminal 300, the intelligent terminal 300 is caused to execute
Each step in method described above, specifically, the computer-readable journey of the computer-readable recording medium storage
Sequence code 331 can execute method shown in any of the above-described embodiment.Computer readable program code 331 can be with appropriate shape
Formula is compressed.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference mark between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be by the same hardware branch
To embody.The use of word first, second, and third does not indicate that any sequence.These words can be explained and be run after fame
Claim.
Embodiment of the invention discloses that a kind of application startup method in A1, Android system, including:
When application starts, judge whether the application needs to preload resource file;
It is that the specified resource file of the application is loaded into the buffering area of memory;
When loading the resource file of the application, judge the data content of resource file to be loaded whether in the buffering
Qu Zhong is that corresponding data content is directly read from the buffering area.
A2, the method as described in A1, wherein described to judge whether the application needs to preload resource file to include:
Judge whether the preloading resource file function of Android system opens.
A3, the method as described in A1, the described specified resource file of the application is loaded into the buffering area of memory are wrapped
It includes:
It calls Runnable interfaces to start resource file and loads thread, thread is loaded by the finger by the resource file
Determine resource file to be loaded into the buffering area of memory.
A4, the method as described in A1, wherein this method further includes:
It is described apply start for the first time in Android system when, record loading sequence of the application to resource file;
It determines and records whether the application needs to preload resource file according to the loading sequence, and is answered described
The specified resource file preloaded is needed with needing the when of preloading resource file to further determine that and record the application.
A5, the method as described in A4, wherein described to judge whether the application needs to preload resource file to include:
Judge whether the application records the specified resource file of load in need.
A6, the method as described in A1, wherein the specified resource file include startup interface picture resource file and/
Or the picture resource file at first screen interface.
A7, the method as described in A6, wherein this method further includes:
Application interface is drawn according to the data content of reading.
A8, the method as described in any one of A1-A7, wherein the method is applied to Android system
In ApplicationThread and/or ActivityThread.
The embodiment of the present invention also discloses the application starter in B9, a kind of Android system, including:
Control unit is preloaded, is suitable for, when application starts, judging whether the application needs to preload resource file;
Resource file pre-add carrier unit, if needing to preload resource file suitable for the application, by the finger of the application
Determine resource file to be loaded into the buffering area of memory;
Using control unit is started, it is suitable for, when loading the resource file of the application, judging the number of resource file to be loaded
According to content whether in the buffering area, it is, corresponding data content is directly read from the buffering area.
B10, the device as described in B9, wherein
The preloading control unit, suitable for judging whether the preloading resource file function of Android system opens.
B11, the device as described in B9, wherein
The resource file pre-add carrier unit is suitable for calling Runnable interfaces to start resource file and loads thread, passes through
The specified resource file is loaded into the buffering area of memory by the resource file load thread.
B12, the device as described in B9, wherein
The preloading control unit, be further adapted for it is described apply start for the first time in Android system when, answer described in record
With the loading sequence to resource file, determine and record whether the application needs to preload resource text according to the loading sequence
Part, and need the when of preloading resource file to further determine that in the application and record the application need to preload it is specified
Resource file.
B13, the device as described in B12, wherein
The preloading control unit, suitable for judging whether the application records the specified resource file of load in need.
B14, the device as described in B9, wherein the specified resource file include startup interface picture resource file and/
Or the picture resource file at first screen interface.
B15, the device as described in B14, wherein
The application starts control unit, is further adapted for drawing application interface according to the data content of reading.
B16, the device as described in any one of B9-B15, wherein described device is applied to Android system
In ApplicationThread and/or ActivityThread.
The embodiment of the present invention also discloses C17, a kind of intelligent terminal, wherein the intelligent terminal includes:Processor;With
And it is arranged to the memory of storage computer executable instructions, the executable instruction when executed holds the processor
Method of the row according to any one of A1-A8.
The embodiment of the present invention also discloses D18, a kind of computer readable storage medium, wherein described computer-readable
The one or more programs of storage medium storage, one or more of programs when being executed by a processor, are realized as appointed in A1-A8
Method described in one.
Claims (10)
1. a kind of application startup method in Android system, including:
When application starts, judge whether the application needs to preload resource file;
It is that the specified resource file of the application is loaded into the buffering area of memory;
When loading the resource file of the application, judge the data content of resource file to be loaded whether in the buffering area
In, it is that corresponding data content is directly read from the buffering area.
2. the method for claim 1, wherein described judge whether the application needs to preload resource file to include:
Judge whether the preloading resource file function of Android system opens.
3. the method as described in claim 1, described that the specified resource file of the application is loaded into the buffering area of memory
Including:
It calls Runnable interfaces to start resource file and loads thread, thread is loaded by the specified money by the resource file
Source file is loaded into the buffering area of memory.
4. the method for claim 1, wherein this method further includes:
It is described apply start for the first time in Android system when, record loading sequence of the application to resource file;
It determines and records whether the application needs to preload resource file according to the loading sequence, and is needed in the application
It is further determined that when preloading resource file and records the application and need the specified resource file preloaded.
5. the application starter in a kind of Android system, including:
Control unit is preloaded, is suitable for, when application starts, judging whether the application needs to preload resource file;
Resource file pre-add carrier unit, if needing to preload resource file suitable for the application, by the specified money of the application
Source file is loaded into the buffering area of memory;
Using startup control unit, in the data for being suitable for judging resource file to be loaded when loading the resource file of the application
Hold whether in the buffering area, is to directly read corresponding data content from the buffering area.
6. device as claimed in claim 5, wherein
The preloading control unit, suitable for judging whether the preloading resource file function of Android system opens.
7. device as claimed in claim 5, wherein
The resource file pre-add carrier unit is suitable for calling Runnable interfaces to start resource file and loads thread, by described
The specified resource file is loaded into the buffering area of memory by resource file load thread.
8. device as claimed in claim 5, wherein
The preloading control unit, be further adapted for it is described apply start for the first time in Android system when, record the application pair
The loading sequence of resource file determines and records whether the application needs to preload resource file according to the loading sequence,
And it needs the when of preloading resource file to further determine that in the application and records the specified money that the application needs preload
Source file.
9. a kind of intelligent terminal, wherein the intelligent terminal includes:Processor;And it is arranged to the executable finger of storage computer
The memory of order, the executable instruction make the processor execute according to any one of claim 1-4 institutes when executed
The method stated.
10. a kind of computer readable storage medium, wherein the computer-readable recording medium storage one or more program,
One or more of programs when being executed by a processor, realize the method as described in any one of claim 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810469495.0A CN108762833A (en) | 2018-05-16 | 2018-05-16 | Application in Android system starts method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810469495.0A CN108762833A (en) | 2018-05-16 | 2018-05-16 | Application in Android system starts method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108762833A true CN108762833A (en) | 2018-11-06 |
Family
ID=64008055
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810469495.0A Pending CN108762833A (en) | 2018-05-16 | 2018-05-16 | Application in Android system starts method and apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108762833A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020078314A1 (en) * | 2018-10-15 | 2020-04-23 | 华为技术有限公司 | Method and apparatus for accelerating cold-starting of application, and terminal |
CN111399928A (en) * | 2018-12-14 | 2020-07-10 | 北京奇虎科技有限公司 | Application program starting method and device, electronic equipment and readable storage medium |
CN111399927A (en) * | 2018-12-14 | 2020-07-10 | 北京奇虎科技有限公司 | Method and device for sharing Class file by application and computing equipment |
CN111756927A (en) * | 2020-06-23 | 2020-10-09 | 广东小天才科技有限公司 | Output method of positioning information, terminal equipment and storage medium |
CN111949328A (en) * | 2020-08-06 | 2020-11-17 | 中国工商银行股份有限公司 | Starting acceleration method and device, computer equipment and storage medium |
CN112395083A (en) * | 2020-09-30 | 2021-02-23 | 腾讯科技(深圳)有限公司 | Resource file release method and device |
WO2021083378A1 (en) * | 2019-11-01 | 2021-05-06 | 华为技术有限公司 | Method for accelerating starting of application, and electronic device |
CN112765507A (en) * | 2021-01-27 | 2021-05-07 | 上海淇玥信息技术有限公司 | Method and device for rendering first screen of page and loading resources and electronic equipment |
CN112817648A (en) * | 2019-10-31 | 2021-05-18 | 深圳市万普拉斯科技有限公司 | Application program file preloading method and device and mobile terminal |
CN112860352A (en) * | 2021-03-17 | 2021-05-28 | 惠州Tcl移动通信有限公司 | Application loading method and device, storage medium and terminal |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1524597A1 (en) * | 2003-10-14 | 2005-04-20 | Axalto S.A. | Method for managing threads in a memory-constrained system |
CN102707973A (en) * | 2012-05-04 | 2012-10-03 | 惠州Tcl移动通信有限公司 | Application program starting method based on Android system and system |
US20140033219A1 (en) * | 2012-07-24 | 2014-01-30 | Mstar Semiconductor, Inc. | Method, apparatus and computer for loading resource file for game engine |
CN103631565A (en) * | 2013-11-13 | 2014-03-12 | 北京像素软件科技股份有限公司 | Loading method and device for scene resources |
CN104765622A (en) * | 2014-01-03 | 2015-07-08 | 腾讯科技(深圳)有限公司 | Page resource loading method and device |
CN105955765A (en) * | 2016-04-22 | 2016-09-21 | 北京小米移动软件有限公司 | Method and device for application preloading |
CN105955766A (en) * | 2016-04-22 | 2016-09-21 | 北京小米移动软件有限公司 | Method and device for application preloading |
CN107436786A (en) * | 2017-07-28 | 2017-12-05 | 深圳Tcl新技术有限公司 | Using starting guide method, apparatus and computer-readable recording medium |
-
2018
- 2018-05-16 CN CN201810469495.0A patent/CN108762833A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1524597A1 (en) * | 2003-10-14 | 2005-04-20 | Axalto S.A. | Method for managing threads in a memory-constrained system |
CN102707973A (en) * | 2012-05-04 | 2012-10-03 | 惠州Tcl移动通信有限公司 | Application program starting method based on Android system and system |
US20140033219A1 (en) * | 2012-07-24 | 2014-01-30 | Mstar Semiconductor, Inc. | Method, apparatus and computer for loading resource file for game engine |
CN103631565A (en) * | 2013-11-13 | 2014-03-12 | 北京像素软件科技股份有限公司 | Loading method and device for scene resources |
CN104765622A (en) * | 2014-01-03 | 2015-07-08 | 腾讯科技(深圳)有限公司 | Page resource loading method and device |
CN105955765A (en) * | 2016-04-22 | 2016-09-21 | 北京小米移动软件有限公司 | Method and device for application preloading |
CN105955766A (en) * | 2016-04-22 | 2016-09-21 | 北京小米移动软件有限公司 | Method and device for application preloading |
CN107436786A (en) * | 2017-07-28 | 2017-12-05 | 深圳Tcl新技术有限公司 | Using starting guide method, apparatus and computer-readable recording medium |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020078314A1 (en) * | 2018-10-15 | 2020-04-23 | 华为技术有限公司 | Method and apparatus for accelerating cold-starting of application, and terminal |
CN111399928A (en) * | 2018-12-14 | 2020-07-10 | 北京奇虎科技有限公司 | Application program starting method and device, electronic equipment and readable storage medium |
CN111399927A (en) * | 2018-12-14 | 2020-07-10 | 北京奇虎科技有限公司 | Method and device for sharing Class file by application and computing equipment |
CN112817648A (en) * | 2019-10-31 | 2021-05-18 | 深圳市万普拉斯科技有限公司 | Application program file preloading method and device and mobile terminal |
WO2021083378A1 (en) * | 2019-11-01 | 2021-05-06 | 华为技术有限公司 | Method for accelerating starting of application, and electronic device |
CN112783564A (en) * | 2019-11-01 | 2021-05-11 | 华为技术有限公司 | Method for accelerating starting of application program and electronic equipment |
CN112783564B (en) * | 2019-11-01 | 2023-03-03 | 华为技术有限公司 | Method for accelerating starting of application program and electronic equipment |
CN111756927A (en) * | 2020-06-23 | 2020-10-09 | 广东小天才科技有限公司 | Output method of positioning information, terminal equipment and storage medium |
CN111949328A (en) * | 2020-08-06 | 2020-11-17 | 中国工商银行股份有限公司 | Starting acceleration method and device, computer equipment and storage medium |
CN111949328B (en) * | 2020-08-06 | 2023-10-03 | 中国工商银行股份有限公司 | Start acceleration method and device, computer equipment and storage medium |
CN112395083A (en) * | 2020-09-30 | 2021-02-23 | 腾讯科技(深圳)有限公司 | Resource file release method and device |
CN112395083B (en) * | 2020-09-30 | 2022-03-15 | 腾讯科技(深圳)有限公司 | Resource file release method and device and computer readable storage medium |
CN112765507A (en) * | 2021-01-27 | 2021-05-07 | 上海淇玥信息技术有限公司 | Method and device for rendering first screen of page and loading resources and electronic equipment |
CN112765507B (en) * | 2021-01-27 | 2023-12-26 | 上海淇玥信息技术有限公司 | Page first screen rendering and resource loading method and device and electronic equipment |
CN112860352A (en) * | 2021-03-17 | 2021-05-28 | 惠州Tcl移动通信有限公司 | Application loading method and device, storage medium and terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108762833A (en) | Application in Android system starts method and apparatus | |
CN109697060B (en) | Video special effect system, generation method, device, equipment and storage medium thereof | |
CN105490860B (en) | The method, apparatus and system of disposing application program running environment | |
WO2016155388A1 (en) | Method and device for installing and running application | |
CN105468529B (en) | A kind of accurate traversal method of Android application UI controls and device | |
US20040025083A1 (en) | Generating test code for software | |
CN104731622B (en) | The loading method of a kind of application program, device and mobile terminal | |
US9858094B2 (en) | Monitoring and actuation of view controller parameters to reach deep states without manual developer intervention | |
CN106941672A (en) | The method and device of application software abnormality processing | |
CN103793248B (en) | Method and device for upgrading application program | |
CN112084488A (en) | Application authority management method, device and system | |
CN104503778A (en) | Installation method and installation device for applications | |
US9696990B2 (en) | Method and apparatus for implementing inter-component function calls | |
CN112306486B (en) | Interface generation method and device, server and storage medium | |
CN108563472A (en) | Based on the service plug loading method and device for more opening application | |
CN108133126A (en) | A kind of reinforcement means and device of Android application | |
CN113535567B (en) | Software testing method, device, equipment and medium | |
CN110020370B (en) | Method and device for realizing animation in client application and framework of animation script | |
US9430216B2 (en) | Self-contained executable for predetermined software updating | |
US20110167415A1 (en) | Language processing apparatus, language processing method, and computer program product | |
CN103279569B (en) | The method and device of change system theme | |
CN104778091B (en) | The operation method and device of application program | |
US8745587B2 (en) | System and method for testing computer programs | |
CN105204907A (en) | Browser starting method and device | |
CN104572199B (en) | The method and apparatus that a kind of No starting item starts |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181106 |
|
RJ01 | Rejection of invention patent application after publication |