CN106775795A - A kind of method and apparatus that service is provided for hypbrid app - Google Patents

A kind of method and apparatus that service is provided for hypbrid app Download PDF

Info

Publication number
CN106775795A
CN106775795A CN201510827845.2A CN201510827845A CN106775795A CN 106775795 A CN106775795 A CN 106775795A CN 201510827845 A CN201510827845 A CN 201510827845A CN 106775795 A CN106775795 A CN 106775795A
Authority
CN
China
Prior art keywords
function
modules
native
web
app
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510827845.2A
Other languages
Chinese (zh)
Inventor
任同杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cainiao Smart Logistics Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510827845.2A priority Critical patent/CN106775795A/en
Publication of CN106775795A publication Critical patent/CN106775795A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44573Execute-in-place [XIP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides the method and apparatus that one kind provides service for mixed mode applications (hypbrid app), wherein method includes:The function statement that web modules detection native modules are provided;According to the function of detecting, code logic corresponding with the function of detecting is performed.For native modules and web modules in the case ofs of not upgrading synchronously, web modules are not carried out the function that native modules are not supported, it is to avoid compatibility issue.

Description

A kind of method and apparatus that service is provided for hypbrid app
【Technical field】
The present invention relates to Computer Applied Technology field, more particularly to a kind of method and apparatus that service is provided for hypbrid app.
【Background technology】
Ybrid app (mixed mode applications) refer to the app between web app (web application) and native app (locally applied), it is developed using homepages language with program language simultaneously, has the advantage of the good user-interaction experiences of native app and web app Cross-border congestion managements concurrently.Hybrid app still need to install and use, although appear to be a native app, but have a UI webView (network view), and that the inside accesses is a web app.That is, hybrid app include two parts:Native modules and web modules, wherein native modules need locally-installed in smart machine and run, and native modules provide a container and run for web modules to web modules.Web modules are actually a series of web page codes run in said vesse, and current main flow is HTML5.
For native modules, its upgrading needs to download newest installation kit from application market, the upgrading of web modules only needs to application provider and new code logic is published into application server, the automatic web modules using after upgrading when user uses hybrid app.However, such compatibility issue can be run into hybrid app escalation process:User does not upgrade native modules, but web modules are upgraded automatically, and this will result in native modules and is reported an error when the New function of web module upgrades is run.
【The content of the invention】
In view of this, the invention provides a kind of method and apparatus that service is provided for hybrid app, native modules and web modules are solved and is not upgraded synchronously produced compatibility issue.
Concrete technical scheme is as follows:
The invention provides a kind of method that service is provided for mixed mode applications hypbrid app, the method includes:
The function statement that web modules detection native modules are provided;
According to the function of detecting, code logic corresponding with the function of detecting is performed.
According to a preferred embodiment of the invention, the function statement that the web modules detection native modules are provided includes:
The web modules determine the function that service provided is related to;
Judge that the function that service provided is related to whether there is in the function statement that the native modules are provided, if it is, detecting the function.
According to a preferred embodiment of the invention, the web modules safeguard the corresponding window object properties of function for having service provided to be related to;
The function of judging that service provided is related to includes with the presence or absence of the function statement provided in the native modules:Judge the corresponding widow object properties of function whether the native modules state that the service provided is related to.
According to a preferred embodiment of the invention, the function that the judgement service provided is related to includes with the presence or absence of the function statement provided in the native modules:
The API of localStorage or sessionStorage is called, the corresponding value of key of the function that the web modules service provided is related to are inquired about from the localStorage or sessionStorage;If value indicates native modules to support that the function, the web modules determine to detect the function;Or,
In the cookie carried from page request, the corresponding value of key of the function that inquiry web module service provided is related to, if value indicates native modules to support that the function, the web modules determine to detect the function.
Present invention also offers a kind of method that service is provided for hypbrid app, the method includes:
Native modules determine the function that itself is supported;
There is provided the function that the native supports function to state, so that web modules carry out function detection.
According to a preferred embodiment of the invention, the method also includes:
The native modules provide the function and state by the widow objects injected in window object sets.
According to a preferred embodiment of the invention, there is provided the function statement is specifically included:
Window object properties corresponding with the function that the native modules are supported are stated under the window objects of the injection.
According to a preferred embodiment of the invention, the method also includes:
The native modules state the function that the native modules are supported in localStorage, sessionStorage or cookie in the form of key-value pairs.
According to a preferred embodiment of the invention, the method also includes:
The native modules obtain the function information that the native modules are supported from the application configuration file of the hybrid app;Or,
When the native modules download installation kit or AKU every time, the function information that the native modules are supported is obtained from the metadata information of installation kit or AKU.
The invention provides a kind of device that service is provided for hypbrid app, the device is arranged at the web modules of the hypbrid app, and the device includes:
Probe unit, the function statement that the native modules for detecting the hypbrid app are provided;
Execution unit, for the function of being detected according to the probe unit, performs code logic corresponding with the function of detecting.
According to a preferred embodiment of the invention, the probe unit, specifically for determining the function that the web modules service provided is related to;Judge that the function that the web modules service provided is related to whether there is in the function statement that the native modules are provided, if it is, detecting the function.
According to a preferred embodiment of the invention, the device also includes:
Maintenance unit, for safeguarding corresponding window object properties of function that the web modules service provided is related to;
The probe unit, specifically for judging corresponding window object properties of function that whether the native modules state that the web modules service provided is related to, if it is, determining that the function that the web modules service provided is related to is present in the function statement that the native modules are provided.
According to a preferred embodiment of the invention, the probe unit, API specifically for calling localStorage or sessionStorage, inquires about the corresponding value of key of the function that the web modules service provided is related to from the localStorage or sessionStorage;If value indicates native modules to support that the function, the web modules determine to detect the function;Or,
In the cookie carried from page request, the corresponding value of key of the function that inquiry web module service provided is related to, if value indicates native modules to support that the function, the web modules determine to detect the function.
Present invention also offers a kind of device that service is provided for hypbrid app, the device is arranged at the native modules of the hypbrid app, and the device includes:
Determining unit, for determining the function that the native modules are supported;
Statement unit, supports that the function of function is stated for providing the native modules.
According to a preferred embodiment of the invention, the statement unit provides the function and states specifically for the window objects by being injected in window object sets.
According to a preferred embodiment of the invention, the statement unit when providing the function and stating, the corresponding window object properties of function specifically for being stated under the window objects of the injection with the native modules are supported.
According to a preferred embodiment of the invention, the statement unit, specifically for stating the function that the native modules are supported in the form of key-value pairs in localStorage, sessionStorage or cookie.
According to a preferred embodiment of the invention, the determining unit, specifically for obtaining the function information that the native modules are supported from the application configuration file of the hybrid app;Or,
When the native modules download installation kit or AKU every time, the function information that the native modules are supported is obtained from the metadata information of installation kit or AKU.
Present invention also offers a kind of hypbrid app, the hypbrid app include:Web modules comprising above-mentioned the first device and the native modules comprising above-mentioned second device.
As can be seen from the above technical solutions, web modules are by way of the function of being provided native modules is stated and detected in the present invention, perform code logic corresponding with the function of detecting, for native modules and web modules in the case ofs of not upgrading synchronously, web modules are not carried out the function that native modules are not supported, it is to avoid compatibility issue.
【Brief description of the drawings】
Fig. 1 is method flow diagram provided in an embodiment of the present invention;
Fig. 2 is a kind of structure drawing of device provided in an embodiment of the present invention;
Fig. 3 is another structure drawing of device provided in an embodiment of the present invention;
Fig. 4 is the structure chart of hypbrid app provided in an embodiment of the present invention.
【Specific embodiment】
In order that the object, technical solutions and advantages of the present invention are clearer, the present invention will be described in detail with specific embodiment below in conjunction with the accompanying drawings.
Understand for convenience, composition first to hypbrid app is simply introduced, as described in the background art, hypbrid app mainly include native modules and web module two parts, wherein native modules are needed in the locally-installed part of smart machine, and native modules need to download installation kit and in the locally-installed operation of smart machine from application markets such as app store.Web modules can be the corresponding web page code of server end service provided, such as HTML5 web page codes, and it is run in the container that native modules are provided.
Fig. 1 is method flow diagram provided in an embodiment of the present invention, and as shown in fig. 1, the method may comprise steps of:
In 101, the function statement that web modules detection native modules are provided.
In embodiments of the present invention, native modules can carry out function statement to the function that itself is supported.Wherein, native modules it is determined that itself support function when, can from application configuration file, i.e., in the application configuration file of the hypbrid app, obtain the native modules currently support function.
In addition, for native modules, install every time or upgrading may cause the increase of function, delete and change, these information can be included in metadata information and be supplied to native modules when native modules download installation kit or AKU.For example when user downloads installation kit (the actually installation kit of native modules) of hypbrid app from app store, can there is metadata information in the installation kit, metadata information can generally include title, version number, function description, keyword, URL, sectional drawing, contact method of support of application etc..When user downloads AKU from app store, also can there is metadata information in the AKU, metadata information can describe (comprising increase, the function of deleting and change), keyword, URL, sectional drawing, the contact method of support etc. comprising the title of application, version number, the function of changing.Therefore, native modules can obtain the function information of native modules support from the metadata information of each installation kit downloaded or AKU.
For the native modules after upgrading, function statement can accordingly be changed according to the function of this upgrading change, including increase new function statement, delete function statement, modification function statement etc..
Native modules can provide function by way of injecting window objects in window object sets and state when function statement is carried out, the statement window object properties corresponding with the function of native modules support under the window objects of injection.Window.native_features objects are injected for example in window object sets, the function of being supported for native modules is as the object properties of the window.native_features objects, enumerate all native modules and support the object properties of the corresponding window.native_features objects of function, so that completing native modules supports that the function of function is stated.
Web modules carry out native modules provide function statement detection when, actually the function that this web module service provided is related to is detected.By taking HTML5 codes as an example, when certain HTML5 web page code is run in the container that native modules are provided, the service that the HTML5 web page codes are provided can be related to some functions, these functions need native modules to support, so HTML5 web page codes are detected to these functions, see whether native modules are stated these functions.
Specifically, web modules may determine that the function that itself service provided is related to whether there is in the function that native modules (the native modules that url is asked are sent to web modules) are provided is stated, if it is, detecting the function.Because the function statement that native modules are provided can be window object properties forms, therefore the corresponding window object properties of function for having web module service provided to be related to are safeguarded in web module ends (i.e. server end), when being detected, actually web modules are exactly to judge corresponding window object properties of function that whether native modules state that web module service provided is related to, if it is, determination detects the function.
In addition, for web modules, after each web module upgrades, can also be related to the change of function, including increase New function, delete function, change function.The function that can also cause according to upgrading in web module ends is changed, corresponding corresponding relation between maintenance function and window object properties, for example increase the corresponding relation between New function and window object properties, the corresponding relation between deleted function and window object properties is deleted.
It should be noted that, provided in above-described embodiment, native modules in window object sets by injecting window objects, and stated under the window objects of injection outside the mode of window object properties corresponding with the function that native modules are supported, can also be using other function statement modes, local storage function can for example be utilized, specifically, function statement is saved in localStorage by native modules, in sessionStorage or cookie, preserved in the form of with key-value (key-value), One function is such as characterized with key, corresponding value indicates whether native modules support the function.Wherein, web modules can call the API of localStorage and sessionStorage, the corresponding value of key of the function that web module service provided is related to are inquired about from localStorage and sessionStorage, if value values indicate native modules to support that the function, web modules determine to detect the function.Or, in the cookie that web modules can be carried from page request, the corresponding value of key of the function that inquiry web module service provided is related to, if value values indicate native modules to support that the function, web modules determine to detect the function.
Wherein, localStorage and sessionStorage can realize the inquiry of key-value by calling special API, and the data in sessionStorage are as the page is present, when page close, the data of sessionStorage are cleared, and this is accomplished by being carried out a subfunction statement when opening the page every time;Data in cookies can together send with page request, so as to cause web database technology to increase.Therefore, the present invention is in the case where considering to reduce web database technology, it may be preferred to carry out function statement by way of injecting window objects in window object sets.
In 102, web modules perform code logic corresponding with the function of detecting according to the function of detecting.
So-called code logic is referred to for providing certain service content or completing the code block of certain function.Some code logics are included in web module ends (each web page code that i.e. server end is provided), some code logics are fixed presence, i.e., can be performed for any native modules.Some code logics are corresponding with function, if native modules do not support the function, but web modules perform the corresponding code logic of the function, then can produce and report an error.Therefore, in this step, code logic corresponding for concrete function, web modules only perform the corresponding code logic of the function of detecting.
For the function of not detected from native modules, then illustrate that native modules do not support that the function, web modules do not perform the corresponding code logic of the function.
In view of hypbrid app have the advantage of the good user-interaction experiences of native app and web app Cross-border congestion managements concurrently, it is used for shopping class more, purchases by group the service content such as class, news category renewal frequently app types.Is given one example below and the above method provided in an embodiment of the present invention is described.Assuming that certain hypbrid app for purchasing by group class is installed in the mobile phone of certain user, the native modules in the hypbrid app are supported at present:Comment function, sharing function, barcode scanning function, function of search etc..So native modules can inject a window object in window object sets:
Window.native_features objects
And following window object properties are stated in the window objects:
window.native_features.comment
window.native_features.share
window.native_features.scan
window.native_features.search
……
Wherein, window.native_features.comment is used to state comment function, window.native_features.share is used to state sharing function, window.native_features.scan is used to state barcode scanning function that window.native_features.search is used to state function of search.
Assuming that the hypbrid app open certain HTML5 web page code, i.e. native modules being asked to the url that web modules have sent the web page code.The HTML5 web page codes provide function and are related to after upgrading:Sharing function and collection function, wherein collection function need to be supported after native module upgrades.
Safeguard there is the corresponding relation of the corresponding relation of sharing function and window.native_features.share, collection function and window.native_features.collection in server end.Whether HTML5 web page codes detection native modules state window.native_features.share and window.native_features.collection.Because native modules state window.native_features.share, but without proper notice window.native_features.collection, therefore native modules support sharing function is detected, but do not support collection function.HTML5 web page codes just only perform the corresponding code logic of sharing function, without performing the corresponding code logic of collection function, would not so be produced for the native modules not yet upgraded without supporting collection function and reported an error.
The implementation that the present invention is provided, only needs to safeguard the corresponding code logic of each function in server end, it is to avoid safeguard the code complexity that each version number of native modules is brought.In order to the mode for providing the application and the mode for safeguarding each version number of native modules are compared, below to simply being introduced by way of safeguarding each version number of native modules:
Web modules judge the current version number of native modules, and the corresponding all code logics of each version number are maintained in web module ends, and according to native modules, current version number performs corresponding code logic.Because a version of web modules may correspond to multiple functions, One function is likely to be present in multiple versions again, therefore version number and the corresponding relation between code logic that web module ends are safeguarded relative to the present invention provide only maintain the corresponding code logic of function for, it is just much more complex.
Above is the detailed description carried out to method provided by the present invention, is described in detail below by embodiment to the device that the present invention is provided.
Fig. 2 is a kind of structure drawing of device provided in an embodiment of the present invention, and the device is arranged at the native modules of hypbrid app, as shown in Fig. 2 the device can include:Determining unit 01 and statement unit 02.The major function of each component units is as follows:
Determining unit 01 is responsible for determining the function that native modules are supported.Specifically, it is determined that unit 01 can obtain the function information of native modules support from the application configuration file of hybrid app;The function information that native modules are supported can also be obtained from the metadata information of installation kit or AKU when native modules download installation kit or AKU every time.
Statement unit 02 is responsible for offer native modules and supports that the function of function is stated.Function specifically can be provided by the widow objects injected in window object sets to state, and corresponding window object properties are stated respectively for the function that native modules are supported.
It should be noted that, provided in above-described embodiment, native modules in window object sets by injecting window objects, and stated under the window objects of injection outside the mode of window object properties corresponding with the function that native modules are supported, can also be using other function statement modes.For example, local storage function can be utilized, function statement is saved in localStorage, sessionStorage or cookie, preserved in the form of key-value pairs, One function is such as characterized with key, corresponding value indicates whether native modules support the function.
For the native modules after upgrading, statement unit 02 can accordingly be changed according to the function of this upgrading change to function statement, including increased new function statement, deleted function statement, modification function statement etc..
In view of native modules can be realized with the characteristic of perform script, the device by injecting the script of native modules.
Fig. 3 is another structure drawing of device provided in an embodiment of the present invention, and the device is arranged at the web modules of hypbrid app, can be presented as the executable code in webpage.As shown in Figure 3, the device can include:Probe unit 11 and execution unit 12, can also include maintenance unit 13.The major function of each component units is as follows:
The function statement that the native modules that probe unit 11 is responsible for detection hypbrid app are provided.Specifically, probe unit 11 can first determine the function that web module service provided is related to;Judge that the function that web module service provided is related to whether there is in the function statement that native modules are provided, if it is, detecting the function.
Because native modules are by the statement window object properties corresponding with the function that native modules are supported under window objects, to carry out function statement, therefore, in web module ends, maintenance unit 13 safeguards the corresponding window object properties of function for having web module service provided to be related to.Probe unit 11 judges the corresponding window object properties of function whether native modules state that web module service provided is related to, if it is, determining that the function that web module service provided is related to is present in the function statement of native modules offer.
In addition, after web module upgrades, can also be related to the change of function, including increase New function, delete function, change function.The function that maintenance unit 13 can also cause according to upgrading is changed, corresponding corresponding relation between maintenance function and window object properties, for example increase the corresponding relation between New function and window object properties, the corresponding relation between deleted function and window object properties is deleted.
If native modules carry out function statement using other modes, correspondingly, probe unit 11 can also be by the way of other detecting functions, such as:The API of localStorage or sessionStorage is called, the corresponding value of key of the function that web module service provided is related to are inquired about from localStorage or sessionStorage;If value indicates native modules to support the function, probe unit 11 determines to detect the function;Or,
In the cookies carried from page request, the corresponding value of key of the function that inquiry web module service provided is related to, if value indicates native modules to support the function, probe unit 11 determines to detect the function.
Execution unit 12 is responsible for the function of being detected according to probe unit 11, performs code logic corresponding with the function of detecting.For the function of not detected from native modules, then illustrate that native modules do not support the function, execution unit 12 does not perform the corresponding code logic of the function.
In addition, the embodiment of the present invention additionally provides a kind of structure chart of hypbrid app, as shown in figure 4, the hypbrid app include:Web modules and native modules.
Wherein native modules include device as shown in Figure 2, and web modules include device as shown in Figure 3, specifically repeat no more.
By above description as can be seen that the method and apparatus that the present invention is provided can possess advantages below:
1) in the present invention web modules by way of the function that is provided native modules is stated and detected, perform code logic corresponding with the function of detecting, for native modules and web modules in the case ofs of not upgrading synchronously, web modules are not carried out the function that native modules are not supported, it is to avoid compatibility issue.
2) corresponding relation of the present invention between server end only needs maintenance function and performs code, relative to the corresponding relation safeguarded between each version number of native modules and execution code, because each version may correspond to multiple functions, One function may correspond to multiple versions, therefore easily maintenance, code complexity of the invention are lower.
In several embodiments provided by the present invention, it should be understood that disclosed apparatus and method, can realize by another way.For example, device embodiment described above is only schematical, for example, the division of the unit, only a kind of division of logic function, can there is other dividing mode when actually realizing.
In addition, during each functional unit in each embodiment of the invention can be integrated in a processing unit, or unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated unit can both be realized in the form of hardware, it would however also be possible to employ hardware adds the form of SFU software functional unit to realize.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can store in a computer read/write memory medium.Above-mentioned SFU software functional unit storage is in a storage medium, it is used to including some instructions so that a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform the part steps of each embodiment methods described of the invention.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. are various can be with the medium of store program codes.
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, all any modification, equivalent substitution and improvements within the spirit and principles in the present invention, done etc. should be included within the scope of protection of the invention.

