CN105740033A - Terminal equipment, plug-in loading and running device and plug-in loading and running method - Google Patents

Terminal equipment, plug-in loading and running device and plug-in loading and running method Download PDF

Info

Publication number
CN105740033A
CN105740033A CN201610148012.8A CN201610148012A CN105740033A CN 105740033 A CN105740033 A CN 105740033A CN 201610148012 A CN201610148012 A CN 201610148012A CN 105740033 A CN105740033 A CN 105740033A
Authority
CN
China
Prior art keywords
plug
installation kit
host application
unit installation
set information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610148012.8A
Other languages
Chinese (zh)
Inventor
蔡灿
陆影影
吴道猛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Youshi Network Technology Co Ltd
Original Assignee
Guangzhou Caitong Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Caitong Network Technology Co Ltd filed Critical Guangzhou Caitong Network Technology Co Ltd
Priority to CN201610148012.8A priority Critical patent/CN105740033A/en
Publication of CN105740033A publication Critical patent/CN105740033A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Abstract

The invention discloses terminal equipment, a plug-in loading and running device and a plug-in loading and running method.The terminal equipment comprises a storage device, a touch display screen and a processor.A host application program is stored in the storage device.In response to initialization operation of the host application program opened on the touch display screen by a user, the processor loads a plug-in installation package and modifies a running environment of the host application program based on setting information of the plug-in installation package so that the host application program can point to operation of the plug-in installation package; in response to execution of the host application program, the processor executes the pointed operation of the plug-in installation package in the modified running environment.According to the scheme, the flow for downloading the installation package by the user can be saved by loading a plug-in, and thus the downloading quantity and installing quantity of application programs can be increased.

Description

