Page display method, electronic equipment and storage medium
By injecting script files into the built-in Webview of electronic devices, the problem of insufficient content display in folding screen is solved, and the adaptive technology application of cross-vendor Webview is realized, and the user experience is improved.
Patent Information
- Application Number
- CN202310757457.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2024-12-27
AI Technical Summary
When the folded screen of an electronic device is in the expanded state, the content may be displayed less than when it is in the fold state, causing the layout elements to exceed the screen range and affecting user operations. Moreover, since WebUI adaptive technology is not open source, it cannot be in the Webview kernel of different manufacturers. Use leads to poor user experience.
By detecting whether the application comes with a Webview, and injecting script files into the Webview, it is used for adaptive layout or debugging, and improving the page browsing experience. Specific methods include determining whether the adaptive layout plug-in needs to be injected, obtaining the system preset information to match the whitelist address, and injecting the adaptive layout plug-in or debugging tool.
It improves users' browsing experience of the page, solves the problems of inoperable and overlapping layout caused by page elements amplification, and realizes the application of cross-vendor Webview.
Smart Images

Figure CN119202420A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent terminals, and in particular to a page display method, an electronic device and a storage medium. Background Art
[0002] With the continuous development of electronic technology, the screens of electronic devices (for example, mobile phones) have become more and more diverse. At present, a considerable number of electronic devices are equipped with folding screens. When the folding screen of an electronic device is in the unfolded state, the size of the screen becomes larger. However, in some scenarios, the content displayed on the unfolded folding screen may be less than the content displayed on the folded screen, and some layout elements may even exceed the screen range, affecting the user's operation and failing to give full play to the advantages of the large folding screen.
[0003] To solve the above problems, manufacturers usually adapt themselves or the system provides adaptive adaptation capabilities. For example, WebUI adaptive technology can shrink and rearrange page elements so that the page can accommodate more information. This can to a certain extent solve problems such as user inoperability or layout overlap caused by enlarging page elements.
[0004] However, currently applications developed by different manufacturers have their own Webview kernels, and WebUI adaptive technology is a non-open source technology, which makes WebUI adaptive technology unable to be used in the Webview kernels of different manufacturers, and the user experience on folding screens is still very poor. Summary of the invention
[0005] The present application provides a page display method, an electronic device and a storage medium, which help to improve the user's browsing experience of the page.
[0006] In a first aspect, the present application provides a page display method, comprising: in response to detecting that a page in an application is opened, determining whether the Webview of the application is the Webview that comes with the application; if it is determined that the Webview of the application is the Webview that comes with the application, injecting a script file into the Webview of the application, wherein the script file is used to process the page.
[0007] In this application, by identifying whether the application has its own Webview, if the application has its own Webview, a script file is injected, so that the page can be adaptively laid out or debugged through the script file, thereby improving the user's browsing experience of the page.
[0008] In one possible implementation, the script file is a boot file, and the script file is used to process the page, including: the boot file is used to guide the injection of an adaptive layout plug-in, and the adaptive layout plug-in is used to perform adaptive layout on the page.
[0009] In one possible implementation, after injecting the script file into the Webview of the application, the method further includes: determining whether it is necessary to inject the adaptive layout plug-in into the page; if it is determined that the adaptive layout plug-in needs to be injected into the page, injecting the adaptive layout plug-in into the page using the boot file.
[0010] In one possible implementation, the determining whether the adaptive layout plug-in needs to be injected into the page includes: obtaining system preset information, the system preset information including a whitelist address; if the network address of the page matches the whitelist address, determining that the adaptive layout plug-in needs to be injected into the page.
[0011] In one possible implementation manner, the script file is a debugging tool, and the script file is used to process the page, including: the debugging tool is used to debug the page.
[0012] In one possible implementation, in response to detecting a page in an open application, determining whether the Webview of the application is the Webview that comes with the application includes: in response to detecting a page in an open application, obtaining relevant information and instances of the Webview of the application; and determining that the Webview of the application is the Webview that comes with the application based on the relevant information and instances of the Webview of the application.
[0013] In one possible implementation, determining that the Webview of the application is the Webview that comes with the application based on the relevant information and instance of the Webview of the application includes: if the Webview type corresponding to the relevant information and instance of the Webview of the application is a non-system kernel type, determining that the Webview of the application is the Webview that comes with the application.
[0014] In one possible implementation, the relevant information of the Webview of the application includes the package name or class name of the Webview of the application.
[0015] In a second aspect, the present application provides a page display device, comprising one or more functional modules, wherein the one or more functional modules are used to implement the page display method as described in the first aspect.
[0016] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store a computer program; the processor is used to run the computer program to implement the page display method as described in the first aspect.
[0017] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is executed on a computer, the computer implements the page display method as described in the first aspect.
[0018] In a fifth aspect, the present application provides a computer program. When the above-mentioned computer program runs on a processor of an electronic device, the electronic device executes the page display method described in the first aspect.
[0019] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of the system architecture provided for an embodiment of the present application;
[0022] Figure 3 A schematic diagram of a flow chart of an embodiment of a page display method provided by the present application;
[0023] Figure 4 A schematic diagram of the UI layout architecture provided in an embodiment of the present application;
[0024] Figure 5 A schematic diagram of the structure of an embodiment of a page display device provided in this application. DETAILED DESCRIPTION
[0025] In the embodiments of the present application, unless otherwise specified, the character " / " indicates that the objects before and after the association are in an or relationship. For example, A / B can represent A or B. "And / or" describes the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone.
[0026] It should be pointed out that the words "first", "second", etc. involved in the embodiments of the present application are only used to distinguish the description purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated, nor can they be understood as indicating or implying order.
[0027] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. In addition, "at least one of the following" or similar expressions refers to any combination of these items, which may include any combination of single items or plural items. For example, at least one of A, B, or C may represent: A, B, C, A and B, A and C, B and C, or A, B and C. Among them, each of A, B, and C may be an element itself, or a set containing one or more elements.
[0028] In the embodiments of the present application, "exemplary", "in some embodiments", "in another embodiment", etc. are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.
[0029] In the embodiments of the present application, "of", "corresponding", and "corresponding" can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. In the embodiments of the present application, communication and transmission can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. For example, transmission can include sending and / or receiving, which can be a noun or a verb.
[0030] The equal to involved in the embodiments of the present application can be used in conjunction with greater than, and is applicable to the technical solution adopted when greater than, and can also be used in conjunction with less than, and is applicable to the technical solution adopted when less than. It should be noted that when equal to is used in conjunction with greater than, it cannot be used in conjunction with less than; when equal to is used in conjunction with less than, it cannot be used in conjunction with greater than.
[0031] With the continuous development of electronic technology, the screens of electronic devices (for example, mobile phones) have become more and more diverse. At present, a considerable number of electronic devices are equipped with folding screens. When the folding screen of an electronic device is in the unfolded state, the size of the screen becomes larger. However, in some scenarios, the content displayed on the unfolded folding screen may be less than the content displayed on the folded screen, and some layout elements may even exceed the screen range, affecting the user's operation and failing to give full play to the advantages of the large folding screen.
[0032] To solve the above problems, manufacturers usually adapt themselves or the system provides adaptive adaptation capabilities. For example, WebUI adaptive technology can shrink and rearrange page elements so that the page can accommodate more information. This can to a certain extent solve problems such as user inoperability or layout overlap caused by enlarging page elements.
[0033] However, currently applications developed by different manufacturers have their own Webview kernels, and WebUI adaptive technology is a non-open source technology, which makes WebUI adaptive technology unable to be used in the Webview kernels of different manufacturers, and the user experience on folding screens is still very poor.
[0034] Based on the above problems, an embodiment of the present application proposes a page display method, which is applied to an electronic device and can enhance the user's browsing experience of the page.
[0035] The electronic device can be a mobile terminal with a foldable screen. The mobile terminal can also be called terminal equipment, user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device. The mobile terminal can be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a TV set top box (STB), a customer premise equipment (CPE) and / or other devices used to communicate on a wireless system and a next-generation communication system, for example, a mobile terminal in a 5G network or a mobile terminal in a future evolved Public Land Mobile Network (PLMN) network, etc.
[0036] Figure 1 First, a schematic structural diagram of the electronic device 100 is shown as an example.
[0037] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0038] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0039] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0040] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0041] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0042] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0043] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0044] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0045] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0046] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0047] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0048] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0049] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminal devices, such as AR devices, etc.
[0050] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0051] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the terminal device through the power management module 141.
[0052] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0053] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0054] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0055] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0056] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0057] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0058] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0059] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0060] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0061] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0062] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0063] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0064] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0065] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0066] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0067] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0068] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0069] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0070] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0071] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0072] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0073] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0074] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0075] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0076] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0077] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0078] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
[0079] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0080] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0081] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0082] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0083] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0084] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0085] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0086] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0087] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0088] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0089] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0090] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0091] Now combined Figure 2-Figure 4 The page display method provided in the embodiment of the present application is described.
[0092] Figure 2 This is a system architecture diagram provided by the embodiment of this application. Figure 2 , the electronic device may include a framework and a Webview kernel. The framework may be an Android system framework or a framework of other operating systems, and the present application embodiment does not specifically limit this.
[0093] Taking the Android system as an example, the framework may include a View subsystem, which is used to manage the user interface (UI) of the application. The View subsystem may include an information reading unit, which may be used to read the relevant information of the View object. Among them, the View object can be understood as a basic UI component in the operating system, which is used to display the user interface.
[0094] The framework may further include a component warehouse, which may include a first plug-in, and the first plug-in may include an identification unit and an injection unit. The identification unit is used to request the information reading unit for relevant information of the View object, so that after receiving the request, the information reading unit can return relevant information of the corresponding View object to the identification unit, and can identify the relevant information of the returned View object.
[0095] When the recognition unit recognizes the view object provided by the application, the injection unit may be called so that the injection unit injects the script file into the view object provided by the application.
[0096] The script file may be a boot file, and the second plug-in may be injected through the boot file so as to adaptively adjust the page through the second plug-in. The second plug-in may be an adaptive layout plug-in, and when the current page needs to adaptively adjust the page layout, the adaptive layout plug-in may be injected through the boot file so as to adaptively adjust the current page.
[0097] In some optional embodiments, the script file may also be a debugging tool, and the current display page may be debugged through the debugging tool.
[0098] It is understandable that the above-mentioned script file may also be other types of files or tools, and the embodiments of the present application do not specifically limit this.
[0099] Combined with the following Figure 3 and Figure 4 , taking the Android system as an example, the page display method provided in the embodiment of the present application is explained. It can be understood that although the embodiment of the present application is explained using the Android system as an example, it does not constitute a limitation on the embodiment of the present application. The page display method provided in the present application can also be applied to other operating systems.
[0100] like Figure 3 The figure is a flow chart of an embodiment of the page display method provided by the present application, which specifically includes the following steps:
[0101] Step 301 : In response to detecting that an application is opened, initializing a recognition unit.
[0102] Specifically, after the user opens the application, the recognition unit may be initialized during the loading phase of the application.
[0103] Exemplarily, the recognition unit can inject an information reading unit into the addView method of ViewGroup in the View subsystem. That is, the recognition unit can load the information reading unit into the addView method of ViewGroup in the View subsystem and wait for being triggered to initialize the recognition unit. ViewGroup is a type of UI component in the Android operating system. ViewGroup is used to manage the layout and display of other types of UI components (for example, View). ViewGroup can contain View and ViewGroup, thus forming Figure 4 The hierarchical UI layout structure shown.
[0104] refer to Figure 4For each node's ViewGroup, the ViewGroup can contain one or more Views and one or more ViewGroups, thereby forming a tree-structured UI layout, which can also be called a control tree or component tree. Among them, Webview is a subclass of View.
[0105] The information reading unit is used to read the relevant information of the View object, capture the object instance of the View, and feed back the relevant information of the View object and the View object instance to the recognition unit.
[0106] Step 302: In response to detecting that a page in an application is opened, the View subsystem obtains relevant information and an instance of the Webview of the application, and sends the relevant information and an instance of the Webview of the application to the identification unit. Accordingly, the identification unit receives the relevant information and an instance of the Webview of the application sent by the View subsystem.
[0107] Specifically, the page may be a web page or other types of pages, and the embodiments of the present application do not specifically limit this.
[0108] Exemplarily, after opening the application, the user can click any icon in the homepage to open the page. In response to detecting that a page in the application is opened, the View subsystem can obtain relevant information and instances of the Webview of the application, and can send relevant information and instances of the Webview of the application to the identification unit.
[0109] Among them, the Webview of the application is the Webview corresponding to the current application.
[0110] It is understandable that after the application starts loading the page, it can enter the loading phase of the View subsystem, and the View subsystem can load the View object. In the process of loading the View object, the control tree can be traversed to calculate the position and size of each View object in the parent container. The control tree can refer to Figure 4 The UI layout structure shown will not be described in detail here.
[0111] When traversing the control tree, the Webview of the application can be traversed. Then the addView method of the parent container can be called to add the Webview of the application to the parent container. The addView method can trigger the information reading unit, which can collect the relevant information of the Webview of the application and feed back the relevant information of the Webview of the application and the instance of the View object to the recognition unit.
[0112] When the user opens the web page of the application, the system can traverse to the Webview of the application, and then execute the addView method on the Webview of the application, thereby triggering the information reading unit to obtain relevant information and instances of the Webview of the application.
[0113] Step 303: The identification unit determines whether the Webview of the application is the Webview of the application itself according to the relevant information and instance of the Webview of the application.
[0114] Specifically, after the identification unit receives the relevant information and instance of the Webview of the application, it can determine whether the Webview of the application is the Webview that comes with the application according to the relevant information and instance of the Webview of the application.
[0115] Exemplarily, the relevant information of the Webview of the application may include a package name or a class name.
[0116] It will be understood that the above package name or class name is merely an exemplary description and does not constitute a limitation on the embodiments of the present application. In some embodiments, the relevant information of the applied Webview may also include other types of information.
[0117] Next, it can be determined whether the Webview of the application is the Webview that comes with the application according to the package name (package name) or class name (class name) of the above Webview.
[0118] Exemplarily, the system may preset a mapping relationship between the type of Webview and the package name (package name) or the class name (class name). The mapping relationship between the type of Webview and the package name (package name) or the class name (class name) may be as shown in Table 1.
[0119] Table 1
[0120]
[0121] Referring to Table 1, the UC kernel, XWeb kernel, and X5 kernel are the Webview kernels that come with the application, and the system kernel is the Webview kernel that comes with the system.
[0122] It can be understood that the above-mentioned UC kernel, XWeb kernel and X5 kernel are only exemplary illustrations and do not constitute a limitation on the embodiments of the present application. In some embodiments, the Webview kernel that comes with other types of applications may also be included.
[0123] After obtaining the package name (package name) or class name (class name) of the Webview of the application, it can be determined whether the corresponding Webview type can be found according to the mapping relationship in Table 1, for example.
[0124] If the Webview of the application successfully matches one of the UC kernel, the XWeb kernel, and the X5 kernel through the mapping relationship in Table 1 above, it can be determined that the Webview of the application is the Webview that comes with the application. Or,
[0125] If the Webview of the application fails to successfully match any of the kernels through the mapping relationship in Table 1 above, that is, it does not match the UC kernel, the XWeb kernel, the X5 kernel, and the system kernel, it can be determined that the Webview of the application is the Webview that comes with the application.
[0126] It can be understood that if the Webview of the application successfully matches the system kernel through the mapping relationship in Table 1 above, for example, it can be determined that the Webview of the application is not the Webview that comes with the application.
[0127] Step 304: the identification unit sends an injection notification to the injection unit, notifying the injection unit to inject the script file. Correspondingly, the injection unit receives the injection notification sent by the identification unit.
[0128] Specifically, when the identification unit determines that the Webview of the application is the Webview that comes with the application, an injection notification can be sent to the injection unit, and the injection notification is used to notify the injection unit to inject the script file into the Webview of the application. Among them, the injection notification can include an instance of the Webview of the application. Taking the Webview of the application as the UC kernel as an example, the instance of the UC kernel can be notified to the injection unit.
[0129] Step 305: The injection unit injects the script file into the Webview of the application.
[0130] Specifically, after receiving the injection notification, the injection unit may inject a script file into the Webview of the application, wherein the script file is used to process the currently displayed page.
[0131] In some optional embodiments, the script file may be a boot file, which may be used to guide the injection of a second plug-in. For example, the second plug-in may be an adaptive layout plug-in, which may be used to adaptively adjust the page.
[0132] The second plug-in can be injected as needed. Exemplarily, the system preset information can be obtained through the system interface. The system preset information can be a whitelist file preset in the electronic device, and the whitelist file can record information about which pages need to be inserted with the second plug-in.
[0133] Then, the injection unit can obtain the boot file, and can inject the boot file and system preset information into the Webview of the application. Among them, the boot file can be preset in the plug-in APK, or it can be preset in other system files, and the embodiment of the present application does not make special restrictions on this.
[0134] It can be understood that the injection unit can obtain the injection interface of the Webview instance of the application through the reflection mechanism, and can inject the boot file and the system preset information into the Webview of the application through the injection interface.
[0135] In some optional embodiments, the injection unit may also integrate the boot file and the system preset information, and may inject the integrated information into the Webview of the application. The integration may be by placeholder replacement or other methods, which are not specifically limited in the embodiments of the present application.
[0136] By injecting the boot file into the Webview of the application, the network address of the current page can be obtained. For example, the network address can be a Uniform Resource Locator (URL). In some embodiments, the network address can also be indicated by other identifiers, which is not specifically limited in the embodiments of the present application.
[0137] Then, the address of the page (eg, URL) may be matched with the addresses in the whitelist in the system preset information.
[0138] If there is an address matching the current page in the whitelist in the system preset information, the boot file can inject the second plug-in into the current page, so that after the page is loaded, the second plug-in can process the page. Taking the second plug-in as an adaptive layout plug-in as an example, when the adaptive layout plug-in is inserted into the current page through the boot file and the current page is loaded, the adaptive layout plug-in can adaptively rearrange the current page.
[0139] It is understandable that the address in the above whitelist and the page address may be matched by a complete match or a prefix match, and the embodiment of the present application does not specifically limit this.
[0140] In some optional embodiments, the script file may also be a debugging tool, which may be used to debug the current page.
[0141] Figure 5 This is a schematic diagram of the structure of an embodiment of the page display device of this application, such as Figure 5 As shown, the page display device 50 may include: a determination module 51 and an injection module 52; wherein,
[0142] A determination module 51 is used to determine whether the Webview of the application is a Webview provided by the application in response to detecting that a page in the application is opened;
[0143] The injection module 52 is used to inject a script file into the Webview of the application if it is determined that the Webview of the application is the Webview of the application itself, wherein the script file is used to process the page.
[0144] In one possible implementation, the script file is a boot file, and the boot file is used to guide the injection of an adaptive layout plug-in, and the adaptive layout plug-in is used to perform adaptive layout on the page.
[0145] In one possible implementation, the injection module 52 is further used to determine whether the adaptive layout plug-in needs to be injected into the page;
[0146] If it is determined that the adaptive layout plug-in needs to be injected into the page, the adaptive layout plug-in is injected into the page using the boot file.
[0147] In one possible implementation, the injection module 52 is further used to obtain system preset information, and the system preset information includes a whitelist address;
[0148] If the network address of the page matches the whitelist address, it is determined that the adaptive layout plug-in needs to be injected into the page.
[0149] In one possible implementation manner, the script file is a debugging tool, and the debugging tool is used to debug the page.
[0150] In one possible implementation, the determination module 51 is further configured to obtain relevant information and an instance of the Webview of the application in response to detecting that a page in the application is opened;
[0151] According to the relevant information and instance of the Webview of the application, it is determined that the Webview of the application is the Webview that comes with the application.
[0152] In one possible implementation, the determination module 51 is further used to determine that the Webview of the application is the Webview that comes with the application if the Webview type corresponding to the relevant information and instance of the Webview of the application is a non-system kernel type.
[0153] In one possible implementation, the relevant information of the Webview of the application includes the package name or class name of the Webview of the application.
[0154] Figure 5 The page display device 50 provided in the illustrated embodiment can be used to execute the technical solution of the method embodiment illustrated in the present application, and its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.
[0155] It should be understood that the above Figure 5 The division of the various modules of the page display device 50 shown is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in a processor element or instructions in the form of software.
[0156] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0157] In the above embodiments, the processor involved may include, for example, a CPU, a DSP, a microcontroller or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units; hereinafter referred to as: NPU) and an image signal processor (Image Signal Processing; hereinafter referred to as: ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.
[0158] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method provided by the embodiment shown in the present application.
[0159] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program is run on a computer, it enables the computer to execute the method provided by the embodiment shown in the present application.
[0160] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0161] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0163] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.
[0164] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A page display method, characterized in that: The method comprises: In response to detecting that a page in an application is opened, determining whether the Webview of the application is a Webview provided by the application; If it is determined that the Webview of the application is the Webview that comes with the application, a script file is injected into the Webview of the application, wherein the script file is used to process the page.
2. The method according to claim 1, characterized in that The script file is a boot file, and the script file is used to process the page including: The boot file is used to guide the injection of an adaptive layout plug-in, and the adaptive layout plug-in is used to perform adaptive layout on the page.
3. The method according to claim 2, characterized in that After injecting the script file into the Webview of the application, the method further includes: Determine whether the adaptive layout plug-in needs to be injected into the page; If it is determined that the adaptive layout plug-in needs to be injected into the page, the adaptive layout plug-in is injected into the page using the boot file.
4. The method according to claim 3, characterized in that The determining whether the adaptive layout plug-in needs to be injected into the page includes: Acquire system preset information, wherein the system preset information includes a whitelist address; If the network address of the page matches the whitelist address, it is determined that the adaptive layout plug-in needs to be injected into the page.
5. The method according to claim 1, characterized in that The script file is a debugging tool, and the script file is used to process the page including: The debugging tool is used to debug the page.
6. The method according to any one of claims 1 to 5, characterized in that: In response to detecting that a page in an application is opened, determining whether the Webview of the application is a Webview provided by the application includes: In response to detecting that a page in an application is opened, obtaining relevant information and an instance of a Webview of the application; According to the relevant information and instance of the Webview of the application, it is determined that the Webview of the application is the Webview that comes with the application.
7. The method according to claim 6, characterized in that The determining, based on the relevant information and instance of the Webview of the application, that the Webview of the application is the Webview that comes with the application includes: If the Webview type corresponding to the relevant information and instance of the Webview of the application is a non-system kernel type, it is determined that the Webview of the application is the Webview that comes with the application.
8. The method according to claim 7, characterized in that The relevant information of the Webview of the application includes the package name or class name of the Webview of the application.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store a computer program; and the processor is used to run the computer program to implement the page display method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the page display method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Application test method and apparatus, and computer storage medium
CN108595329A
Mobile Application Webview Modification
US20180314513A1
Cited By
Page display method, electronic device and storage medium
EP4660849A1