Claims (19)

1. it is a kind of that the method for servicing is provided for mixed mode applications hypbrid app, it is characterised in that the party Method includes:
The function statement that web modules detection native modules are provided;
According to the function of detecting, code logic corresponding with the function of detecting is performed.
2. method according to claim 1, it is characterised in that the web modules detect native moulds The function statement that block is provided includes:
The web modules determine the function that service provided is related to;
Judge that the function that service provided is related to whether there is in the function statement that the native modules are provided, If it is, detecting the function.
3. method according to claim 2, it is characterised in that the web modules are safeguarded and provided The corresponding window object properties of function that service is related to;
The function of judging that service provided is related to whether there is the function sound provided in the native modules It is bright to include:Judge whether the native modules state that the function that the service provided is related to is corresponding Widow object properties.
4. method according to claim 2, it is characterised in that what the judgement service provided was related to Function includes with the presence or absence of the function statement provided in the native modules:
Call the API of localStorage or sessionStorage, from the localStorage or The corresponding value of key of the function that the web modules service provided is related to are inquired about in sessionStorage; If value indicates native modules to support that the function, the web modules determine to detect the function;Or Person,
In the cookie carried from page request, the key of the function that inquiry web module service provided is related to Corresponding value, if value indicates native modules to support that the function, the web modules determine to visit Measure the function.
5. it is a kind of that the method for servicing is provided for hypbrid app, it is characterised in that the method includes:
Native modules determine the function that itself is supported;
There is provided the function that the native supports function to state, so that web modules carry out function detection.
6. method according to claim 5, it is characterised in that the method also includes:
The native modules provide the function by the widow objects injected in window object sets Statement.
7. method according to claim 6, it is characterised in that the function statement is provided and is specifically included:
State corresponding with the function that the native modules are supported under the window objects of the injection Window object properties.
8. method according to claim 5, the method also includes:
The native modules are in localStorage, sessionStorage or cookie with key-value pairs Form states the function that the native modules are supported.
9. the method according to claim 7 or 8, it is characterised in that the method also includes:
The native modules obtain the native modules branch from the application configuration file of the hybrid app The function information held;Or,
When the native modules download installation kit or AKU every time, believe from the metadata of installation kit or AKU The function information that the native modules are supported is obtained in breath.
10. a kind of that the device for servicing is provided for hypbrid app, the device is arranged at the hypbrid app Web modules, it is characterised in that the device includes:
Probe unit, the function statement that the native modules for detecting the hypbrid app are provided;
Execution unit, for the function of being detected according to the probe unit, the function pair of performing and detect The code logic answered.
11. devices according to claim 10, it is characterised in that the probe unit, specifically for Determine the function that the web modules service provided is related to;Judge that the web modules service provided is related to Function with the presence or absence of in the native modules provide function statement in, if it is, detecting the work( Energy.
12. devices according to claim 11, it is characterised in that the device also includes:
Maintenance unit, it is corresponding window pairs for safeguarding the function that the web modules service provided is related to As attribute;
The probe unit, specifically for judging whether the native modules have stated the web modules institute The corresponding window object properties of function that the service of offer is related to, if it is, determining the web modules institute The function that the service of offer is related to is present in the function statement that the native modules are provided.
13. devices according to claim 11, it is characterised in that the probe unit, specifically for The API of localStorage or sessionStorage is called, from the localStorage or sessionStorage The corresponding value of key of the function that the middle inquiry web modules service provided is related to;If value refers to Show that native modules support the function, then the web modules determine to detect the function;Or,
In the cookie carried from page request, the key of the function that inquiry web module service provided is related to Corresponding value, if value indicates native modules to support that the function, the web modules determine to visit Measure the function.
A kind of 14. devices that service is provided for hypbrid app, the device is arranged at the hypbrid app Native modules, it is characterised in that the device includes:
Determining unit, for determining the function that the native modules are supported;
Statement unit, supports that the function of function is stated for providing the native modules.
15. devices according to claim 14, it is characterised in that the statement unit, specifically for The function is provided by the window objects injected in window object sets to state.
16. devices according to claim 15, it is characterised in that the statement unit is providing described When function is stated, supported with the native modules specifically for being stated under the window objects of the injection The corresponding window object properties of function.
17. devices according to claim 14, it is characterised in that the statement unit, specifically for The native is stated in the form of key-value pairs in localStorage, sessionStorage or cookie The function that module is supported.
18. device according to claim 16 or 17, it is characterised in that the determining unit, specifically For obtaining the function information that the native modules are supported from the application configuration file of the hybrid app; Or,
When the native modules download installation kit or AKU every time, believe from the metadata of installation kit or AKU The function information that the native modules are supported is obtained in breath.
19. a kind of hypbrid app, it is characterised in that the hypbrid app include:Web modules and native Module;
Wherein described web modules include the device as described in any claim of claim 10 to 13;
The native modules include the device as described in any claim in claim 14 to 17.
CN201510827845.2A 2015-11-25 2015-11-25 A kind of method and apparatus that service is provided for hypbrid app Pending CN106775795A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510827845.2A CN106775795A (en) 2015-11-25 2015-11-25 A kind of method and apparatus that service is provided for hypbrid app

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510827845.2A CN106775795A (en) 2015-11-25 2015-11-25 A kind of method and apparatus that service is provided for hypbrid app

Publications (1)

Publication Number Publication Date
CN106775795A true CN106775795A (en) 2017-05-31

Family

ID=58963718

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510827845.2A Pending CN106775795A (en) 2015-11-25 2015-11-25 A kind of method and apparatus that service is provided for hypbrid app

Country Status (1)

Country Link
CN (1) CN106775795A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107342934A (en) * 2017-06-19 2017-11-10 浪潮金融信息技术有限公司 A kind of mixed mode Mobile solution real-time messages method for pushing and system based on WebSocket
CN107678817A (en) * 2017-09-21 2018-02-09 北京三快在线科技有限公司 View switching method and apparatus and computing device
CN108509604A (en) * 2018-03-30 2018-09-07 成都优易数据有限公司 A kind of method of the data sharing duke groups of multiple Shipping Options Pages
CN112597423A (en) * 2021-01-04 2021-04-02 聚好看科技股份有限公司 Webpage content display method, terminal and server

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201827A (en) * 2006-12-14 2008-06-18 阿里巴巴公司 Method and system for displaying web page
CN102904947A (en) * 2012-09-29 2013-01-30 北京百度网讯科技有限公司 Application client presentation style updating and/or content expanding method and system
CN103942225A (en) * 2013-01-23 2014-07-23 阿里巴巴集团控股有限公司 Method and system for invoking resources of Hybrid App client and client

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201827A (en) * 2006-12-14 2008-06-18 阿里巴巴公司 Method and system for displaying web page
CN102904947A (en) * 2012-09-29 2013-01-30 北京百度网讯科技有限公司 Application client presentation style updating and/or content expanding method and system
CN103942225A (en) * 2013-01-23 2014-07-23 阿里巴巴集团控股有限公司 Method and system for invoking resources of Hybrid App client and client

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107342934A (en) * 2017-06-19 2017-11-10 浪潮金融信息技术有限公司 A kind of mixed mode Mobile solution real-time messages method for pushing and system based on WebSocket
CN107678817A (en) * 2017-09-21 2018-02-09 北京三快在线科技有限公司 View switching method and apparatus and computing device
WO2019056645A1 (en) * 2017-09-21 2019-03-28 北京三快在线科技有限公司 View switching
CN108509604A (en) * 2018-03-30 2018-09-07 成都优易数据有限公司 A kind of method of the data sharing duke groups of multiple Shipping Options Pages
CN112597423A (en) * 2021-01-04 2021-04-02 聚好看科技股份有限公司 Webpage content display method, terminal and server
CN112597423B (en) * 2021-01-04 2023-11-03 聚好看科技股份有限公司 Webpage content display method, terminal and server

Similar Documents

Publication Publication Date Title
CN105940654B (en) Franchise static web application in trust
CN102385594B (en) The kernel control method of multi-core browser and device
US10911565B2 (en) Method, device and system for associating a service account
US20110078667A1 (en) Static code analysis for packaged application customization
CN102930058B (en) A kind of method and apparatus realizing searching in the address field of browser
WO2013184501A1 (en) Component analysis of software applications on computing devices
US9262311B1 (en) Network page test system and methods
CN106775795A (en) A kind of method and apparatus that service is provided for hypbrid app
WO2020253366A1 (en) Webpage mailbox data crawling method and apparatus, terminal, and storage medium
US10831892B2 (en) Web browser script monitoring
CN106911693A (en) For detecting method, device and terminal device that web page contents are kidnapped
CN110858172A (en) Automatic test code generation method and device
CN110019263B (en) Information storage method and device
CN105430101A (en) Method and device for generating promotion link and method and device for analyzing promotion link
CN104978213B (en) Realize the link acquisition methods and device of application installation package
CN105095207A (en) Methods for retrieving and obtaining contents of application software, and devices for retrieving and obtaining contents of application software
CN102521257A (en) Method and device for providing corresponding on-line picture according to thumbnail
CN104598620A (en) Application program searching method and device
JP2015508918A (en) Redundant consumer transaction rule filtering
CN104317852A (en) Method and device for showing functional items in browser
CN106055567A (en) Providing app store search results
CN105224652A (en) A kind of information recommendation method based on video and electronic equipment
CN109002550B (en) Test method and device for reduction equipment
US11232488B2 (en) System, devices and methods for identifying mobile devices and other computer devices
CN106095486A (en) Online updating method, system, terminal unit and the server of application program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20180410

Address after: Four story 847 mailbox of the capital mansion of Cayman Islands, Cayman Islands, Cayman

Applicant after: CAINIAO SMART LOGISTICS HOLDING Ltd.

Address before: Cayman Islands Grand Cayman capital building a four storey No. 847 mailbox

Applicant before: ALIBABA GROUP HOLDING Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170531