Android WebKit control method and system

A control method and control system technology, applied in the control method and system field of Android WebKit, can solve the problem that WebKit cannot provide a good way to modify HTTP headers, etc.

Inactive Publication Date: 2012-05-02
卓望数码技术(深圳)有限公司
View PDF0 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The technical problem to be solved by the present invention is to provide a control method and system for Android WebKit in view of the defect that WebKit cannot provide a good modification of the HTTP header when using Android WebKit to develop a browser in the prior art

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
  • Android WebKit control method and system
  • Android WebKit control method and system
  • Android WebKit control method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] Such as figure 1 Shown is a flowchart of the Android WebKit control method of the present invention. The control methods of this AndroidWebKit include:

[0023] Formatting step S1: Format the HTTP header to be set as Form, and connect with carriage return and line feed;

[0024] The specific implementation process of this formatting step S1 is as follows:

[0025] First receive the HTTP header to be set, and then format the received HTTP header to be set, that is, format it as Form, the Exist in the form of "pair". Among them, "key name" represents the item, such as time, sender, receiver, etc., "key value" represents the value or information corresponding to the item, such as: specific time point or time period or time point, recipient address , Sender address, etc.; finally, connect with "\r\n", which is "\r\n".

[0026] Call step S2: call WebView.getSettings().setUserAgentString() function to Set to Android WebKit.

[0027] The specific implementation process of this ca...

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 relates to an Android WebKit control method and system. The method comprises a formatting step and a calling step, wherein the formatting step comprises the specific steps of: formatting a to-be-set HTTP (hyper text transport protocol) header into a (key name: key value) format, and carrying out CRLF (carriage return and line feed) for connection; and the calling step comprises the specific step of: calling a WebView. GetSettings (). setUserAgentString () function and setting the (key name: key value) into an Android WebKit. In the Android WebKit, a WebView supports the setting of UserAgentString, and the operation of data verification is not necessary in the process of setting the UserAgentString, so, the to-be-set HTTP header is formatted into a (key name: key value) format firstly, then, the WebView. GetSettings (). setUserAgentString () function is called so as to set the (key name: key value) into the Android WebKit, thereby realizing the self-definition of the HTTP header, so that the HTTP header can be called well by the Android WebKit.

Description

Technical field [0001] The present invention relates to the communication field, and more specifically, to a control method and system of Android WebKit. Background technique [0002] When using Android WebKit to develop a browser, you usually need to use WebView, WebViewClient, and WebChromeClient. When a custom HTTP header needs to be implemented, the method of reloading the boolean shouldOverrideUrlLoading(WebView view, String url) of the WebViewClient is usually used. In the above method, the http request is intercepted and the http header is customized by itself. [0003] However, the above methods are not effective in some cases, such as HTTP POST, HTTP GET requests in the page, etc. In such cases, shouldOverrideUrlLoading(WebView view, String url) is not called by Android WebKit, so it is impossible to implement self Define the HTTP header, that is, Android WebKit cannot directly modify the HTTP header. Summary of the invention [0004] The technical problem to be solved by...

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
IPC IPC(8): G06F9/45
Inventor 刘华友
Owner 卓望数码技术(深圳)有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products