Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Compatibility processing method and device for embedding H5 page into APP

A processing method and compatibility technology, applied in the computer field, can solve problems such as the extremely troublesome H5 page compatibility problem, the H5 page display style and content consistency are not easy, and achieve the effect of improving development efficiency

Active Publication Date: 2019-07-16
广州亚乐恒网络科技有限公司
View PDF5 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] When embedding H5 pages in APP, due to different operating system platforms (mainly Android system and iOS system at present), there are different versions of the same operating system, different versions of WebView, and the screen sizes of various mobile devices are different. There are differences and screen resolutions also have different differences. The existence of these objective factors makes it not easy to maintain the consistency of display style and content of H5 pages on different mobile devices. It is very troublesome to solve the compatibility problem of H5 pages. Therefore, there is an urgent need for a method so that after the H5 page is embedded in the APP, the page compatibility problem can be well resolved

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Compatibility processing method and device for embedding H5 page into APP
  • Compatibility processing method and device for embedding H5 page into APP
  • Compatibility processing method and device for embedding H5 page into APP

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0039] Such as figure 1 As shown, it is a schematic flowchart of a compatibility processing method for embedding H5 pages in an APP provided by an embodiment of the present invention, including:

[0040] S1, when embedding the WebView in the APP, inject the JavaScript function used to obtain the size of the WebView area into the Webview by initializing the JavaScriptBridge;

[0041] S2, after the WebView is created and the JavaScript function injection is completed, load the H5 page according to the pre-configured address;

[0042] S3, after the loading of the H5 page is completed, call the JavaScript function to obtain the size of the WebView area, and set the font size...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a compatibility processing method for embedding an H5 page into an APP. The method comprises the steps that a JavaScript function used for obtaining the size of a WebView area is injected into WebView; loading an H5 page according to a pre-configured address; calling the JavaScript function to obtain the size of the WebView area, and setting the font size of the HTML root element according to the obtained size; and setting the font size of each HTML sub-node according to the font size of the HTML root element. According to the method, the JavaScript function of the WebView window size is injected into the WebView, the real information of the equipment screen is transmitted to the H5 page through the JavaScript function, and therefore the purpose that the H5 page adapts to different mobile devices is achieved, the method is simple and easy to implement, and the development efficiency can be effectively improved.

Description

technical field [0001] The present invention relates to the field of computer technology, and more specifically, to a processing method and device for embedding H5 page compatibility in an APP. Background technique [0002] At present, due to the need to improve user participation, it is usually necessary to embed H5 (Html5) pages in APP (application software) through WebView (the built-in browser component of the operating system) to improve user experience, thereby guiding users to participate in activities and improving user experience. Activeness of user participation. [0003] When embedding H5 pages in APP, due to different operating system platforms (mainly Android system and iOS system at present), there are different versions of the same operating system, different versions of WebView, and the screen sizes of various mobile devices are different. There are differences and screen resolutions also have different differences. The existence of these objective factors m...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/957
CPCG06F9/44521G06F16/9577
Inventor 黄诚张文明陈少杰
Owner 广州亚乐恒网络科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products