A kind of terminal unit, plug-in unit load operating device and plug-in unit load operating method
Technical field
The present invention relates to mobile internet technical field, be specifically related to a kind of terminal unit, plug-in unit load operating device and plug-in unit load operating method.
Background technology
At present, along with the constantly universal and development of intelligent mobile terminal technology and Android technology, user can install various application program on mobile terminals.
In order to adapt to the different demands of user, increasing user's viscosity and attract new user, application program generally all can constantly be issued more redaction and download installation for user.
But, along with the iteration of version updates, installation kit (Apk, the AndroidPackage) volume of application program generally can be increasing.Owing to installation kit volume is more big, the network traffics consumed are more big, also can be more big at the memory space shared by mobile terminal, when customer flow resource is more valuable, some user is likely to just be unwilling to download bulky installation kit, thus affecting download and the installation of application program.
Summary of the invention
For solving above-mentioned technical problem, the present invention provides a kind of terminal unit, plug-in unit load operating device and plug-in unit load operating method, and loading of plug-in can be utilized to download the flow of installation kit to save user, promotes download and the installation of application program.
Technical scheme provided by the invention is as follows:
According to an aspect of the present invention, it is provided that a kind of terminal unit, including: memorizer, touching display screen and processor,
Reservoir host's application program in described memorizer;
Open the initialization operation of the described host application after described host application on described touching display screen in response to user, described processor performs loading of plug-in installation kit and the running environment based on the set information described host application of amendment of described plug-in unit installation kit makes described host application point to the operation of described plug-in unit installation kit;
In response to the execution of described host application, described processor performs to run in described running environment after the modification the operation of the plug-in unit installation kit of described sensing.
Preferably, described processor execution loading of plug-in installation kit the running environment based on the set information described host application of amendment of described plug-in unit installation kit make the operation that described host application points to described plug-in unit installation kit include:
Described processor loading of plug-in installation kit, obtains the set information of described plug-in unit installation kit;
Obtain the set information of described host application;
Based on the set information of described plug-in unit installation kit, the set information of described host application is replaced amendment, agency's amendment and contextual modifications so that described host application points to described plug-in unit installation kit.
According to another aspect of the present invention, it is provided that a kind of plug-in unit load operating device, including:
First processing module, the running environment revising described host application for the initialization in response to host application, loading of plug-in installation kit the set information based on described plug-in unit installation kit makes described host application point to described plug-in unit installation kit;
Second processing module, for the execution in response to described host application, runs the plug-in unit installation kit of described sensing in the described first amended described running environment of processing module.
Preferably, described first processing module includes:
Load and obtain submodule, for loading of plug-in installation kit, obtaining the set information of described plug-in unit installation kit;
Hosted information obtains submodule, for obtaining the set information of described host application;
Amendment submodule, for based on described loading and the set information obtaining the plug-in unit installation kit that submodule obtains, the set information that described hosted information obtains the host application that submodule obtains is replaced amendment, agency's amendment and contextual modifications so that described host application points to described plug-in unit installation kit.
Preferably, described amendment submodule includes:
First amendment submodule, for being obtained the installation kit information of described host application by reflex mechanism, by reflex mechanism, the Classloader quoted in the installation kit information of described host application, Resource TOC path and Resource Properties are replaced with the Classloader of described plug-in unit installation kit, local path and Resource Properties respectively.
Preferably, described amendment submodule includes:
Second amendment submodule, for being obtained the package manager of described host application by reflex mechanism, carries out dynamic proxy to the associated member's method in the package manager of described host application so that returning the relevant information of described plug-in unit installation kit.
Preferably, described amendment submodule includes:
3rd amendment submodule, for generating the new context of described host application, the quoting resource of wherein said new context points to described plug-in unit installation kit, by reflex mechanism, quoting of the former context in the installation kit information of described host application is replaced with described new context, and trigger the initialization opportunity of new context.
According to another aspect of the present invention, it is provided that a kind of plug-in unit load operating method, including:
The running environment revising described host application in response to the initialization of host application, loading of plug-in installation kit the set information based on described plug-in unit installation kit makes described host application point to described plug-in unit installation kit;
In response to the execution of described host application, described running environment after the modification is run the plug-in unit installation kit of described sensing.
Preferably, described loading of plug-in installation kit the running environment based on the set information described host application of amendment of described plug-in unit installation kit make the described host application described plug-in unit installation kit of sensing include:
Loading of plug-in installation kit, obtains the set information of described plug-in unit installation kit;
Obtain the set information of described host application;
Based on the set information of described plug-in unit installation kit, the set information of described host application is replaced amendment, agency's amendment and contextual modifications so that described host application points to described plug-in unit installation kit.
Preferably, the described set information based on described plug-in unit installation kit, the set information of described host application is replaced amendment and includes:
The installation kit information of described host application is obtained by reflex mechanism;
By reflex mechanism, the Classloader quoted in the installation kit information of described host application, Resource TOC path and Resource Properties are replaced with the Classloader of described plug-in unit installation kit, local path and Resource Properties respectively.
Preferably, the Classloader of described plug-in unit installation kit, local path and Resource Properties obtain after loading of plug-in installation kit.
Preferably, the described set information based on described plug-in unit installation kit, the set information of described host application is acted on behalf of amendment and includes:
The package manager of described host application is obtained by reflex mechanism;
Associated member's method in the package manager of described host application is carried out dynamic proxy so that returning the relevant information of described plug-in unit installation kit.
Preferably, the described set information based on described plug-in unit installation kit, the set information of described host application is carried out contextual modifications and includes:
Generating the new context of described host application, the quoting resource of wherein said new context points to described plug-in unit installation kit;
By reflex mechanism, quoting of the former context in the installation kit information of described host application is replaced with described new context, and trigger the initialization opportunity of new context.
It appeared that, the technical scheme of the embodiment of the present invention, when host application initializes, first loading of plug-in installation kit, and the running environment based on the set information described host application of amendment of described plug-in unit installation kit makes described host application point to described plug-in unit installation kit, described running environment after the modification thus in the execution process of host application, can be run the plug-in unit installation kit of described sensing.By above-mentioned process, it is smaller that the installation kit volume of host application installed at mobile terminal just can do, the application function provided the user realizes such as through running the plug-in unit loaded, thus being greatly saved user to download the flow of installation kit, attract more users to download and set up applications, promote download and the installation of application program.
Further, the Classloader quoted in the installation kit information of described host application, Resource TOC path and Resource Properties can be replaced with the Classloader of described plug-in unit installation kit, local path and Resource Properties by reflex mechanism by the embodiment of the present invention respectively;Associated member's method in the package manager of described host application is carried out dynamic proxy so that returning the relevant information of described plug-in unit installation kit;By reflex mechanism, quoting of the former context in the installation kit information of described host application is replaced with new context.Therefore the technical scheme of the embodiment of the present invention realizes dynamically changing the running environment of host application, makes the sensing plug-in application that host application is complete, realizes loading and the operation of plug-in unit installation kit from the code without amendment plug-in unit installation kit.
Accompanying drawing explanation
In conjunction with the drawings disclosure illustrative embodiments is described in more detail, above-mentioned and other purpose, feature and the advantage of the disclosure will be apparent from, wherein, in disclosure illustrative embodiments, identical reference number typically represents same parts.
Fig. 1 is the schematic block diagram of a kind of terminal unit according to an embodiment of the invention;
Fig. 2 is the schematic block diagram of a kind of plug-in unit load operating device according to an embodiment of the invention;
Fig. 3 is another schematic block diagram of a kind of plug-in unit load operating device according to an embodiment of the invention;
Fig. 4 is the indicative flowchart of a kind of plug-in unit load operating method according to an embodiment of the invention;
Fig. 5 is another indicative flowchart of a kind of plug-in unit load operating method according to an embodiment of the invention.
Detailed description of the invention
It is more fully described the preferred implementation of the disclosure below with reference to accompanying drawings.Although accompanying drawing shows the preferred implementation of the disclosure, however, it is to be appreciated that may be realized in various forms the disclosure and should do not limited by embodiments set forth herein.On the contrary, it is provided that these embodiments are to make the disclosure more thorough and complete, and the scope of the present disclosure can intactly convey to those skilled in the art.
Before introducing the embodiment of the present invention, first introduce some concepts related in the embodiment of the present invention, to help the understanding to scheme.
Host application (abbreviation host program) described in the embodiment of the present invention is the software environment that software is depended on for existence, for instance: A needs to operate in B, and B is exactly host program.
Class described in the embodiment of the present invention is the carrier of the attribute of encapsulated object and behavior, and a class entity in turn with same alike result and behavior is referred to as class;To as if example during class abstract out one, in computer programming language such as Java language, the attribute of object exists with the form of member variable, and the method for object exists with the form of member method.Java language use member method corresponding to the behavior of class object.One member method can have parameter, this parameter can be object can also be the variable of basic data type, member method has return value and does not return the selection of any value simultaneously, and wherein the return value of member method can be result of calculation can also be other numerical value wanted and objects.Classloader is a class for loading classes file, and its effect is exactly operationally loading classes.Classloader is generally responsible for the class file in load document system, network or other sources.
Reflection described in the embodiment of the present invention refers to reflex mechanism, for instance Java reflex mechanism.Java reflex mechanism is in running status, for any one class, can both know all properties and the method for this class;For any one object, its any one method can both be called;The function of the method for this dynamic acquisition information and dynamic call object is the reflex mechanism of Java language.Utilize Java reflex mechanism, all description information (what such as often access includes the building method of class, member variable and method etc.) of class can be accessed when program is run, it is achieved the execution process of multi channel program.
Dynamic proxy described in the embodiment of the present invention, it is use reflex mechanism dynamic creation to form when program is run, it is possible to by specifying Classloader ClassLoader object and a group interface interface to create dynamic proxy class for proxy class (Proxy class).In fact, namely in running status, the agency of dynamic creation outgoing interface realizes class, and its reflex mechanism remained by Java creates.An effect intercepted can be played, thus running the logic of succedaneum when user calls such member method.
Embodiment of the present invention technical scheme is discussed in detail below in conjunction with accompanying drawing.
The embodiment of the present invention provides a kind of terminal unit, and loading of plug-in can be utilized to download the flow of installation kit to save user, promotes download and the installation of application program.
Fig. 1 is the schematic block diagram of a kind of terminal unit according to an embodiment of the invention.
As it is shown in figure 1, terminal unit 10 may include that memorizer 11, touching display screen 12 and processor 13.
Memorizer 11 stores reservoir host's application program;
In response to user's initialization operation opening the described host application after described host application on touching display screen 12, processor 13 performs loading of plug-in installation kit and the set information based on described plug-in unit installation kit is revised the running environment of described host application and made described host application point to the operation of described plug-in unit installation kit;
In response to the execution of described host application, processor 13 performs to run in described running environment after the modification the operation of the plug-in unit installation kit of described sensing.
Wherein, processor 13 performs loading of plug-in installation kit and the running environment based on the set information described host application of amendment of described plug-in unit installation kit makes the operation that described host application points to described plug-in unit installation kit include: described processor 13 loading of plug-in installation kit, obtains the set information of described plug-in unit installation kit;Obtain the set information of described host application;Based on the set information of described plug-in unit installation kit, the set information of described host application is replaced amendment, agency's amendment and contextual modifications so that described host application points to described plug-in unit installation kit.
Processor 13 in terminal unit 10, can as an independent apparatus structure, this independent apparatus structure is properly termed as plug-in unit load operating device, and this plug-in unit load operating device can include multiple submodule, hereafter will this plug-in unit load operating apparatus structure be described in detail.
Fig. 2 is the schematic block diagram of a kind of plug-in unit load operating device according to an embodiment of the invention.
As in figure 2 it is shown, may include that first processing module the 21, second processing module 22 in plug-in unit load operating device 20.
First processing module 21, the running environment revising described host application for the initialization in response to host application, loading of plug-in installation kit the set information based on described plug-in unit installation kit makes described host application point to described plug-in unit installation kit.
First processing module 21 when host application initializes, first loading of plug-in installation kit, obtain the set information of described plug-in unit installation kit;Obtain the set information of described host application;Based on the set information of described plug-in unit installation kit, the set information of described host application is replaced amendment, agency's amendment and contextual modifications so that described host application points to described plug-in unit installation kit.
Second processing module 22, for the execution in response to described host application, runs the plug-in unit installation kit of described sensing in the described first amended described running environment of processing module 21.
It appeared that, the technical scheme of the embodiment of the present invention, when host application initializes, first loading of plug-in installation kit, and the running environment based on the set information described host application of amendment of described plug-in unit installation kit makes described host application point to described plug-in unit installation kit, described running environment after the modification thus in the execution process of host application, can be run the plug-in unit installation kit of described sensing.By above-mentioned process, it is smaller that the installation kit volume of host application installed at mobile terminal just can do, the application function provided the user realizes such as through running the plug-in unit loaded, thus being greatly saved user to download the flow of installation kit, attract more users to download and set up applications, promote download and the installation of application program.
Fig. 3 is another schematic block diagram of a kind of plug-in unit load operating device according to an embodiment of the invention.
As it is shown on figure 3, may include that first processing module the 21, second processing module 22 in plug-in unit load operating device 20, the function of these two modules can referring to described by Fig. 2, repeating no more herein.
Further, described first processing module 21 may include that loading and obtains submodule 211, hosted information acquisition submodule 212, amendment submodule 213.
Load and obtain submodule 211, for loading of plug-in installation kit, obtaining the set information of described plug-in unit installation kit.
Hosted information obtains submodule 212, for obtaining the set information of described host application.
Amendment submodule 213, for based on described loading and the set information obtaining the plug-in unit installation kit that submodule 211 obtains, the set information that described hosted information obtains the host application that submodule 212 obtains is replaced amendment, agency's amendment and contextual modifications so that described host application points to described plug-in unit installation kit.
Wherein, described amendment submodule 213 may include that the first amendment submodule 2131.
First amendment submodule 2131, for being obtained the installation kit information of described host application by reflex mechanism, by reflex mechanism, the Classloader quoted in the installation kit information of described host application, Resource TOC path and Resource Properties are replaced with the Classloader of described plug-in unit installation kit, local path and Resource Properties respectively.
Reflex mechanism is in running status, for any one class, can both know all properties and the method for this class;For any one object, its any one method can both be called.Utilize reflex mechanism, all description information (what such as often access includes the building method of class, member variable and method etc.) of class can be accessed when program is run, it is achieved the execution process of multi channel program.
Wherein, described amendment submodule 213 may include that the second amendment submodule 2132.
Second amendment submodule 2132, for being obtained the package manager of described host application by reflex mechanism, carries out dynamic proxy to the associated member's method in the package manager of described host application so that returning the relevant information of described plug-in unit installation kit.
Described dynamic proxy, is exactly be created that the agency of interface realizes class dynamically in fact in running status.
Wherein, described amendment submodule 213 may include that the 3rd amendment submodule 2133.
3rd amendment submodule 2133, for generating the new context of described host application, the quoting resource of wherein said new context points to described plug-in unit installation kit, by reflex mechanism, quoting of the former context in the installation kit information of described host application is replaced with new context, and trigger the initialization opportunity of new context.
It appeared that, the technical scheme of the embodiment of the present invention, described host application is made to point in the process of described plug-in unit installation kit in the running environment revising described host application, based on the set information of described plug-in unit installation kit, the set information of described host application can be replaced amendment, agency's amendment and entrusts amendment so that described host application points to described plug-in unit installation kit.Including: by reflex mechanism, the Classloader quoted in the installation kit information of described host application, Resource TOC path and Resource Properties are replaced with the Classloader of described plug-in unit installation kit, local path and Resource Properties respectively;Associated member's method in the package manager of described host application is carried out dynamic proxy so that returning the relevant information of described plug-in unit installation kit;By reflex mechanism, quoting of the former context in the installation kit information of described host application is replaced with new context.Therefore the technical scheme of the embodiment of the present invention realizes dynamically changing the running environment of host application, makes the sensing plug-in application that host application is complete, realizes loading and the operation of plug-in unit installation kit from the code without amendment plug-in unit installation kit.
Fig. 4 is the indicative flowchart of a kind of plug-in unit load operating method according to an embodiment of the invention.
As shown in Figure 4, in step 401, the running environment that plug-in unit load operating device revises described host application in response to the initialization of host application, loading of plug-in installation kit the set information based on described plug-in unit installation kit makes described host application point to described plug-in unit installation kit.
Above-mentioned plug-in unit load operating device, it is possible to run in host application, controls loading and the operation of plug-in unit.
This step may include that loading of plug-in installation kit, obtain the set information of described plug-in unit installation kit;Obtain the set information of described host application;Based on the set information of described plug-in unit installation kit, the set information of described host application is replaced amendment, agency's amendment and contextual modifications so that described host application points to described plug-in unit installation kit.
In step 402, plug-in unit load operating device, in response to the execution of described host application, runs the plug-in unit installation kit of described sensing in described running environment after the modification.
It appeared that, the technical scheme of the embodiment of the present invention, when host application initializes, first loading of plug-in installation kit, and the running environment based on the set information described host application of amendment of described plug-in unit installation kit makes described host application point to described plug-in unit installation kit, described running environment after the modification thus in the execution process of host application, can be run the plug-in unit installation kit of described sensing.By above-mentioned process, it is smaller that the installation kit volume of host application installed at mobile terminal just can do, the application function provided the user realizes such as through running the plug-in unit loaded, thus being greatly saved user to download the flow of installation kit, attract more users to download and set up applications, promote download and the installation of application program.
Fig. 5 is another indicative flowchart of a kind of plug-in unit load operating method according to an embodiment of the invention.
Fig. 5 describe in more detail the technical scheme of the embodiment of the present invention relative to Fig. 4.
The plug-in unit load operating device of the embodiment of the present invention can perform operation in host application.
As it is shown in figure 5, in step 501, plug-in unit load operating device when host application initializes, first loading of plug-in installation kit Apk, obtain the set information of described plug-in unit installation kit.
In this step, the set information of the plug-in unit installation kit of acquisition such as can include the Classloader (ClassLoader) of plug-in unit Apk, local path and Resource Properties etc..
In step 502, plug-in unit load operating device obtains the installation kit information of described host application by reflex mechanism.
In this step, reflection obtains the installation kit information (PackageInfo) of host application.Installation kit information such as can include Classloader, Resource TOC path and the Resource Properties quoted in installation kit information.
Reflex mechanism is in running status, for any one class, can both know all properties and the method for this class;For any one object, its any one method can both be called.Utilize reflex mechanism, all description information (what such as often access includes the building method of class, member variable and method etc.) of class can be accessed when program is run, it is achieved the execution process of multi channel program.Therefore, step 502 can be passed through reflex mechanism and obtain the installation kit information (PackageInfo) of host application.Reflection described in this step obtains, and in fact namely refers to be got certain member property in the example of class by reflex mechanism.
It should be noted that, step 501 and step 502 do not have the ordering relation of certainty, herein simply for the convenience of description.
In step 503, the Classloader quoted in the installation kit information of described host application, Resource TOC path and Resource Properties are replaced with the Classloader of described plug-in unit installation kit, local path and Resource Properties by reflex mechanism by plug-in unit load operating device respectively.
In this step, the Classloader that Classloader is plug-in unit Apk quoted in the installation kit information of host application is replaced in reflection, the local path that Resource TOC path is plug-in unit Apk in the installation kit information of host application is replaced in reflection, and the Resource Properties that Resource Properties is plug-in unit in the installation kit information of host application is replaced in reflection.
Reflection described in this step is replaced, and in fact refers to certain member property being replaced by an instantiation new same attribute out in the example of class by reflex mechanism.
Therefore, in above-mentioned steps 502 and 503, it can be the privately owned member property " installation kit information " (mPackageInfo) first passing through context (Application) object that reflex mechanism obtains host application, then again by reflex mechanism, the Classloader (" mClassLoader ") quoted in this installation kit information is replaced to the Classloader of plug-in unit Apk, the Resource TOC local path (" mResDir ") quoted in installation kit information is replaced to the local path of plug-in unit Apk, the resource (" mResources ") quoted in installation kit information is replaced to the resource of plug-in unit Apk.
In step 504, plug-in unit load operating device obtains the package manager of described host application by reflex mechanism.
In this step, it is possible to reflection obtain host application package manager (PackageManager), in package manager, wherein comprise associated member's method.
In step 505, the associated member's method in the package manager of described host application is carried out dynamic proxy so that returning the relevant information of described plug-in unit installation kit by plug-in unit load operating device.
In this step, the associated member's method in the package manager of host application is carried out dynamic proxy, make associated member's method return the relevant information of plug-in unit Apk.
Dynamic proxy in this step, is exactly be created that the agency of interface realizes class dynamically in fact in running status, and its reflex mechanism remained by Java creates.An effect intercepted can be played, thus running the logic of succedaneum when user calls such member method.
Such as, in this step, the package manager (PackageManager) of host application is carried out dynamic proxy, act on behalf of its member method (" getActivityInfo ", " getPackageInfo ", " queryIntentActivities "), make the member method of package manager return return value corresponding to plug-in unit Apk.
In step 506, plug-in unit load operating device generates the new quoting resource of described host application and points to the context Application of plug-in unit installation kit.
Replacing and after dynamic proxy operation through a series of reflection of above-mentioned steps, this step generates and obtains new context Application (entrusting class also referred to as context Application), and all quoting resources in new context both point to plug-in unit Apk.
In step 507, plug-in unit load operating device passes through reflex mechanism by the new context all replacing with described generation of quoting of the former context in the installation kit information of described host application, and triggers the initialization opportunity of new context.
In this step, reflection is replaced quoting of all former context Application in host application installation kit information and has all been replaced to new context Application, is namely all directed to the new context generated.
Because the new context generated needs to trigger it as system initializes flow process, so the method for the triggering of the embodiment of the present invention is to be called the initialization entry method (" attach () ") of new context Application by reflex mechanism, then initialized by host application.
This step is because replacing quoting of all former Application in host application installation kit information by reflecting, the whole context making host application is quoted and has all been replaced to new context, so new context has just become the real context Application that system is approved, and all quoting resources in this new context both point to plug-in unit Apk, just uninstalled plug-in unit Apk successfully can be behaved so host application is follow-up.
In step 508, plug-in unit load operating device, in host application execution process, runs the plug-in unit installation kit pointed by described new context according to described new context.
It appeared that, by above-mentioned process, the embodiment of the present invention realizes dynamically changing the running environment of host application, so that the sensing plug-in unit installation kit that host application is complete, then is no need for the code of amendment plug-in unit installation kit and realizes loading and the operation of plug-in unit installation kit.
Illustrate below in conjunction with an Application Example:
After the installation kit of application program provider one application A of exploitation and plug-in unit Apk bag (such as about 6M), the installation kit (such as about 100K) of a Mini application program B is designed again for it, the installation kit that outside can provide Mini application program B is downloaded for user and installs, this installation kit can only include the icon resource of application A, brand promotion resource, the essential informations such as server domain name, (now Mini application program B is host application) dynamic load again is corresponding as the Mini application program B of user's opening installation plug-in unit Apk bag A also runs, thus normal presentation goes out the true content of application A.
It appeared that, above-mentioned process is be the same with the application A directly opening a 6M in effect, but said process is unaware for a user, the simply installation kit size of user's perception only has 100K, than original 6M reduction in bulk 60 times, it is greatly saved user and downloads the flow of installation kit so that user is more willing to download and install, such that it is able to be greatly promoted outside download and the installation of application program.
It should be noted that embodiment of the present invention technical scheme go for any Android Android application, meanwhile, other operating system platforms can also reference implementation, its principle is identical.
Above describe in detail according to technical scheme by reference to accompanying drawing.
Additionally, the method according to the invention is also implemented as a kind of computer program, this computer program includes the computer program code instruction of the above steps limited in the said method for performing the present invention.Or, the method according to the invention is also implemented as a kind of computer program, this computer program includes computer-readable medium, and storage has the computer program of the above-mentioned functions limited in the said method for performing the present invention on the computer-readable medium.Those skilled in the art will also understand is that, may be implemented as electronic hardware, computer software or both combinations in conjunction with the various illustrative logical blocks described by disclosure herein, module, circuit and algorithm steps.
Flow chart and block diagram in accompanying drawing show the architectural framework in the cards of system and method for the multiple embodiments according to the present invention, function and operation.In this, flow chart or each square frame in block diagram can represent a part for a module, program segment or code, and a part for described module, program segment or code comprises the executable instruction of one or more logic function for realizing regulation.It should also be noted that at some as in the realization replaced, in square frame, the function of institute's labelling can also occur with the order being different from accompanying drawing institute's labelling.Such as, two continuous print square frames can essentially perform substantially in parallel, and they can also perform sometimes in the opposite order, and this determines according to involved function.It will also be noted that, the combination of the square frame in each square frame in block diagram and/or flow chart and block diagram and/or flow chart, can realize by the special hardware based system of the function or operation that perform regulation, or can realize with the combination of specialized hardware Yu computer instruction.
Being described above various embodiments of the present invention, described above is illustrative of, and non-exclusive, and it is also not necessarily limited to disclosed each embodiment.When not necessarily departing from the scope and spirit of illustrated each embodiment, many modifications and changes will be apparent from for those skilled in the art.The selection of term used herein, it is intended to explain the principle of each embodiment, practical application or the improvement to the technology in market best, or make other those of ordinary skill of the art be understood that each embodiment disclosed herein.

Claims (13)

1. a terminal unit, it is characterised in that including: memorizer, touching display screen and processor,
Reservoir host's application program in described memorizer;
Open the initialization operation of the described host application after described host application on described touching display screen in response to user, described processor performs loading of plug-in installation kit and the running environment based on the set information described host application of amendment of described plug-in unit installation kit makes described host application point to the operation of described plug-in unit installation kit;
In response to the execution of described host application, described processor performs to run in described running environment after the modification the operation of the plug-in unit installation kit of described sensing.
2. terminal unit according to claim 1, it is characterized in that, described processor performs loading of plug-in installation kit and the running environment based on the set information described host application of amendment of described plug-in unit installation kit makes the operation that described host application points to described plug-in unit installation kit include:
Described processor loading of plug-in installation kit, obtains the set information of described plug-in unit installation kit;
Obtain the set information of described host application;
Based on the set information of described plug-in unit installation kit, the set information of described host application is replaced amendment, agency's amendment and contextual modifications so that described host application points to described plug-in unit installation kit.
3. a plug-in unit load operating device, it is characterised in that including:
First processing module, the running environment revising described host application for the initialization in response to host application, loading of plug-in installation kit the set information based on described plug-in unit installation kit makes described host application point to described plug-in unit installation kit;
Second processing module, for the execution in response to described host application, runs the plug-in unit installation kit of described sensing in the described first amended described running environment of processing module.
4. device according to claim 3, it is characterised in that described first processing module includes:
Load and obtain submodule, for loading of plug-in installation kit, obtaining the set information of described plug-in unit installation kit;
Hosted information obtains submodule, for obtaining the set information of described host application;
Amendment submodule, for based on described loading and the set information obtaining the plug-in unit installation kit that submodule obtains, the set information that described hosted information obtains the host application that submodule obtains is replaced amendment, agency's amendment and contextual modifications so that described host application points to described plug-in unit installation kit.
5. device according to claim 4, it is characterised in that described amendment submodule includes:
First amendment submodule, for being obtained the installation kit information of described host application by reflex mechanism, by reflex mechanism, the Classloader quoted in the installation kit information of described host application, Resource TOC path and Resource Properties are replaced with the Classloader of described plug-in unit installation kit, local path and Resource Properties respectively.
6. device according to claim 4, it is characterised in that described amendment submodule includes:
Second amendment submodule, for being obtained the package manager of described host application by reflex mechanism, carries out dynamic proxy to the associated member's method in the package manager of described host application so that returning the relevant information of described plug-in unit installation kit.
7. device according to claim 4, it is characterised in that described amendment submodule includes:
3rd amendment submodule, for generating the new context of described host application, the quoting resource of wherein said new context points to described plug-in unit installation kit, by reflex mechanism, quoting of the former context in the installation kit information of described host application is replaced with described new context, and trigger the initialization opportunity of new context.
8. a plug-in unit load operating method, it is characterised in that including:
The running environment revising described host application in response to the initialization of host application, loading of plug-in installation kit the set information based on described plug-in unit installation kit makes described host application point to described plug-in unit installation kit;
In response to the execution of described host application, described running environment after the modification is run the plug-in unit installation kit of described sensing.
9. method according to claim 8, it is characterised in that described loading of plug-in installation kit the set information based on described plug-in unit installation kit are revised the running environment of described host application and the described host application described plug-in unit installation kit of sensing is included:
Loading of plug-in installation kit, obtains the set information of described plug-in unit installation kit;
Obtain the set information of described host application;
Based on the set information of described plug-in unit installation kit, the set information of described host application is replaced amendment, agency's amendment and contextual modifications so that described host application points to described plug-in unit installation kit.
10. method according to claim 9, it is characterised in that the described set information based on described plug-in unit installation kit, is replaced amendment to the set information of described host application and includes:
The installation kit information of described host application is obtained by reflex mechanism;
By reflex mechanism, the Classloader quoted in the installation kit information of described host application, Resource TOC path and Resource Properties are replaced with the Classloader of described plug-in unit installation kit, local path and Resource Properties respectively.
11. method according to claim 10, it is characterised in that the Classloader of described plug-in unit installation kit, local path and Resource Properties obtain after loading of plug-in installation kit.
12. method according to claim 9, it is characterised in that the described set information based on described plug-in unit installation kit, the set information of described host application is acted on behalf of amendment and includes:
The package manager of described host application is obtained by reflex mechanism;
Associated member's method in the package manager of described host application is carried out dynamic proxy so that returning the relevant information of described plug-in unit installation kit.
13. method according to claim 9, it is characterised in that the described set information based on described plug-in unit installation kit, the set information of described host application is carried out contextual modifications and includes:
Generating the new context of described host application, the quoting resource of wherein said new context points to described plug-in unit installation kit;
By reflex mechanism, quoting of the former context in the installation kit information of described host application is replaced with described new context, and trigger the initialization opportunity of new context.
CN201610148012.8A 2016-03-15 2016-03-15 Terminal equipment, plug-in loading and running device and plug-in loading and running method Pending CN105740033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610148012.8A CN105740033A (en) 2016-03-15 2016-03-15 Terminal equipment, plug-in loading and running device and plug-in loading and running method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610148012.8A CN105740033A (en) 2016-03-15 2016-03-15 Terminal equipment, plug-in loading and running device and plug-in loading and running method

