CN104123151B - The plug-in management method of application program, device and mobile terminal in mobile terminal - Google Patents

The plug-in management method of application program, device and mobile terminal in mobile terminal Download PDF

Info

Publication number
CN104123151B
CN104123151B CN201310156824.3A CN201310156824A CN104123151B CN 104123151 B CN104123151 B CN 104123151B CN 201310156824 A CN201310156824 A CN 201310156824A CN 104123151 B CN104123151 B CN 104123151B
Authority
CN
China
Prior art keywords
plug
unit
mobile terminal
application program
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310156824.3A
Other languages
Chinese (zh)
Other versions
CN104123151A (en
Inventor
史先方
李国庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201310156824.3A priority Critical patent/CN104123151B/en
Publication of CN104123151A publication Critical patent/CN104123151A/en
Application granted granted Critical
Publication of CN104123151B publication Critical patent/CN104123151B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention proposes plug-in management method, device and the mobile terminal of application program in a kind of mobile terminal, and wherein this method includes the following steps:Running of mobile terminal application program;Mobile terminal establishes the context environmental of corresponding plug-in unit according to application program;And based on context environment loads and runs plug-in unit mobile terminal.Method according to embodiments of the present invention on the one hand by the business function of plug-in unit load mechanism dynamically extension application, makes the exploitation of application program more decouple;Whole updating of the update of another aspect plug-in unit independent of application program, realizes the local updating of application program business function.

Description

The plug-in management method of application program, device and mobile terminal in mobile terminal
Technical field
The present invention relates to a kind of inserter tubes of application program in mobile equipment manufacturing technology field more particularly to mobile terminal Manage method, apparatus and mobile terminal.
Background technology
At present, mobile terminal realizes the extension to application program, mesh by module different inside development and application program It is preceding the problem is that, need during mobile terminal extension application a Development of Module complete after again to another module It is developed, and needs to be updated entire application program in update module after the completion of developing, lead to application program The development cycle of module is long, update efficiency is low, and the autgmentability of application program is poor.
Invention content
The present invention is directed at least solve one of above-mentioned technical problem.
For this purpose, first purpose of the present invention is to propose a kind of plug-in management method of application program in mobile terminal, On the one hand this method by the business function of plug-in unit load mechanism dynamically extension application, makes the exploitation of application program more Add decoupling;Whole updating of the update of another aspect plug-in unit independent of application program, realizes application program business function Local updating.
Second object of the present invention is to propose a kind of plug-in management device of application program in mobile terminal.
Third object of the present invention is to propose a kind of mobile terminal.
To achieve these goals, in the mobile terminal of first aspect present invention embodiment application program plug-in management side Method includes the following steps:Running of mobile terminal application program;The mobile terminal establishes corresponding plug-in unit according to the application program Context environmental;And the mobile terminal loads according to the context environmental and runs the plug-in unit.
The plug-in management method of application program in mobile terminal according to embodiments of the present invention, mobile terminal is by running The context environmental of corresponding plug-in unit is established after application program, and based on context environment load and runs plug-in unit, at least with The advantages of lower:(1)By the business function of plug-in unit load mechanism dynamically extension application, make the exploitation of application program more Add decoupling;(2)Can be with the multiple plug-in units of concurrent development, and can uniformly be integrated into application program at once after the completion of developing plug In, improve application development efficiency;(3)Mobile terminal can load in the case where being fitted without plug-in unit and run this and insert Part;(4)The plug-in unit of exploitation can carry out independent test, reduce the function in test and rely on and couple;(5)The update of plug-in unit is not Dependent on the whole updating of application program, the local updating of application program business function is realized.
To achieve these goals, the system registered by mobile terminal of second aspect of the present invention embodiment, packet It includes:Module is run, for running application program;Module is established, above and below according to the corresponding plug-in unit of application program foundation Literary environment;And load-on module, for the plug-in unit to be loaded and run according to the context environmental.
The plug-in management device of application program in mobile terminal according to embodiments of the present invention, mobile terminal is by running The context environmental of corresponding plug-in unit is established after application program, and based on context environment load and runs plug-in unit, at least with The advantages of lower:(1)By the business function of plug-in unit load mechanism dynamically extension application, make the exploitation of application program more Add decoupling;(2)Can be with the multiple plug-in units of concurrent development, and can uniformly be integrated into application program at once after the completion of developing plug In, improve application development efficiency;(3)Mobile terminal can load in the case where being fitted without plug-in unit and run this and insert Part;(4)The plug-in unit of exploitation can carry out independent test, reduce the function in test and rely on and couple;(5)The update of plug-in unit is not Dependent on the whole updating of application program, the local updating of application program business function is realized.
To achieve these goals, the mobile terminal of third aspect present invention embodiment, including second aspect of the present invention reality Apply the plug-in management device of application program in the mobile terminal of example.
Mobile terminal according to embodiments of the present invention, by the context ring that corresponding plug-in unit is established after application program is run Border, and based on context environment loads and runs plug-in unit, at least has the following advantages that:(1)It is movable by plug-in unit load mechanism State extension application business function, the exploitation of application program is made more to decouple;(2)Can with the multiple plug-in units of concurrent development, And can be uniformly integrated into application program at once after the completion of developing plug, improve application development efficiency;(3)It is mobile Terminal can load in the case where being fitted without plug-in unit and run the plug-in unit;(4)The plug-in unit of exploitation can carry out independent test, Reduce the function in test to rely on and couple;(5)Whole updating of the update of plug-in unit independent of application program, realizing should With the local updating of program traffic function.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partly become from the following description It obtains significantly or is recognized by the practice of the present invention.
Description of the drawings
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Significantly and it is readily appreciated that, wherein,
Fig. 1 is the flow chart of the plug-in management method of application program in mobile terminal according to an embodiment of the invention;
Fig. 2 is the flow of the plug-in management method of application program in the mobile terminal according to a specific embodiment of the invention Figure;
Fig. 3 is the stream of the plug-in management method of application program in the mobile terminal according to another specific embodiment of the invention Cheng Tu;
Fig. 4 is the structural representation of the plug-in management device of application program in mobile terminal according to an embodiment of the invention Figure;
Fig. 5 is the structure of the plug-in management device of application program in the mobile terminal according to a specific embodiment of the invention Schematic diagram;And
Fig. 6 is the knot of the plug-in management device of application program in the mobile terminal according to another specific embodiment of the invention Structure schematic diagram.
Specific embodiment
The embodiment of the present invention is described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached The embodiment of figure description is exemplary, and is only used for explaining the present invention, and is not considered as limiting the invention.On the contrary, this The embodiment of invention includes falling into all changes in the range of the spirit and intension of attached claims, modification and equivalent Object.
In the description of the present invention, it is to be understood that term " first ", " second " etc. are only used for description purpose, without It is understood that indicate or implying relative importance.In the description of the present invention, it should be noted that unless otherwise specific regulation And restriction, term " connected ", " connection " should be interpreted broadly, for example, it may be fixedly connected or be detachably connected, Or it is integrally connected;Can be mechanical connection or electrical connection;It can be directly connected, intermediary can also be passed through It is indirectly connected.For the ordinary skill in the art, the tool of above-mentioned term in the present invention can be understood with concrete condition Body meaning.In addition, in the description of the present invention, unless otherwise indicated, " multiple " are meant that two or more.
Any process described otherwise above or method description are construed as in flow chart or herein, represent to include Module, segment or the portion of the code of the executable instruction of one or more the step of being used to implement specific logical function or process Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discuss suitable Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, to perform function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Below with reference to the accompanying drawings the plug-in management method of application program in mobile terminal according to embodiments of the present invention, dress are described It puts and mobile terminal.
At present, mobile terminal extension application is realized by module different in development and application program, if Can be application program build a kind of new framework mode, such as in Android operation system, by the use of primary application program as The frame container of plug-in unit provides the entrance of the management of plug-in unit and the business of plug-in unit, can be by the combination of different plug-in units, in plug-in unit Dynamic load plug-in unit realizes the different business function of application program during operation, for this purpose, the present invention is proposed in a kind of mobile terminal The plug-in management method of application program, includes the following steps:Running of mobile terminal application program;Mobile terminal is according to application program Establish the context environmental of corresponding plug-in unit;And based on context environment loads and runs plug-in unit mobile terminal.
Fig. 1 is the flow chart of the plug-in management method of application program in mobile terminal according to an embodiment of the invention.
As shown in Figure 1, the plug-in management method of application program includes in mobile terminal:
S101, running of mobile terminal application program.
For example, application program could be provided as the frame container of plug-in unit, specific logic business is not handled, and plug-in unit is only provided Management function and each plug-in unit corresponding function entrance.Wherein, the management function of plug-in unit can include addition plug-in unit, delete and insert Part, online upgrading plug-in unit etc..
S102, mobile terminal establish the context environmental of corresponding plug-in unit according to application program.
For example, plug-in unit can be weather lookup plug-in unit, movie show information insert, inquiry preferential plug-in unit in restaurant etc., wherein, Each plug-in unit can be individual file, can be with * .apk(The application package of Android android system)Or * .jar (Java archive files)Etc. forms preserve.Specifically, the interface alternation of mobile terminal can be realized by movable Activity, be moved Dynamic terminal is by the context environmental of the corresponding plug-in unit of foundation, the class and resource that activity can be made to be directed toward in the plug-in unit.
S103, based on context environment loads and runs plug-in unit mobile terminal.
In one embodiment of the invention, based on context mobile terminal can also be inserted in environment unloading, update, upgrading Part.Specifically, mobile terminal can also be updated the version of plug-in unit by application program, upgrade, for example, when plug-in unit has newly It is reminded in the terminal during version, mobile terminal can be downloaded according to the instruction of user and update the plug-in unit.It moves as a result, Dynamic terminal may not need when updating plug-in unit is updated entire application program, realizes the office of application program business function Portion updates.
The plug-in management method of application program in mobile terminal according to embodiments of the present invention, mobile terminal is by running The context environmental of corresponding plug-in unit is established after application program, and based on context environment load and runs plug-in unit, at least with The advantages of lower:(1)By the business function of plug-in unit load mechanism dynamically extension application, make the exploitation of application program more Add decoupling;(2)Can be with the multiple plug-in units of concurrent development, and can uniformly be integrated into application program at once after the completion of developing plug In, improve application development efficiency;(3)Mobile terminal can load in the case where being fitted without plug-in unit and run this and insert Part;(4)The plug-in unit of exploitation can carry out independent test, reduce the function in test and rely on and couple;(5)The update of plug-in unit is not Dependent on the whole updating of application program, the local updating of application program business function is realized.
Fig. 2 is the flow of the plug-in management method of application program in the mobile terminal according to a specific embodiment of the invention Figure.
Mobile terminal can be created by the Classloader DexClassLoader of application program by the file path of plug-in unit Context environmental is built, specifically as shown in Fig. 2, the plug-in management method of application program includes in mobile terminal:
S201, running of mobile terminal application program.
For example, application program could be provided as the frame container of plug-in unit, specific logic business is not handled, and plug-in unit is only provided Management function and each plug-in unit corresponding function entrance.Wherein, the management function of plug-in unit can include addition plug-in unit, delete and insert Part, online upgrading plug-in unit etc..
S202, mobile terminal obtain the Classloader of application program according to the file path of plug-in unit.Wherein, mobile terminal Interface alternation can realize that the context environmental of each activity association has Classloader by activity, pass through Classloader reality The loading of the class and resource of existing current application program.Specifically, mobile terminal constructs Classloader according to the file path of plug-in unit, Such as the canonical function of Classloader can be called to be passed to the file path of plug-in unit to construct Classloader.
For example, plug-in unit can be weather lookup plug-in unit, movie show information insert, inquiry preferential plug-in unit in restaurant etc., wherein, Each plug-in unit can be individual file, can be with * .apk(The application package of Android android system)Or * .jar (Java archive files)Etc. file formats preserve.
S203, mobile terminal create the context environmental of plug-in component operation according to the file path of Classloader and plug-in unit.
Wherein, what is given tacit consent in context environmental is that mobile terminal passes through the class in context environmental loading current application program And resource.Specifically, mobile terminal establishes the context environmental of corresponding plug-in unit, and the road of the plug-in unit by being passed to Classloader Diameter, the class and resource that context environmental is made to be directed toward in the plug-in unit.
S204, based on context environment loads and runs plug-in unit mobile terminal.
In one embodiment of the invention, based on context mobile terminal can also be inserted in environment unloading, update, upgrading Part.Specifically, mobile terminal can also be updated the version of plug-in unit by application program, upgrade, for example, when plug-in unit has newly It is reminded in the terminal during version, mobile terminal can be downloaded according to the instruction of user and update the plug-in unit.It moves as a result, Dynamic terminal may not need when updating plug-in unit is updated entire application program, realizes the office of application program business function Portion updates.
The plug-in management method of application program, mobile terminal are loaded by class in mobile terminal according to embodiments of the present invention Device obtains the file path of plug-in unit, can create context environmental according to file path.
Fig. 3 is the stream of the plug-in management method of application program in the mobile terminal according to another specific embodiment of the invention Cheng Tu.
Mobile terminal can be by constructing the explorer AssetManager of plug-in unit, constructing the resource object of plug-in unit Resources examples, construct plug-in unit the several steps of subject Theme examples create context in the terminal to realize Environment.Specifically as shown in figure 3, the plug-in management method of application program includes in mobile terminal:
S301, running of mobile terminal application program.
For example, application program could be provided as the frame container of plug-in unit, specific logic business is not handled, and plug-in unit is only provided Management function and each plug-in unit corresponding function entrance.Wherein, the management function of plug-in unit can include addition plug-in unit, delete and insert Part, online upgrading plug-in unit etc..
S302, mobile terminal obtain the Classloader of application program according to the file path of plug-in unit.
Wherein, the interface alternation of mobile terminal can realize that the context environmental of each activity association has by activity Classloader realizes the loading of the class and resource of current application program by Classloader.Specifically, mobile terminal is according to plug-in unit File path construction Classloader, such as the canonical function of Classloader can be called to be passed to the file path of plug-in unit to construct Classloader.
For example, plug-in unit can be weather lookup plug-in unit, movie show information insert, inquiry preferential plug-in unit in restaurant etc., wherein, Each plug-in unit can be individual file, can be with * .apk(The application package of Android android system)Or * .jar (Java archive files)Etc. file formats preserve.
S303, the current explorer of acquisition for mobile terminal, and resource manager object is established according to explorer, And file path is added in into resource manager object.
Wherein, the context environmental of the activity association of mobile terminal also has explorer, resource object and subject. Specifically, mobile terminal can pass through explorer class object after obtaining current resource managers by getAssets methods NewInstance methods establish a resource manager object, then pass through reflection and call explorer AddAssetPath methods add in the file path of plug-in unit into explorer, so that the explorer of mobile terminal refers to Class and resource into the plug-in unit.
S304, the current resource object of acquisition for mobile terminal, and the resource manager object for adding in file path is added in Into resource object.
Specifically, mobile terminal obtains current resource object by getResourcre, and passes through calling resource object The resource manager object for adding in file path is added in resource object by the constructed fuction of class, so that the resource of mobile terminal Object is directed toward class and resource in the plug-in unit.
S305, mobile terminal obtains subject according to the resource object for adding in resource manager object, to be added according to class Device, the resource manager object for adding in file path, the resource object for adding in resource manager object and subject is carried to establish Context environmental.
Specifically, mobile terminal obtains current subject by getTheme, and calls resource object NewTheme methods obtain subject, and according to Classloader, the resource manager object of addition file path, addition resource The resource object and subject of manager object establish context environmental so that context environmental be directed toward class in the plug-in unit and Resource.
In one embodiment of the invention, mobile terminal based on context established by reflex mechanism in plug-in unit by environment Class and object.Specifically, after the completion of context environmental is established, when mobile terminal needs to load the code in plug-in unit, according to upper and lower Literary relationship makes activity return to class and resource in plug-in unit, it is only necessary to can be loaded or be built in plug-in unit using the reflex mechanism of Java Class and object.
S306, based on context environment loads and runs plug-in unit mobile terminal.
In one embodiment of the invention, based on context mobile terminal can also be inserted in environment unloading, update, upgrading Part.Specifically, mobile terminal can also be updated the version of plug-in unit by application program, upgrade, for example, when plug-in unit has newly It is reminded in the terminal during version, mobile terminal can be downloaded according to the instruction of user and update the plug-in unit.It moves as a result, Dynamic terminal may not need when updating plug-in unit is updated entire application program, realizes the office of application program business function Portion updates.
The plug-in management method of application program in mobile terminal according to embodiments of the present invention, mobile terminal is by rewriting class Loader, explorer, resource object and subject can create context environmental.
In order to realize above-described embodiment, the present invention also proposes a kind of plug-in management device of application program in mobile terminal.
The plug-in management device of application program in a kind of mobile terminal, including:Module is run, for running application program; Module is established, for establishing the context environmental of corresponding plug-in unit according to application program;And load-on module, for based on context Environment loads and runs plug-in unit.
Fig. 4 is the structural representation of the plug-in management device of application program in mobile terminal according to an embodiment of the invention Figure.
As shown in figure 4, the plug-in management device of application program includes in mobile terminal:Operation module 100 establishes module 200 and load-on module 300.
Specifically, operation module 100 is used to run application program.For example, application program could be provided as the frame of plug-in unit Container does not handle specific logic business, only provides the management function of plug-in unit and the entrance of each plug-in unit corresponding function.Wherein, The management function of plug-in unit can include addition plug-in unit, delete plug-in unit, online upgrading plug-in unit etc..
The application program that module 200 is established for being run according to operation module 100 establishes the context environmental of corresponding plug-in unit. For example, plug-in unit can be weather lookup plug-in unit, movie show information insert, inquiry preferential plug-in unit in restaurant etc., wherein, each plug-in unit Can be individual file, it can be with * .apk(The application package of Android android system)Or * .jar(Java filing texts Part)Etc. forms preserve.Specifically, the interface alternation of mobile terminal can be realized by activity, established module 200 and passed through foundation pair The context environmental of plug-in unit is answered, the class and resource that activity can be made to be directed toward in the plug-in unit.
Load-on module 300 is used to be loaded according to the context environmental for establishing the foundation of module 200 and runs plug-in unit.
In one embodiment of the invention, load-on module 300 can also based on context environment unloading, update, upgrading Plug-in unit.Specifically, load-on module 300 can also be updated the version of plug-in unit by application program, upgrade, for example, when inserting Part is reminded in the terminal when having new version, and load-on module 300 can be downloaded according to the instruction of user and update this and insert Part.Mobile terminal may not need when updating plug-in unit and entire application program be updated as a result, realize application program industry The local updating for function of being engaged in.
The plug-in management device of application program in mobile terminal according to embodiments of the present invention, mobile terminal is by running The context environmental of corresponding plug-in unit is established after application program, and based on context environment load and runs plug-in unit, at least with The advantages of lower:(1)By the business function of plug-in unit load mechanism dynamically extension application, make the exploitation of application program more Add decoupling;(2)Can be with the multiple plug-in units of concurrent development, and can uniformly be integrated into application program at once after the completion of developing plug In, improve application development efficiency;(3)Mobile terminal can load in the case where being fitted without plug-in unit and run this and insert Part;(4)The plug-in unit of exploitation can carry out independent test, reduce the function in test and rely on and couple;(5)The update of plug-in unit is not Dependent on the whole updating of application program, the local updating of application program business function is realized.
Fig. 5 is the structure of the plug-in management device of application program in the mobile terminal according to a specific embodiment of the invention Schematic diagram.
As shown in figure 5, the plug-in management device of application program includes in mobile terminal:Operation module 100 establishes module 200th, load-on module 300, acquiring unit 210 and creating unit 220, wherein, it establishes module 200 and includes acquiring unit 210 and wound Build unit 220.
Specifically, acquiring unit 210 is used to obtain the Classloader of application program according to the file path of plug-in unit.Wherein, Acquiring unit 210 constructs Classloader according to the file path of plug-in unit, such as the canonical function of Classloader can be called to be passed to The file path of plug-in unit is to construct Classloader.
Creating unit 220 is used to create the context environmental of plug-in component operation according to the file path of Classloader and plug-in unit. Wherein, what is given tacit consent in context environmental is that mobile terminal passes through the class and resource in context environmental loading application programs.More Body, creating unit 220 establishes the context environmental of corresponding plug-in unit, and the path of the plug-in unit by being passed to Classloader, makes Hereafter environment is directed toward class and resource in the plug-in unit.
The plug-in management device of application program, mobile terminal are loaded by class in mobile terminal according to embodiments of the present invention Device obtains the file path of plug-in unit, can create context environmental according to file path.
Fig. 6 is the knot of the plug-in management device of application program in the mobile terminal according to another specific embodiment of the invention Structure schematic diagram.
As shown in fig. 6, the plug-in management device of application program includes in mobile terminal:Operation module 100 establishes module 200th, load-on module 300, acquiring unit 210, creating unit 220, first add in subelement 221, second add in subelement 222, It obtains subelement 223 and establishes subelement 224, wherein, it establishes module 200 and includes acquiring unit 210 and creating unit 220, wound Unit 220 is built to include the first addition addition of subelement 221, second subelement 222, obtain subelement 223 and establish subelement 224。
Specifically, the first addition subelement 221 is used to obtain current explorer, and establish according to explorer Resource manager object and file path is added in into resource manager object.Wherein, the activity association of mobile terminal Context environmental also has explorer, resource object and subject.More specifically, the first addition subelement 221 passes through GetAssets methods can be built after obtaining current resource managers by the newInstance methods of explorer class object A resource manager object is found, is then added in the file path of plug-in unit to money by the method that explorer is called in reflection In source manager, so that the explorer of mobile terminal is directed toward class and resource in the plug-in unit.
Second addition subelement 222 is used to obtain current resource object, and the explorer that will add in file path Object is added in into resource object.More specifically, the second addition subelement 222 obtains current resource by getResourcre Object, and pass through and call the constructed fuction of resource object class that the resource manager object for adding in file path is added to resource pair As in, so that the resource object of mobile terminal is directed toward class and resource in the plug-in unit.
Subelement 223 is obtained to be used to obtain subject according to the resource object of the resource manager object of addition.More Body, it obtains subelement 223 and current subject is obtained by getTheme, and call the newTheme methods of resource object Obtain subject.
Subelement 224 is established for according to Classloader, the resource manager object of addition file path, addition resource pipe The resource object and subject for managing device object establish context environmental.Wherein, what is given tacit consent in context environmental is mobile terminal Pass through the class and resource in context environmental loading application programs.More specifically, establish subelement 224 according to Classloader, plus Enter the resource manager object of file path, the resource object of addition resource manager object and subject and establish context ring Border, so that context environmental is directed toward class and resource in the plug-in unit.
The plug-in management device of application program in mobile terminal according to embodiments of the present invention, mobile terminal is by rewriting class Loader, explorer, resource object and subject can create context environmental.
In one embodiment of the invention, it establishes subelement 224 and is additionally operable to based on context environment and pass through reflex mechanism Establish the class and object in plug-in unit.Specifically, after the completion of context environmental is established, subelement 224 is established in mobile terminal needs When loading the code in plug-in unit, based on context relationship makes activity return to class and resource in plug-in unit, it is only necessary to utilize Java's Reflex mechanism can load or build class and object in plug-in unit.
In order to realize above-described embodiment, the present invention also proposes a kind of mobile terminal.
A kind of mobile terminal includes the plug-in management of application program in the mobile terminal described in any one of present invention embodiment Device.
Mobile terminal according to embodiments of the present invention, by the context ring that corresponding plug-in unit is established after application program is run Border, and based on context environment loads and runs plug-in unit, at least has the following advantages that:(1)It is movable by plug-in unit load mechanism State extension application business function, the exploitation of application program is made more to decouple;(2)Can with the multiple plug-in units of concurrent development, And can be uniformly integrated into application program at once after the completion of developing plug, improve application development efficiency;(3)It is mobile Terminal can load in the case where being fitted without plug-in unit and run the plug-in unit;(4)The plug-in unit of exploitation can carry out independent test, Reduce the function in test to rely on and couple;(5)Whole updating of the update of plug-in unit independent of application program, realizing should With the local updating of program traffic function.
It should be appreciated that in an embodiment of the present invention, mobile terminal can be mobile phone, tablet computer, personal digital assistant, E-book etc. has the hardware device of various operating systems.
It should be appreciated that each section of the present invention can be realized with hardware, software, firmware or combination thereof.Above-mentioned In embodiment, software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage Or firmware is realized.If for example, with hardware come realize in another embodiment, can be under well known in the art Any one of row technology or their combination are realized:With for the logic gates to data-signal realization logic function Discrete logic, have suitable combinational logic gate circuit application-specific integrated circuit, programmable gate array(PGA), scene Programmable gate array(FPGA)Deng.
In the description of this specification, reference term " one embodiment ", " example ", " is specifically shown " some embodiments " The description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example description Point is contained at least one embodiment of the present invention or example.In the present specification, schematic expression of the above terms are not Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any One or more embodiments or example in combine in an appropriate manner.
Although an embodiment of the present invention has been shown and described, it will be understood by those skilled in the art that:Not In the case of being detached from the principle of the present invention and objective a variety of change, modification, replacement and modification can be carried out to these embodiments, this The range of invention is limited by claim and its equivalent.

Claims (7)

1. the plug-in management method of application program in a kind of mobile terminal, which is characterized in that include the following steps:
Running of mobile terminal application program, wherein, the application program is set as the frame container of plug-in unit, provides the management of plug-in unit The entrance of function and each plug-in unit corresponding function;
The mobile terminal obtains the Classloader of the application program according to the file path of plug-in unit;
The current explorer of the acquisition for mobile terminal, and the explorer pair is established according to the explorer As and by the file path is added in into the resource manager object;
The current resource object of the acquisition for mobile terminal, and the resource manager object for adding in the file path is added Enter into the resource object;
The mobile terminal obtains subject according to the resource object for adding in the resource manager object, with according to institute It states Classloader, the resource manager object for adding in the file path, add in the described of the resource manager object Resource object and the subject establish context environmental, so that the context environmental is directed toward the class and money of the plug-in unit Source;
The mobile terminal loads according to the context environmental and runs the plug-in unit.
2. it according to the method described in claim 1, it is characterized in that, further includes:
The mobile terminal establishes class and object in the plug-in unit according to the context environmental by reflex mechanism.
3. according to claim 1-2 any one of them methods, which is characterized in that the mobile terminal is according to the context ring Border unloads, updates, upgrading the plug-in unit.
4. a kind of plug-in management device of application program in mobile terminal, which is characterized in that including:
Module is run, for running application program, wherein, the application program is set as the frame container of plug-in unit, provides plug-in unit Management function and each plug-in unit corresponding function entrance;
Module is established, wherein, the module of establishing includes:Acquiring unit and creating unit, the acquiring unit are used for according to slotting The file path of part obtains the Classloader of the application program;The creating unit adds including the first addition subelement, second Entering subelement, obtain subelement and establish subelement, the first addition subelement is used to obtain current explorer, and The resource manager object is established according to the explorer and adds in the file path to the resource management In device object;The second addition subelement is used to obtain current resource object, and will add in described in the file path Resource manager object is added in into the resource object;The acquisition subelement is used for according to the addition explorer pair The resource object of elephant obtains subject;The subelement of establishing is for according to the Classloader, the addition file The resource manager object in path, the resource object for adding in the resource manager object and the subject are built Vertical context environmental, so that the context environmental is directed toward the class and resource of the plug-in unit;
Load-on module, for the plug-in unit to be loaded and run according to the context environmental.
5. device according to claim 4, which is characterized in that the subelement of establishing is additionally operable to:
The class and object in the plug-in unit are established by reflex mechanism according to the context environmental.
6. according to claim 4-5 any one of them devices, which is characterized in that the load-on module is additionally operable to:
It is unloaded, updated according to the context environmental, upgrading the plug-in unit.
7. a kind of mobile terminal, which is characterized in that including application program in claim 4-6 any one of them mobile terminals Plug-in management device.
CN201310156824.3A 2013-04-28 2013-04-28 The plug-in management method of application program, device and mobile terminal in mobile terminal Active CN104123151B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310156824.3A CN104123151B (en) 2013-04-28 2013-04-28 The plug-in management method of application program, device and mobile terminal in mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310156824.3A CN104123151B (en) 2013-04-28 2013-04-28 The plug-in management method of application program, device and mobile terminal in mobile terminal

Publications (2)

Publication Number Publication Date
CN104123151A CN104123151A (en) 2014-10-29
CN104123151B true CN104123151B (en) 2018-07-10

Family

ID=51768576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310156824.3A Active CN104123151B (en) 2013-04-28 2013-04-28 The plug-in management method of application program, device and mobile terminal in mobile terminal

Country Status (1)

Country Link
CN (1) CN104123151B (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536776B (en) * 2014-11-28 2018-11-23 百度在线网络技术(北京)有限公司 A kind of method and apparatus running plug-in application in the plug-in component operation environment of host end
CN104461583B (en) * 2014-12-30 2018-08-03 北京奇虎科技有限公司 A kind of method, apparatus and mobile terminal for calling resources-type application
CN104679572B (en) * 2015-03-26 2017-09-22 北京神舟航天软件技术有限公司 Plug-in unit based on preload mechanisms supports method
CN104731625B (en) * 2015-03-27 2019-02-26 北京奇虎科技有限公司 A kind of method, apparatus and mobile terminal loading plug-in unit
CN104714828B (en) * 2015-03-31 2017-06-09 北京奇虎科技有限公司 Using installation, operation method and device
CN105094849B (en) * 2015-08-25 2019-05-28 百度在线网络技术(北京)有限公司 A kind of resource transfer method and apparatus of plug-in unit
CN106557343A (en) * 2015-09-30 2017-04-05 阿里巴巴集团控股有限公司 Systematic function application and the method and device of loading resource
CN105867956A (en) * 2015-10-28 2016-08-17 乐视网信息技术(北京)股份有限公司 Method and device for showing plugin view element in host application page
CN105872708A (en) * 2015-12-30 2016-08-17 乐视致新电子科技(天津)有限公司 Display desktop generation method, display desktop generation system and smart television
CN107122200A (en) * 2016-02-25 2017-09-01 博雅网络游戏开发(深圳)有限公司 Load plug-in unit SDK method, system and client
CN105740033A (en) * 2016-03-15 2016-07-06 广州彩瞳网络技术有限公司 Terminal equipment, plug-in loading and running device and plug-in loading and running method
CN106293817A (en) * 2016-08-01 2017-01-04 乐视控股(北京)有限公司 A kind of method and device replacing plug-in unit
CN106339237B (en) * 2016-08-16 2019-11-12 税友软件集团股份有限公司 For the plug-in unit loading frame and method of the field JavaEE WEB application
CN109388066A (en) * 2017-08-04 2019-02-26 阿里巴巴集团控股有限公司 Methods, devices and systems for process container
CN108845842A (en) * 2018-04-18 2018-11-20 北京奇虎科技有限公司 It is multiplexed the method and device of view
CN109542537A (en) * 2018-11-15 2019-03-29 江苏东洲物联科技有限公司 A kind of edge calculations gateway based on micro services framework
CN109597623A (en) * 2018-12-05 2019-04-09 上海中商网络股份有限公司 A kind of plug-in management method, device, equipment and storage medium
CN110007980B (en) * 2019-01-29 2022-05-24 创新先进技术有限公司 Method and device for realizing multi-service server
CN111666090B (en) * 2020-06-10 2022-09-20 贵州电子商务云运营有限责任公司 Online updating support system for application system extension assembly
CN113778554A (en) * 2021-09-01 2021-12-10 粒子文化科技集团(杭州)股份有限公司 Plug-in processing method, electronic device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081535A (en) * 2010-12-17 2011-06-01 东莞宇龙通信科技有限公司 Android-based application program upgrading method and system and application development platform
CN102830992A (en) * 2012-07-31 2012-12-19 北京奇虎科技有限公司 Plug-in loading method and system
CN102915247A (en) * 2012-08-31 2013-02-06 杭州斯凯网络科技有限公司 APK (Android Package) plug-in management method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081535A (en) * 2010-12-17 2011-06-01 东莞宇龙通信科技有限公司 Android-based application program upgrading method and system and application development platform
CN102830992A (en) * 2012-07-31 2012-12-19 北京奇虎科技有限公司 Plug-in loading method and system
CN102915247A (en) * 2012-08-31 2013-02-06 杭州斯凯网络科技有限公司 APK (Android Package) plug-in management method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
获取未安装APK文件的图标;明轩子;《http://blog.csdn.net/twoicewoo/article/details/7302116》;20120228;第1-2页 *

Also Published As

Publication number Publication date
CN104123151A (en) 2014-10-29

Similar Documents

Publication Publication Date Title
CN104123151B (en) The plug-in management method of application program, device and mobile terminal in mobile terminal
US11586461B2 (en) Service creation and management
CN103336703B (en) The method of generation upgrade package, server, method for upgrading software, mobile terminal
JP7218447B2 (en) Policy control method, device and system
CN112286529B (en) Front-end page development method, device, equipment and storage medium
EP3200393B1 (en) Method and device for virtual network function management
US9396040B2 (en) Method and apparatus for providing multi-level distributed computations
CN105867956A (en) Method and device for showing plugin view element in host application page
WO2019029451A1 (en) Method for publishing mobile applications and electronic apparatus
CN108809683A (en) Dispose the method and device of cloud application system
EP4145359A1 (en) Method and apparatus for transferring machine learning model parameter
CN104572054A (en) Capability calling method and capability calling equipment
CN106469071A (en) Application program subject replacement method and device
US9549349B2 (en) Handover in a telecommunications system with distributed processing
CN105959302A (en) Terminal management framework and method
CN104424333A (en) Method and system for loading table data
CN109039730A (en) Server cluster and server cluster configuration information management method
CN113127000B (en) Compiling method, compiling device, compiling equipment and compiling storage medium for application program component
CN108595331A (en) Test method, medium, device and the computing device of asynchronous interface
CN109905258A (en) Management method, device and the storage medium of PaaS
CN103309690B (en) Process method and the electronic equipment of data
CN109683992B (en) Method and apparatus for managing objects
CN108334374A (en) The method and apparatus of component dynamic load and execution
CN112130888A (en) Method, device and equipment for updating application program and computer storage medium
US20120136747A1 (en) Service creation system and implementing method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant