CN104731625B - A kind of method, apparatus and mobile terminal loading plug-in unit - Google Patents

A kind of method, apparatus and mobile terminal loading plug-in unit Download PDF

Info

Publication number
CN104731625B
CN104731625B CN201510142846.3A CN201510142846A CN104731625B CN 104731625 B CN104731625 B CN 104731625B CN 201510142846 A CN201510142846 A CN 201510142846A CN 104731625 B CN104731625 B CN 104731625B
Authority
CN
China
Prior art keywords
plug
unit
context
resource
list
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.)
Expired - Fee Related
Application number
CN201510142846.3A
Other languages
Chinese (zh)
Other versions
CN104731625A (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 Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510142846.3A priority Critical patent/CN104731625B/en
Publication of CN104731625A publication Critical patent/CN104731625A/en
Application granted granted Critical
Publication of CN104731625B publication Critical patent/CN104731625B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention provides a kind of method, apparatus and mobile terminal for loading plug-in unit, are related to computer field.The embodiment of the present invention passes through when plug-in unit is triggered, obtain the resource of plug-in unit, the context of newly-built plug-in unit, it and is in advance that the context of the distribution of the main application of plug-in unit replaces with the context of plug-in unit by operating system, according to the resource of the context load plug-in unit after being replaced, the problem of can solve under Android native system since the resource that cannot load plug-in unit caused by plug-in unit context cannot be obtained, and this method does not influence other objects that system generates, it not will lead to compatibility issue, even if evolution has occurred in system, plug-in unit still is able to correctly load.

Description

A kind of method, apparatus and mobile terminal loading plug-in unit
Technical field
The present invention relates to computer fields, and in particular to a kind of method, apparatus and mobile terminal for loading plug-in unit.
Background technique
Currently, Android (Android) operating system is widely used in field of mobile terminals, a large amount of mobile phone, Tablet computer uses Android operation system.Android operation system uses linux kernel, due to the safety of linux kernel Mechanism, along with the special mechanism of the dalvik of Android operation system, the application program in Android operation system is difficult It is extended.
Under Android operation system, after the apk of application program is mounted in operating system, it is difficult to be extended. It to small upgrading is carried out in application program, requires again to be packaged code, user need to reuse new apk and carry out Installation, so that the application program in android system is less flexible.
Recently there is Plugin Mechanism, by the function division module of application, each module corresponds to a plug-in unit and concentrates on In one apk.There is this Plugin Mechanism, when being expanded or being upgraded to application program, it is only necessary to change corresponding plug-in unit ?.
Currently, the load to plug-in unit is realized under Android operation system by DexClassLoader.But usually In the case of, a plug-in unit is made of the part such as class, resource, and the resource of plug-in unit may include the contents such as its interface images, background music, And DexClassLoader can only realize the load to the class of plug-in unit, but can not achieve the load to the resource of plug-in unit, will lead to The problems such as showing mistake after plug-in unit load, can not showing completely.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State method, correspondingly device and the mobile terminal of a kind of load plug-in unit of problem.
According to one aspect of the present invention, a kind of method loading plug-in unit is provided, comprising:
When plug-in unit is triggered, the resource of the plug-in unit is obtained;
The context context of the plug-in unit is created, and is in advance the distribution of the main application of the plug-in unit by operating system Context replace with the context of the plug-in unit, wherein the context of the plug-in unit is directed toward the resource of the plug-in unit;
The main application loads the resource of the plug-in unit according to the context after being replaced, wherein it is described be replaced after Context is the context of the plug-in unit.
Optionally, before the resource for obtaining the plug-in unit, further includes:
Obtain the installation kit archive information of the plug-in unit.
Optionally, the installation kit archive information for obtaining the plug-in unit, comprising:
Obtain the PackageManager object of the plug-in unit;
According to the installation kit archive information of plug-in unit described in the PackageManager object acquisition;
Design variables under the installation kit archive information are revised as preset path;
Wherein, the preset path is the store path of the plug-in unit.
Optionally, before the context for creating the plug-in unit, the method also includes:
Create the DexClassLoader class of the plug-in unit;
Wherein, the DexClassLoader class is used to transmit the executable code path of the plug-in unit.
Optionally, the context context for creating the plug-in unit, and be in advance the master of the plug-in unit by operating system The context of the distribution of application replaces with the context of the plug-in unit, comprising:
The context for being inherited from ContextThemeWrapper class is established for the plug-in unit;
It rewrites for loading the resource of the plug-in unit and the method function of executable code, in the function after the rewriting Return to the context of the plug-in unit.
It is optionally, described for loading the method function of the resource and executable code of the plug-in unit, comprising:
GetClassLoader, getResources and getAssets.
Optionally, before the plug-in unit is triggered or when the plug-in unit is triggered, the method also includes:
Judge whether the plug-in unit can be used;
When the plug-in unit is unavailable, the request for obtaining plug-in unit list is sent to server;Wherein, in the plug-in unit list Under plugin name, plug-in version, the digital digest value of plug-in unit and the plug-in unit of preserving plug-in unit included by the main application Set address.
Receive the plug-in unit list sent;
The plug-in unit of new version is downloaded according to the download address of plug-in unit described in the plug-in unit list.
Optionally, after the plug-in unit of the download address downloading new version of the plug-in unit according to the plug-in unit list, The method also includes:
The digest value saved in the digital digest value and plug-in unit list of the plug-in unit of new version that verifying downloading obtains whether phase Together, when identical, the step of executing the resource for obtaining the plug-in unit.
Optionally, the method also includes;
The ClassLoader object of replacement operation system is the main customized ClassLoader object of application;
Wherein, the customized ClassLoader object for realizing the plug-in unit load.
According to another aspect of the invention, a kind of device loading plug-in unit is provided, comprising:
Source obtaining module, suitable for obtaining the resource of the plug-in unit when plug-in unit is triggered;
First establishes module, suitable for creating the context context of the plug-in unit, and is in advance described insert by operating system The context of the distribution of the main application of part replaces with the context of the plug-in unit, wherein the context of the plug-in unit is directed toward institute State the resource of plug-in unit;
Loading module loads the resource of the plug-in unit suitable for the main application according to the context after being replaced, wherein It is described be replaced after context be the plug-in unit context.
Optionally, described device further include:
Data obtaining module, the installation kit suitable for before the resource for obtaining the plug-in unit, obtaining the plug-in unit achieve letter Breath.
Optionally, the data obtaining module, comprising:
Object acquisition unit, suitable for obtaining the PackageManager object of the plug-in unit;
Information acquisition unit, the installation kit suitable for the plug-in unit according to the PackageManager object acquisition achieve letter Breath;
Variable modifies unit, suitable for the design variables under the installation kit archive information are revised as preset path;
Wherein, the preset path is the store path of the plug-in unit.
Optionally, described device further include:
Second establishes module, suitable for creating the plug-in unit before the context for creating the plug-in unit DexClassLoader class;
Wherein, the DexClassLoader class is used to transmit the executable code path of the plug-in unit.
Optionally, it described first establishes module and includes:
Context establishes unit, is suitable for the plug-in unit foundation and is inherited from ContextThemeWrapper class context;
Rewriting unit, suitable for rewriteeing for loading the resource of the plug-in unit and the method function of executable code, described The context of the plug-in unit is returned in function after rewriting.
It is optionally, described for loading the method function of the resource and executable code of the plug-in unit, comprising:
GetClassLoader, getResources and getAssets.
Optionally, described device further include: plug-in download module;
The plug-in download module includes:
Judging unit can be used, suitable for before the plug-in unit is triggered or when the plug-in unit is triggered, judging that the plug-in unit is It is no available;
Request transmitting unit is suitable for when the plug-in unit is unavailable, and the request for obtaining plug-in unit list is sent to server;Its In, the plugin name of plug-in unit included by the main application, plug-in version, the number of plug-in unit are preserved in the plug-in unit list plucks It is worth and the download address of plug-in unit.
List reception unit, suitable for receiving the plug-in unit list sent;
Plug-in download unit, the download address suitable for the plug-in unit according to the plug-in unit list download inserting for new version Part.
Optionally, described device further include:
Authentication module, suitable for the plug-in unit according to the plug-in unit list download address downloading new version plug-in unit it Afterwards, whether the digest value saved in the digital digest value and plug-in unit list of the plug-in unit for the new version that verifying downloading obtains is identical, when When identical, the step of executing the resource for obtaining the plug-in unit.
Optionally, described device further includes;
Entrance realizes module, and the ClassLoader object suitable for replacement operation system is that the main application is customized ClassLoader object;
Wherein, the customized ClassLoader object for realizing the plug-in unit load.
According to another aspect of the invention, a kind of mobile terminal is provided, the mobile terminal includes:
Memory;
One or more processors;
Wherein, one or more of processors are configured as executing following method:
When plug-in unit is triggered, the resource of the plug-in unit is obtained;
The context context of the plug-in unit is created, and is in advance the distribution of the main application of the plug-in unit by operating system Context replace with the context of the plug-in unit, wherein the context of the plug-in unit is directed toward the resource of the plug-in unit;
The main application loads the resource of the plug-in unit according to the context after being replaced, wherein it is described be replaced after Context is the context of the plug-in unit.
The embodiment of the invention provides a kind of method, apparatus and mobile terminal for loading plug-in unit, by being triggered when plug-in unit When, the resource of plug-in unit is obtained, the context of plug-in unit is created, and is in advance the distribution of the main application of plug-in unit by operating system Context replaces with the context of plug-in unit, according to the resource of the context load plug-in unit after being replaced, can solve The problem of under Android native system since the resource that cannot load plug-in unit caused by plug-in unit context cannot be obtained, and should Method does not influence other objects that system generates, and not will lead to compatibility issue, even if evolution has occurred in system, plug-in unit is still So can correctly it load.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
According to the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will be brighter The above and other objects, advantages and features of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is a kind of method flow diagram for loading plug-in unit provided by one embodiment of the present invention;
Fig. 2 is a kind of specific method flow chart for loading plug-in unit provided by one embodiment of the present invention;
Fig. 3 is a kind of apparatus structure block diagram for loading plug-in unit provided by one embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without the implementation that should be illustrated here Example is limited.It is to be able to thoroughly understand the disclosure on the contrary, providing these embodiments, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Embodiment one
The embodiment of the invention provides a kind of methods for loading plug-in unit.It can be by the application program under Android Realization is improved, is implemented on the terminal device for being equipped with Android operation system, such as mobile phone, plate, handheld computer etc. Customer mobile terminal equipment.
Fig. 1 is a kind of method flow diagram for loading plug-in unit provided in this embodiment.This method specifically includes step S102 extremely Step S106.
S102: when plug-in unit is triggered, the resource of plug-in unit is obtained.
S104: the context of newly-built plug-in unit, and be in advance the context of the distribution of the main application of plug-in unit by operating system Replace with the context of plug-in unit.
Wherein, the context of plug-in unit is directed toward the resource of plug-in unit.
S106: main application loads the resource of plug-in unit according to the context after being replaced, wherein the context after being replaced For the context of plug-in unit.
The embodiment of the invention provides a kind of methods for loading plug-in unit.When plug-in unit is triggered, the resource of plug-in unit is obtained, newly The context of plug-in unit is built, and is in advance that the context of the distribution of the main application of plug-in unit replaces with plug-in unit by operating system Context can solve under Android native system according to the resource of the context load plug-in unit after being replaced due to not The problem of resource that plug-in unit cannot be loaded caused by plug-in unit context can be obtained, and this method system is generated other are right As not influencing, compatibility issue not will lead to, even if evolution has occurred in system, plug-in unit still is able to correctly load.
Embodiment two
The present embodiment is a kind of concrete application scene of above-described embodiment one, through this embodiment, being capable of clearer, tool Illustrate to body method provided by the present invention.
As shown in Fig. 2, for a kind of specific method flow chart for loading plug-in unit provided in an embodiment of the present invention, this method includes Step S201 to S206.
Firstly, executing step S201 obtains the installation kit archive information of plug-in unit when plug-in unit is triggered PackageArchiveInfo。
Wherein, plug-in unit is a module of main program.It usually may include more in the application program based on developing plug A module, wherein each module can be realized by a plug-in unit.Currently, due to the liter of the application program under Android Grade is inconvenient, and the plug-in unit of application program has become a kind of trend.
For example, may include the functions such as rubbish cleaning, self-triggered program management, wooden horse scanning in a optimization software, Wherein, each function can individually develop into a module, a plug-in unit as optimization software.When optimization software needs to increase When new function " hardware testing ", a plug-in unit only need to be write again and is discharged under main program, without updating entire application program, Developer is also not required to carry out packing compiling to entire application program again again.
Under normal conditions, plug-in unit is an apk file, and user after downloading, can be directly released into the specified mesh of main program In record, that is, complete the installation of plug-in unit.
It should be noted that in order to enable plug-in unit can be loaded, inside the apk of plug-in unit should by developer to it at least An entrance (Entry) is provided, for completing the loading procedure of plug-in unit.
It, in the present embodiment, can be in the following way in order to realize the entrance of plug-in unit:
The primary ClassLoader object of system is replaced using ClassLoader object customized in main program.
The particular load mode of the class or resource to application program, example may be implemented in customized ClassLoader Such as, when loading the activity component of plug-in unit, the context of re-direction applications program is the context of plug-in unit, with realization pair The complete load of plug-in unit.
Specifically, primary for using in main program customized ClassLoader object to replace system The method of ClassLoader object may include:
When the process initiation of application program, obtaining operating system is the PackageInfo object that application program is established, and is obtained The mClassLoader field in PackageInfo object is taken, the address in mClassLoader field is modified, is directed toward it certainly The ClassLoader object address of definition, so as to complete customized ClassLoader object to primary The replacement of ClassLoader allows to through customized ClassLoader object loading application programs.
Triggering for plug-in unit usually may include two kinds of situations:
One is the active of user click, when user needs the corresponding function of plug-in unit, the plug-in unit is clicked to start.
Another kind is when main program starting, and triggering plug-in unit loads automatically.For example, certain optimization functions, are opened in main program Plug-in component operation is needed when dynamic.
In this step S201, the installation kit archive information PackageArchiveInfo for obtaining plug-in unit can be by such as lower section Method:
Firstly, obtaining the object of the PackageManager of plug-in unit;
Then, mContext.getPackageManager () interface is recalled to realize that the installation kit for obtaining plug-in unit achieves Information.
For example, being pm by PackageManager object definition in the present embodiment, then it can be realized and be obtained by following code Take the PackageManager object of plug-in unit:
In above-mentioned code, mPath is the path of plug-in unit, GET_ACTIVITIES, GET_SERVICES, GET_ PROVIDERS, GET_META_DATA respectively indicate the letter for obtaining Activity, Service, Provider of apk of plug-in unit Breath and Android Manifest in META_DATA information.
Wherein, the installation kit archive information PackageArchiveInfo of plug-in unit be include apk Activity, The information and the META_DATA information in Android Manifest of Service, Provider.
Also, installation kit archive information of the four kinds of information as above as plug-in unit in the present embodiment, is only obtained, can be mentioned The loading velocity of high plug-in unit, improving performance.
It should be noted that may include multiple plug-in units under a main program.For example, under security guard's software, it can To there is the plug-in unit of the functions such as sweep-drug, cleaning, encryption, user can select download plug-in according to demand.It is developed based on Plugin Mechanism Program, carry out plug-in unit iteration when, update can also be downloaded just for single plug-in unit.
In the present embodiment, it can choose and plug-in unit be downloaded or updated by cloud server, method can be such that
Step A, before plug-in unit is triggered or triggers, whether detection plug-in unit be can be used, if available, step S202 be executed, if not It can use, execute step B;
Wherein, unavailable includes not downloading or the version of plug-in unit is too low.
Step B sends the request for obtaining plug-in unit list to server;
Wherein, server preserves the plug-in unit list of current main program, in the list record have plug-in unit plugin name, Plug-in version, the digital digest value of plug-in unit and the download address of plug-in unit.
As shown in table 1 below, the as example of plug-in unit list:
Plug-in unit name Plug-in version Plug-in unit MD5 Plug-in unit URL
Plug-in unit A 1 A111 http://a.360.cn/a.apk
Plug-in unit A 2 A222 http://a.360.cn/a2.apk
Plug-in unit B 1 B111 http://a.360.cn/b.apk
Table 1
Wherein, MD5 (Message Digest Algorithm 5rd, Message Digest Algorithm 5) value is digital digest One kind of value.
Step C receives the plug-in unit list that server is sent;
Step D downloads the plug-in unit of new version according to the download address of the plug-in unit in plug-in unit list;
Whether step E, the digital digest and the digital digest in plug-in unit list for verifying the plug-in unit of the new version of downloading meet, If it is, plug-in download or update are completed, if it is not, re-downloading.
After getting the installation kit archive information of plug-in unit, step S202 is executed, it will be default under installation kit archive information Variable is revised as preset path.
It should be noted that realizing the load to plug-in resource in the present embodiment, the normal initial of plug-in unit is changed Change process (such as context of replacement main program), therefore, needs to modify in this step default under installation kit archive information Variable, to prevent the program throw exception in the loading procedure of plug-in unit.
In the present embodiment, design variables include: sourceDir and publicSourceDir.
Preset path is the path mPath of plug-in unit.
For example, the modification to design variables can be realized by following code:
MPackageInfo.applicationInfo.sourceDir=mPath;
MPackageInfo.applicationInfo.publicSourceDir=mPath;
After modifying design variables, i.e., executable step S203 obtains the resource of plug-in unit.
In this step S203, the resource of plug-in unit can be obtained in the following way:
By call PackageManager object (namely customized pm in step S201, it is complete in step s 201 At obtain operate) in getResourcesForApplication method, to obtain the Resources object of the plug-in unit, then Pass through the resource of Resources object acquisition plug-in unit.
It wherein, include the related all resource informations of the plug-in unit in Resources object.
For example, can be realized by following code:
Wherein, mPkgResources is the resource of plug-in unit.
After acquiring the resource of plug-in unit, step S204 is executed, creates DexClassLoader class for plug-in unit.
Wherein, a plug-in unit is usually made of dex (binary code under Android) file and resource, if completing to insert The load of part then needs to load the dex file and resource of plug-in unit simultaneously.In android system, load for dex file, It is completed by DexClassLoader class.DexClassLoader also becomes class loaders.
In order to enable DexClassLoader can correctly load the dex file of plug-in unit, need newly-built The path that the dex file of plug-in unit is stored in DexClassLoader, transmits plug-in unit by newly-built DexClassLoader The path of dex file.
For example, can be realized by following code:
String out=mContext.getDir (DIR, 0) .getPath ();
MClassLoader=new DexClassLoader (mPath, out, null, parent);
Wherein, parent indicates that newly-built DexClassLoader is parent loader, has more than is needed in order to avoid occurring adjusting The problem of android system class.
After newly-built DexClassLoader, that is, guarantee to load the dex file of plug-in unit.In the present embodiment, In order to the resource of normal load plug-in unit, also need to execute step S205, i.e., the context of newly-built plug-in unit oneself, and replace The context of main program.
Wherein, context is the unique identifier of application program in android system, is equivalent in windows system Handle all need to complete by context when needing to call dex file, the resource etc. of application program.In normal condition Under, when an application program launching, operating system can be one context of the application initialization, and without being slotting Part distributes context, and therefore, in existing android system, the load for plug-in unit is always a difficult point.
Therefore, in the present invention, need to create a context for plug-in unit to be loaded, in order to be different from main program The context of context, plug-in unit can be defined as PluginContext.
For example, creating PluginContext for plug-in unit can be realized by following code:
Wherein, the PluginContext of plug-in unit has to be inherited from ContextThemeWrapper, it is Context Encapsulate class.
After establishing the PluginContext of plug-in unit, for the Context for distributing its replacement system main program, also Below step need to be executed:
Override method function relevant to plug-in unit load.
In the present embodiment, method function relevant to plug-in unit load mainly includes following three:
GetClassLoader, getResources and getAssets.
Wherein, getClassLoader is used for loading classes, such as DexClassLoader;
GetResources and getAssets is used to load the resource of plug-in unit.
It how is exemplified below to these three method letters of getClassLoader, getResources and getAssets Number is override:
(1)getClassLoader
Wherein, as long as being related to the place of Context calling, the side Context.getClassLoader all can preferentially be used Method can call this method when application program launching, since we have override this method, being returned is us in step The DexClassLoader created in rapid S204 completes adding to the class of plug-in unit by the DexClassLoader that we create It carries.
(2)getResources
Wherein, the place for obtaining resource is generally involved, getResources method function can be all called, after overriding In getResources method function, when the function is called, i.e., the Resources object of plug-in unit can be returned to, to complete Load to the resource of plug-in unit.
(3)getAssets
Wherein, getAssets is also the resource for obtaining plug-in unit, when loading the part resource of plug-in unit, be will use GetAssets method function.When the function is called, i.e., the Assets object of plug-in unit can be returned to, to complete to plug-in unit The load of resource.
After rewriteeing above three method function, the load of dex file and resource for plug-in unit can all realize replacement, can Plug-in unit under perfect load main program.
Finally, step S206 is executed, according to the resource and dex file of the context load plug-in unit after being replaced.
It should be noted that generally there is an entrance (Entry) when program starts, after the triggering in order to realize plug-in unit The load of resource can be carried out, we can realize an Entry in plug-in unit.In all entrances, Entry is to be adjusted earliest , it is similar to the Dalvik.main of Android, is the place of entire plug-in unit most entrance.
Such as following code, the entrance of as one plug-in unit:
String className=PACKAGE_PREFIX+ " _ "+mName+ " _ "+CLASS_NAME
Class<?>C=mClassLoader.loadClass (className);
McreateMethod=c.getDeclareMethod (Factory.METHOD_NAME, Factory_METHOD_ PARAMS);
Mplugin=(IPlugin) mCreateMethod.invoke (null, mPkgContext, manager);
We can first obtain the entry method of Entry, be in the present embodiment Create, then call the party by reflection Method, mPkgContext and manager (cache interface is shown in " plug-in unit scheme " series) etc. are passed to plug-in unit entrance can (as above It states shown in code).
In addition, we use mClassLoader, this is the ClassLoader of plug-in unit, that is to say, that Entry.create is present in plug-in unit, rather than other places.This is arrived, entire loading procedure terminates, and plug-in unit can start to make With.
It is illustrated Entry in order to clearer, the example that an Entry class is shown below is as follows:
Wherein, " package com.qihoo360.plugin.antitheft " indicates the packet of the packet where the Entry class Entitled " com.qihoo360.plugin.antitheft ";
" public class Entry " indicates that the class of newly-built class is entitled " Entry ";
" public static final IBinder create " indicates that the earliest entrance of entire plug-in unit is " cerate " Method, and parameter " ClassLoader of plug-in unit Context, plug-in unit IBinder and main program " is delivered wherein;
" return new Plugin (context, cl) " is indicated to return to an interface used by main program, be may is that IBinder may is that IPlugin or other, but howsoever, which is all finally main program to be returned, by main program It is scheduled.
The embodiment of the invention provides a kind of methods for loading plug-in unit.When plug-in unit is triggered, the resource of plug-in unit is obtained, newly The context of plug-in unit is built, and is in advance that the context of the distribution of the main application of plug-in unit replaces with plug-in unit by operating system Context can solve under Android native system according to the resource of the context load plug-in unit after being replaced due to not The problem of resource that plug-in unit cannot be loaded caused by plug-in unit context can be obtained, and this method system is generated other are right As not influencing, compatibility issue not will lead to, even if evolution has occurred in system, plug-in unit still is able to correctly load.
Embodiment three
Fig. 3 is a kind of structural block diagram of device for loading plug-in unit provided by one embodiment of the present invention, the device 300 packet It includes:
Source obtaining module 310, suitable for obtaining the resource of plug-in unit when plug-in unit is triggered;
First establishes module 320, suitable for creating the context context of plug-in unit, and is in advance plug-in unit by operating system The context of the distribution of main application replaces with the context of plug-in unit, and wherein the context of plug-in unit is directed toward the resource of plug-in unit;
Loading module 330, suitable for main application according to the resource of the context load plug-in unit after being replaced, wherein be replaced Context afterwards is the context of plug-in unit.
Optionally, the device 300 further include:
Data obtaining module 340, suitable for obtaining the installation kit archive information of plug-in unit before the resource for obtaining plug-in unit.
Optionally, data obtaining module 340, comprising:
Object acquisition unit 341, suitable for obtaining the PackageManager object of plug-in unit;
Information acquisition unit, suitable for the installation kit archive information according to PackageManager object acquisition plug-in unit;
Variable modifies unit 342, suitable for the design variables under installation kit archive information are revised as preset path;
Wherein, preset path is the store path of plug-in unit.
Optionally, the device 300 further include:
Second establishes module 350, suitable for creating the DexClassLoader of plug-in unit before the context of newly-built plug-in unit Class;
Wherein, DexClassLoader class is used to transmit the executable code path of plug-in unit.
Optionally, it first establishes module 320 and includes:
Context establishes unit 321, is suitable for plug-in unit and establishes the context for being inherited from ContextThemeWrapper class;
Rewriting unit 322, suitable for rewriteeing for loading the resource of plug-in unit and the method function of executable code, after rewriting Function in return plug-in unit context.
Optionally, for loading the resource of plug-in unit and the method function of executable code, comprising:
GetClassLoader, getResources and getAssets.
Optionally, device 300 further include: plug-in download module 360;
The plug-in download module 360 includes:
Judging unit 361 can be used, suitable for judging above-mentioned plug-in unit before above-mentioned plug-in unit is triggered or when above-mentioned plug-in unit is triggered Whether can be used;
Request transmitting unit 362 is suitable for when above-mentioned plug-in unit is unavailable, sends to server and obtains asking for plug-in unit list It asks;Wherein, the plugin name of plug-in unit included by above-mentioned main application, plug-in version, plug-in unit are preserved in above-mentioned plug-in unit list The download address of digital digest value and plug-in unit.
List reception unit 363, suitable for receiving the above-mentioned plug-in unit list sent;
Plug-in download unit 364, suitable for according to the download address downloading new version of above-mentioned plug-in unit in above-mentioned plug-in unit list Plug-in unit.
Optionally, the device 300 further include:
Authentication module 370, suitable for downloading inserting for new version in the download address according to above-mentioned plug-in unit in above-mentioned plug-in unit list After part, the digest value that is saved in the digital digest value and plug-in unit list of the plug-in unit of new version that verifying downloading obtains whether phase Together, when identical, the step of executing the resource of the above-mentioned plug-in unit of above-mentioned acquisition.
Optionally, which further includes;
Entrance realizes module 380, and the ClassLoader object suitable for replacement operation system is that above-mentioned main application is customized ClassLoader object;
Wherein, above-mentioned customized ClassLoader object for realizing above-mentioned plug-in unit load.
The embodiment of the invention provides a kind of devices for loading plug-in unit to obtain the resource of plug-in unit, newly when plug-in unit is triggered The context of plug-in unit is built, and is in advance that the context of the distribution of the main application of plug-in unit replaces with plug-in unit by operating system Context can solve under Android native system according to the resource of the context load plug-in unit after being replaced due to not The problem of resource that plug-in unit cannot be loaded caused by plug-in unit context can be obtained, and this method system is generated other are right As not influencing, compatibility issue not will lead to, even if evolution has occurred in system, plug-in unit still is able to correctly load.
In addition, the embodiment of the invention also provides a kind of mobile terminal, which includes:
Memory;
One or more processors;
Wherein, which is configured as executing following method:
When plug-in unit is triggered, the resource of above-mentioned plug-in unit is obtained;
The context context of above-mentioned plug-in unit is created, and is in advance the distribution of the main application of above-mentioned plug-in unit by operating system Context replace with the context of above-mentioned plug-in unit, wherein the context of above-mentioned plug-in unit is directed toward the resource of above-mentioned plug-in unit;
Above-mentioned main application loads the resource of above-mentioned plug-in unit according to the context after being replaced, wherein it is above-mentioned be replaced after Context is the context of above-mentioned plug-in unit.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of any Can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice It is some in the device of microprocessor or digital signal processor (DSP) to realize load plug-in unit according to an embodiment of the present invention Or some or all functions of whole components.The present invention is also implemented as one for executing method as described herein Partly or completely device or device program (for example, computer program and computer program product).Such realization is originally The program of invention can store on a computer-readable medium, or may be in the form of one or more signals.In this way Signal can be downloaded from an internet website to obtain, be perhaps provided on the carrier signal or be provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.
So far, although those skilled in the art will appreciate that present invention has been shown and described in detail herein multiple shows Example property embodiment still without departing from the spirit and scope of the present invention, still can according to the present disclosure directly Determine or deduce out many other variations or modifications consistent with the principles of the invention.Therefore, the scope of the present invention is understood that and recognizes It is set to and covers all such other variations or modifications.
The embodiment of the invention also discloses a kind of methods for loading plug-in unit of A1., comprising:
When plug-in unit is triggered, the resource of the plug-in unit is obtained;
The context context of the plug-in unit is created, and is in advance the distribution of the main application of the plug-in unit by operating system Context replace with the context of the plug-in unit, wherein the context of the plug-in unit is directed toward the resource of the plug-in unit;
The main application loads the resource of the plug-in unit according to the context after being replaced, wherein it is described be replaced after Context is the context of the plug-in unit.
A2. method according to a1, wherein before the resource for obtaining the plug-in unit, further includes:
Obtain the installation kit archive information of the plug-in unit.
A3. the method according to A2, wherein the installation kit archive information for obtaining the plug-in unit, comprising:
Obtain the PackageManager object of the plug-in unit;
According to the installation kit archive information of plug-in unit described in the PackageManager object acquisition;
Design variables under the installation kit archive information are revised as preset path;
Wherein, the preset path is the store path of the plug-in unit.
A4. according to the described in any item methods of A1 to A3, wherein before the context for creating the plug-in unit, the side Method further include:
Create the DexClassLoader class of the plug-in unit;
Wherein, the DexClassLoader class is used to transmit the executable code path of the plug-in unit.
A5. method according to a4, wherein the context context for creating the plug-in unit, and by operating system The context for the distribution of the main application of the plug-in unit replaces with the context of the plug-in unit in advance, comprising:
The context for being inherited from ContextThemeWrapper class is established for the plug-in unit;
It rewrites for loading the resource of the plug-in unit and the method function of executable code, in the function after the rewriting Return to the context of the plug-in unit.
A6. method according to a5, wherein the method for loading the resource and executable code of the plug-in unit Function, comprising:
GetClassLoader, getResources and getAssets.
A7. method according to a1, wherein before the plug-in unit is triggered or when the plug-in unit is triggered, the side Method further include:
Judge whether the plug-in unit can be used;
When the plug-in unit is unavailable, the request for obtaining plug-in unit list is sent to server;Wherein, in the plug-in unit list Under plugin name, plug-in version, the digital digest value of plug-in unit and the plug-in unit of preserving plug-in unit included by the main application Set address.
Receive the plug-in unit list sent;
The plug-in unit of new version is downloaded according to the download address of plug-in unit described in the plug-in unit list.
A8. the method according to A7, wherein the download address of the plug-in unit according to the plug-in unit list is downloaded After the plug-in unit of new version, the method also includes:
The digest value saved in the digital digest value and plug-in unit list of the plug-in unit of new version that verifying downloading obtains whether phase Together, when identical, the step of executing the resource for obtaining the plug-in unit.
A9. method according to a1, wherein the method also includes;
The ClassLoader object of replacement operation system is the main customized ClassLoader object of application;
Wherein, the customized ClassLoader object for realizing the plug-in unit load.
The embodiment of the invention also discloses a kind of devices for loading plug-in unit of B10., comprising:
Source obtaining module, suitable for obtaining the resource of the plug-in unit when plug-in unit is triggered;
First establishes module, suitable for creating the context context of the plug-in unit, and is in advance described insert by operating system The context of the distribution of the main application of part replaces with the context of the plug-in unit, wherein the context of the plug-in unit is directed toward institute State the resource of plug-in unit;
Loading module loads the resource of the plug-in unit suitable for the main application according to the context after being replaced, wherein It is described be replaced after context be the plug-in unit context.
B11. device according to b10, wherein described device further include:
Data obtaining module, the installation kit suitable for before the resource for obtaining the plug-in unit, obtaining the plug-in unit achieve letter Breath.
B12. the device according to B11, wherein the data obtaining module, comprising:
Object acquisition unit, suitable for obtaining the PackageManager object of the plug-in unit;
Information acquisition unit, the installation kit suitable for the plug-in unit according to the PackageManager object acquisition achieve letter Breath;
Variable modifies unit, suitable for the design variables under the installation kit archive information are revised as preset path;
Wherein, the preset path is the store path of the plug-in unit.
B13. according to the described in any item devices of B10 to B12, wherein described device further include:
Second establishes module, suitable for creating the plug-in unit before the context for creating the plug-in unit DexClassLoader class;
Wherein, the DexClassLoader class is used to transmit the executable code path of the plug-in unit.
B14. device according to b13, wherein described first, which establishes module, includes:
Context establishes unit, is suitable for the plug-in unit foundation and is inherited from ContextThemeWrapper class context;
Rewriting unit, suitable for rewriteeing for loading the resource of the plug-in unit and the method function of executable code, described The context of the plug-in unit is returned in function after rewriting.
B15. device according to b14, wherein described for loading the side of the resource and executable code of the plug-in unit Method function, comprising:
GetClassLoader, getResources and getAssets.
B16. device according to b10, wherein described device further include: plug-in download module;
The plug-in download module includes:
Judging unit can be used, suitable for before the plug-in unit is triggered or when the plug-in unit is triggered, judging that the plug-in unit is It is no available;
Request transmitting unit is suitable for when the plug-in unit is unavailable, and the request for obtaining plug-in unit list is sent to server;Its In, the plugin name of plug-in unit included by the main application, plug-in version, the number of plug-in unit are preserved in the plug-in unit list plucks It is worth and the download address of plug-in unit.
List reception unit, suitable for receiving the plug-in unit list sent;
Plug-in download unit, the download address suitable for the plug-in unit according to the plug-in unit list download inserting for new version Part.
B17. the device according to B16, wherein described device further include:
Authentication module, suitable for the plug-in unit according to the plug-in unit list download address downloading new version plug-in unit it Afterwards, whether the digest value saved in the digital digest value and plug-in unit list of the plug-in unit for the new version that verifying downloading obtains is identical, when When identical, the step of executing the resource for obtaining the plug-in unit.
B18. device according to b10, wherein described device further includes;
Entrance realizes module, and the ClassLoader object suitable for replacement operation system is that the main application is customized ClassLoader object;
Wherein, the customized ClassLoader object for realizing the plug-in unit load.
The embodiment of the invention also discloses a kind of mobile terminals of C19., which is characterized in that the mobile terminal includes:
Memory;
One or more processors;
Wherein, one or more of processors are configured as executing following method:
When plug-in unit is triggered, the resource of the plug-in unit is obtained;
The context context of the plug-in unit is created, and is in advance the distribution of the main application of the plug-in unit by operating system Context replace with the context of the plug-in unit, wherein the context of the plug-in unit is directed toward the resource of the plug-in unit;
The main application loads the resource of the plug-in unit according to the context after being replaced, wherein it is described be replaced after Context is the context of the plug-in unit.

Claims (13)

1. a kind of method for loading plug-in unit, comprising:
When plug-in unit is triggered, the primary ClassLoader object of system is replaced with customized in main program ClassLoader object, and the installation kit archive information of the plug-in unit is obtained, by the default change under the installation kit archive information Amount is revised as preset path, wherein the preset path is the store path of the plug-in unit, further obtains the money of the plug-in unit Source;
The context context of the plug-in unit is created, and is in advance the distribution of the main application of the plug-in unit by operating system Context replaces with the context of the plug-in unit, wherein the context of the plug-in unit is directed toward the resource of the plug-in unit;
Wherein, the context context of the newly-built plug-in unit, and be in advance the distribution of the main application of the plug-in unit by operating system Context replace with the context of the plug-in unit, comprising: be inherited from ContextThemeWrapper for plug-in unit foundation The context of class;It rewrites for loading the resource of the plug-in unit and the method function of executable code, the letter after the rewriting The context of the plug-in unit is returned in number;
The main application loads the resource of the plug-in unit according to the context after being replaced, wherein it is described be replaced after Context is the context of the plug-in unit;
Before creating the context context of the plug-in unit, further includes: the DexClassLoader class of the plug-in unit is created, And using the DexClassLoader class as parent loader;The dex of plug-in unit is stored in the DexClassLoader class The path of file, to transmit the path of the dex file of the plug-in unit by the DexClassLoader class.
2. according to the method described in claim 1, wherein, the installation kit archive information for obtaining the plug-in unit, comprising:
Obtain the PackageManager object of the plug-in unit;
According to the installation kit archive information of plug-in unit described in the PackageManager object acquisition.
3. method according to claim 1 or 2, wherein described for loading the resource and executable code of the plug-in unit Method function, comprising:
GetClassLoader, getResources and getAssets.
It is described before the plug-in unit is triggered or when the plug-in unit is triggered 4. according to the method described in claim 1, wherein Method further include:
Judge whether the plug-in unit can be used;
When the plug-in unit is unavailable, the request for obtaining plug-in unit list is sent to server;Wherein, it is saved in the plug-in unit list With having the downloading of the plugin name of plug-in unit included by the main application, plug-in version, the digital digest value of plug-in unit and plug-in unit Location;
Receive the plug-in unit list sent;
The plug-in unit of new version is downloaded according to the download address of plug-in unit described in the plug-in unit list.
5. according to the method described in claim 4, wherein, under the download address of the plug-in unit according to the plug-in unit list After the plug-in unit for carrying new version, the method also includes:
Whether the digest value saved in the digital digest value and plug-in unit list of the plug-in unit for the new version that verifying downloading obtains is identical, when When identical, the step of executing the resource for obtaining the plug-in unit.
6. according to the method described in claim 1, wherein, the method also includes;
The ClassLoader object of replacement operation system is the main customized ClassLoader object of application;
Wherein, the customized ClassLoader object for realizing the plug-in unit load.
7. a kind of device for loading plug-in unit, comprising:
Source obtaining module, suitable for when plug-in unit is triggered, the primary ClassLoader object of system is replaced in main program Customized ClassLoader object, and obtain the resource of the plug-in unit;
Data obtaining module, suitable for obtaining the installation kit archive information of the plug-in unit before the resource for obtaining the plug-in unit;
Wherein, the data obtaining module includes: variable modification unit, suitable for by the default change under the installation kit archive information Amount is revised as preset path, wherein the preset path is the store path of the plug-in unit;
First establishes module, suitable for creating the context context of the plug-in unit, and is in advance the plug-in unit by operating system The context of the distribution of main application replaces with the context of the plug-in unit, wherein the context of the plug-in unit is directed toward described insert The resource of part;
Wherein, described first to establish module include: that context establishes unit, is suitable for the plug-in unit foundation and is inherited from The context of ContextThemeWrapper class;Rewriting unit, suitable for rewriteeing the resource for loading the plug-in unit and can hold The method function of line code returns to the context of the plug-in unit in the function after the rewriting;
Loading module loads the resource of the plug-in unit suitable for the main application, wherein described according to the context after being replaced Context after being replaced is the context of the plug-in unit;
Described device further include: second establishes module, suitable for described first establish module create the plug-in unit context it Before, the DexClassLoader class of the plug-in unit is created, and using the DexClassLoader class as parent loader;Institute The path that the dex file of plug-in unit is stored in DexClassLoader class is stated, to transmit by the DexClassLoader class The path of the dex file of the plug-in unit.
8. device according to claim 7, wherein the data obtaining module, comprising:
Object acquisition unit, suitable for obtaining the PackageManager object of the plug-in unit;
Information acquisition unit, the installation kit archive information suitable for the plug-in unit according to the PackageManager object acquisition.
9. device according to claim 7 or 8, wherein described for loading the resource and executable code of the plug-in unit Method function, comprising:
GetClassLoader, getResources and getAssets.
10. device according to claim 7, wherein described device further include: plug-in download module;
The plug-in download module includes:
Judging unit can be used, suitable for before the plug-in unit is triggered or when the plug-in unit is triggered, judging that the plug-in unit whether may be used With;
Request transmitting unit is suitable for when the plug-in unit is unavailable, and the request for obtaining plug-in unit list is sent to server;Wherein, The digital digest of the plugin name of plug-in unit included by the main application, plug-in version, plug-in unit is preserved in the plug-in unit list The download address of value and plug-in unit;
List reception unit, suitable for receiving the plug-in unit list sent;
Plug-in download unit, the plug-in unit of the download address downloading new version suitable for the plug-in unit according to the plug-in unit list.
11. device according to claim 10, wherein described device further include:
Authentication module, suitable for the download address of the plug-in unit according to the plug-in unit list downloading new version plug-in unit after, Whether the digest value saved in the digital digest value and plug-in unit list of the plug-in unit for the new version that verifying downloading obtains is identical, when identical When, the step of executing the resource for obtaining the plug-in unit.
12. device according to claim 7, wherein described device further includes;
Entrance realizes module, and the ClassLoader object suitable for replacement operation system is that the main application is customized ClassLoader object;
Wherein, the customized ClassLoader object for realizing the plug-in unit load.
13. a kind of mobile terminal, comprising:
Memory;
One or more processors;
Wherein, one or more of processors are configured as executing following method:
When plug-in unit is triggered, the primary ClassLoader object of system is replaced with customized in main program ClassLoader object, and the installation kit archive information of the plug-in unit is obtained, by the default change under the installation kit archive information Amount is revised as preset path, wherein the preset path is the store path of the plug-in unit, further obtains the money of the plug-in unit Source;
The context context of the plug-in unit is created, and is in advance the distribution of the main application of the plug-in unit by operating system Context replaces with the context of the plug-in unit, wherein the context of the plug-in unit is directed toward the resource of the plug-in unit;
Wherein, the context context of the newly-built plug-in unit, and be in advance the distribution of the main application of the plug-in unit by operating system Context replace with the context of the plug-in unit, comprising: be inherited from ContextThemeWrapper for plug-in unit foundation The context of class;It rewrites for loading the resource of the plug-in unit and the method function of executable code, the letter after the rewriting The context of the plug-in unit is returned in number;
The main application loads the resource of the plug-in unit according to the context after being replaced, wherein it is described be replaced after Context is the context of the plug-in unit;
Before creating the context context of the plug-in unit, further includes: the DexClassLoader class of the plug-in unit is created, And using the DexClassLoader class as parent loader;The dex of plug-in unit is stored in the DexClassLoader class The path of file, to transmit the path of the dex file of the plug-in unit by the DexClassLoader class.
CN201510142846.3A 2015-03-27 2015-03-27 A kind of method, apparatus and mobile terminal loading plug-in unit Expired - Fee Related CN104731625B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510142846.3A CN104731625B (en) 2015-03-27 2015-03-27 A kind of method, apparatus and mobile terminal loading plug-in unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510142846.3A CN104731625B (en) 2015-03-27 2015-03-27 A kind of method, apparatus and mobile terminal loading plug-in unit

Publications (2)

Publication Number Publication Date
CN104731625A CN104731625A (en) 2015-06-24
CN104731625B true CN104731625B (en) 2019-02-26

Family

ID=53455543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510142846.3A Expired - Fee Related CN104731625B (en) 2015-03-27 2015-03-27 A kind of method, apparatus and mobile terminal loading plug-in unit

Country Status (1)

Country Link
CN (1) CN104731625B (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975290A (en) * 2015-10-13 2016-09-28 乐视致新电子科技(天津)有限公司 Method and device for analyzing APK document
CN105867956A (en) * 2015-10-28 2016-08-17 乐视网信息技术(北京)股份有限公司 Method and device for showing plugin view element in host application page
CN106681749B (en) * 2015-11-11 2021-01-05 腾讯科技(深圳)有限公司 Local code patch updating method and device based on android platform
CN106775793A (en) * 2015-11-23 2017-05-31 卓望数码技术(深圳)有限公司 A kind of Android application exempts to install method, device and the terminal for starting
CN107203524A (en) * 2016-03-16 2017-09-26 阿里巴巴集团控股有限公司 A kind of method for APK file of packing, the method and system for loading Bundle files
CN106445598A (en) * 2016-09-28 2017-02-22 北京奇虎科技有限公司 Plug-in loading method and Plug-in loading device
CN106445601A (en) * 2016-09-29 2017-02-22 乐视控股(北京)有限公司 Device and method for plugin upgrading
CN106598642B (en) * 2016-11-07 2020-05-15 北京奇虎科技有限公司 Method and device for using service in plug-in
CN106599066A (en) * 2016-11-16 2017-04-26 广州视源电子科技股份有限公司 Document loading method and system
CN108170485B (en) 2016-12-05 2021-06-11 腾讯科技(深圳)有限公司 Plug-in loading method and device and mobile terminal
CN108228266B (en) * 2016-12-14 2021-08-10 阿里巴巴集团控股有限公司 Method and device for starting Fragment component between different plug-ins under Android plug-in framework
CN106775754A (en) * 2016-12-30 2017-05-31 百度在线网络技术(北京)有限公司 The compatible processing method and processing device of application
CN106775916B (en) * 2017-02-17 2020-02-28 北京金山安全软件有限公司 Method and device for reducing application installation packages and electronic equipment
CN106951236B (en) * 2017-03-07 2020-06-05 东软集团股份有限公司 Plug-in development method and device
CN109388919A (en) * 2017-08-10 2019-02-26 蓝盾信息安全技术股份有限公司 In a kind of Android ART virtual machine after dynamically load encryption plug-in unit solution
CN108008985A (en) * 2017-11-20 2018-05-08 北京奇虎科技有限公司 Application program loading method and device
CN108037941B (en) * 2017-12-27 2018-10-23 掌阅科技股份有限公司 Based on the application program update method of public plug-in unit, electronic equipment, storage medium
CN108491216B (en) * 2018-03-05 2021-07-13 北京指掌易科技有限公司 Method for installing and upgrading non-sensory application of Android system
CN110908933A (en) * 2019-10-23 2020-03-24 深圳智链物联科技有限公司 Method and system compatible with Windows equipment and related equipment
CN111142972B (en) * 2019-12-27 2021-10-01 京东数字科技控股有限公司 Method, apparatus, system, and medium for extending functions of application program
CN111459570B (en) * 2020-03-30 2023-03-17 掌阅科技股份有限公司 PDF plug-in loading method, electronic equipment and computer storage medium
CN111475227B (en) * 2020-04-02 2022-02-01 深圳创维-Rgb电子有限公司 Business plug-in loading implementation method and device and terminal equipment
CN117407115B (en) * 2023-12-15 2024-02-20 江苏金融租赁股份有限公司 Interface display method and device based on dynamic loading plug-in

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2521025A1 (en) * 2010-01-28 2012-11-07 Huawei Device Co., Ltd. Component display processing method and user device
CN103744669A (en) * 2013-12-26 2014-04-23 世纪龙信息网络有限责任公司 Method and system for creation and calling of Android system Activity plug-ins
CN104049986A (en) * 2013-03-14 2014-09-17 腾讯科技(深圳)有限公司 Plugin loading method and device
CN104123151A (en) * 2013-04-28 2014-10-29 百度在线网络技术(北京)有限公司 Plug-in management method and device for application program in mobile terminal and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2521025A1 (en) * 2010-01-28 2012-11-07 Huawei Device Co., Ltd. Component display processing method and user device
CN104049986A (en) * 2013-03-14 2014-09-17 腾讯科技(深圳)有限公司 Plugin loading method and device
CN104123151A (en) * 2013-04-28 2014-10-29 百度在线网络技术(北京)有限公司 Plug-in management method and device for application program in mobile terminal and mobile terminal
CN103744669A (en) * 2013-12-26 2014-04-23 世纪龙信息网络有限责任公司 Method and system for creation and calling of Android system Activity plug-ins

Also Published As

Publication number Publication date
CN104731625A (en) 2015-06-24

Similar Documents

Publication Publication Date Title
CN104731625B (en) A kind of method, apparatus and mobile terminal loading plug-in unit
CN105893839B (en) A kind of proxy processing method and device of the broadcast of Android application
US20170085591A1 (en) Fetching a policy definition library from a policy server at mobile device runtime of an application package to control access to mobile device resources
CN105427096B (en) Payment security sandbox implementation method and system and application program monitoring method and system
CN104375861B (en) Application program based on Android platform exempts from method, device and the terminal of installation and operation
CN105045643B (en) Launcher startup method and device in Android system
CN105574411B (en) A kind of dynamic hulling method, device and equipment
CN107220083A (en) Exempt from the method and system of installation and operation application program in a kind of Android system
CN109828772B (en) Thermal update method, operating system, terminal device, and storage medium
US20150347200A1 (en) Sharing extension points to allow an application to share content via a sharing extension
CN102981915B (en) A kind of inter-application communication method and device
US20200412769A1 (en) Method and apparatus for interworking of cloud platform and security tools
MXPA05003944A (en) Efficient patching.
US9747145B2 (en) Mobile application configuration agnostic to operating system versions
CN103595547A (en) Broadcast intercept method and device of intelligent equipment
KR20110038053A (en) Computer application packages with customizations
CN105740027B (en) Application program update method and apparatus
US20240118915A1 (en) Automated Management of Machine Images
CN106355049A (en) Method and device for reinforcing dynamic linking library SO file of Android installation package
CN105159771A (en) Method and apparatus for processing inter-application chain type start
US20160055344A1 (en) Data loss prevention during app execution using e-mail enforcement on a mobile device
CN104217140A (en) Method and device for reinforcing application program
CN111880987A (en) Dynamic monitoring method and device of application program, storage medium and electronic device
CN112189187A (en) Extensibility of unified platform
CN104156215A (en) Method and device for obtaining application program information on basis of mobile operating system

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
TR01 Transfer of patent right

Effective date of registration: 20220719

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190226

CF01 Termination of patent right due to non-payment of annual fee