Publications (1)

Publication Number Publication Date
CN105740033A true CN105740033A (en) 2016-07-06

Family

ID=56250633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610148012.8A Pending CN105740033A (en) 2016-03-15 2016-03-15 Terminal equipment, plug-in loading and running device and plug-in loading and running method

Country Status (1)

Country Link
CN (1) CN105740033A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371850A (en) * 2016-09-19 2017-02-01 上海葡萄纬度科技有限公司 Method for establishing customizable desktop widget
CN107463406A (en) * 2017-08-08 2017-12-12 上海连尚网络科技有限公司 Issue the method and electronic equipment of Mobile solution
CN107773984A (en) * 2016-08-26 2018-03-09 博雅网络游戏开发(深圳)有限公司 Chess and card games loading method and chess and card games system
WO2018103610A1 (en) * 2016-12-05 2018-06-14 腾讯科技(深圳)有限公司 Plug-in loading method and device, terminal and storage medium
CN109710334A (en) * 2018-12-29 2019-05-03 北京小米移动软件有限公司 Dynamic loading method, device and storage medium
CN109976787A (en) * 2019-03-12 2019-07-05 平安普惠企业管理有限公司 Application program updating method, apparatus, terminal and computer readable storage medium
CN111475227A (en) * 2020-04-02 2020-07-31 深圳创维-Rgb电子有限公司 Business plug-in loading implementation method and device and terminal equipment
CN112131000A (en) * 2020-09-23 2020-12-25 腾讯科技(深圳)有限公司 Memory release method and device for plug-in application program
CN112256286A (en) * 2020-10-21 2021-01-22 北京字节跳动网络技术有限公司 Application running method and device and computer storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123151A (en) * 2013-04-28 2014-10-29 百度在线网络技术(北京)有限公司 Plug-in management method and device for application program in mobile terminal and mobile terminal
CN104391716A (en) * 2014-11-14 2015-03-04 百度在线网络技术(北京)有限公司 Plug-in-based application program implementing method and device
CN104714828A (en) * 2015-03-31 2015-06-17 北京奇虎科技有限公司 Methods and devices for installing and operating application

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123151A (en) * 2013-04-28 2014-10-29 百度在线网络技术(北京)有限公司 Plug-in management method and device for application program in mobile terminal and mobile terminal
CN104391716A (en) * 2014-11-14 2015-03-04 百度在线网络技术(北京)有限公司 Plug-in-based application program implementing method and device
CN104714828A (en) * 2015-03-31 2015-06-17 北京奇虎科技有限公司 Methods and devices for installing and operating application

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107773984A (en) * 2016-08-26 2018-03-09 博雅网络游戏开发(深圳)有限公司 Chess and card games loading method and chess and card games system
CN106371850A (en) * 2016-09-19 2017-02-01 上海葡萄纬度科技有限公司 Method for establishing customizable desktop widget
CN108170485B (en) * 2016-12-05 2021-06-11 腾讯科技(深圳)有限公司 Plug-in loading method and device and mobile terminal
WO2018103610A1 (en) * 2016-12-05 2018-06-14 腾讯科技(深圳)有限公司 Plug-in loading method and device, terminal and storage medium
CN108170485A (en) * 2016-12-05 2018-06-15 腾讯科技(深圳)有限公司 A kind of plug-in loading method, device and mobile terminal
US11263027B2 (en) 2016-12-05 2022-03-01 Tencent Technology (Shenzhen) Company Limited Plugin loading method and apparatus, terminal, and storage medium
US10891141B2 (en) 2016-12-05 2021-01-12 Tencent Technology (Shenzhen) Company Limited Plugin loading method and apparatus, terminal, and storage medium
CN107463406A (en) * 2017-08-08 2017-12-12 上海连尚网络科技有限公司 Issue the method and electronic equipment of Mobile solution
CN109710334A (en) * 2018-12-29 2019-05-03 北京小米移动软件有限公司 Dynamic loading method, device and storage medium
CN109976787A (en) * 2019-03-12 2019-07-05 平安普惠企业管理有限公司 Application program updating method, apparatus, terminal and computer readable storage medium
CN109976787B (en) * 2019-03-12 2022-04-19 平安普惠企业管理有限公司 Application program upgrading method and device, terminal and computer readable storage medium
CN111475227B (en) * 2020-04-02 2022-02-01 深圳创维-Rgb电子有限公司 Business plug-in loading implementation method and device and terminal equipment
CN111475227A (en) * 2020-04-02 2020-07-31 深圳创维-Rgb电子有限公司 Business plug-in loading implementation method and device and terminal equipment
CN112131000A (en) * 2020-09-23 2020-12-25 腾讯科技(深圳)有限公司 Memory release method and device for plug-in application program
CN112131000B (en) * 2020-09-23 2024-02-06 腾讯科技(深圳)有限公司 Memory release method and device for plug-in application program
CN112256286A (en) * 2020-10-21 2021-01-22 北京字节跳动网络技术有限公司 Application running method and device and computer storage medium

Similar Documents

Publication Publication Date Title
CN105740033A (en) Terminal equipment, plug-in loading and running device and plug-in loading and running method
CN109976761B (en) Software development kit generation method and device and terminal equipment
CN107092475B (en) Calling method and device of interactive control
CN106055368B (en) application updating method and device
CN106844153B (en) Application program operation monitoring method and device and terminal
CN106325847B (en) Method and device for acquiring application program function based on iOS platform
US20220365773A1 (en) Run-Time Application Modification
JP7106001B2 (en) SUB-APPLICATION DEVELOPMENT METHOD, APPARATUS, COMPUTER DEVICE, AND COMPUTER PROGRAM
EP2859449A1 (en) Method and device for publishing and implementing wireless application
CN106569880B (en) Method and system for dynamically sharing resources between Android applications
CN111796823A (en) Method and device for updating page and displaying page and page maintenance system
CN104750528A (en) Management method and device for components in Android program
CN105577813A (en) Update method and system for web hybrid application
CN106406919A (en) Terminal device pre-loaded application management method and terminal device
JP7048663B2 (en) Code execution methods, devices, rendering devices, storage media, and programs
CN110716720A (en) Method and device for realizing application hot deployment
CN104699503A (en) Method and device for replacing function execution logic in Android system
CN112083968A (en) Plug-in loading method and device in host
CN112764836A (en) Method and device for running fast application and electronic equipment
CN114490103A (en) Operating system interface calling method and device and electronic equipment
CN111880801A (en) Application program dynamic method and device and electronic equipment
CN113157274B (en) Software development method and device based on micro front end, electronic equipment and storage medium
CN115129348A (en) Resource updating method, device and equipment of application program and readable storage medium
CN112748946B (en) Application program installation file generation method and device, computing equipment and storage medium
CN113791795A (en) Plug-in installation method, device, system, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20160902

Address after: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping square B radio tower 15 layer self unit 02

Applicant after: GUANGZHOU YOUSHI NETWORK TECHNOLOGY CO., LTD.

Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping square B radio tower 12 layer self unit 02

Applicant before: GUANGZHOU CAITONG NETWORK TECHNOLOGY CO., LTD.

RJ01 Rejection of invention patent application after publication

Application publication date: 20160706

RJ01 Rejection of invention patent application after publication