Page display method, electronic device and storage medium
By detecting and injecting script files into the folded screen of electronic devices for adaptive layout, the problem of insufficient content display in the folded screen is solved, the user experience is improved, and the adaptive display of cross-vendor Webview is realized.
Patent Information
- Application Number
- PCT/CN2024/075895
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-25
- Filing Date
- 2024-02-05
- Publication Date
- 2025-01-02
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. The script file can be used as a boot file or debugging tool, injecting adaptive layout plug-ins or debugging tools, and decide whether to perform adaptive layout based on the system preset information.
Improves the user's browsing experience of the page, solves the problem of layout elements exceeding the screen range, and realizes adaptive display capabilities in different Webview kernels.
Smart Images

Figure CN2024075895_02012025_PF_FP_ABST
Abstract
Description
Page display method, electronic device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on June 25, 2023, with application number 202310757457.6 and application name “Page display method, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of smart terminals, and in particular to a page display method, electronic device, and storage medium. Background Art
[0003] With the continuous development of electronic technology, the screen forms of electronic devices (such as mobile phones) are becoming more and more diverse. At present, a considerable number of electronic devices are equipped with foldable screens. When the foldable screen of an electronic device is in the unfolded state, the screen size becomes larger. However, in some scenarios, the content displayed on the unfolded foldable screen may be less than that displayed on the folded screen. Some layout elements may even exceed the screen range, affecting user operations and failing to fully utilize the advantages of the foldable screen's large screen.
[0004] 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.
[0005] However, currently, applications developed by different manufacturers have their own Webview kernels, and WebUI adaptive technology is a non-open source technology, which makes it impossible to use WebUI adaptive technology in the Webview kernels of different manufacturers, and the user experience on folding screens is still very poor.
[0006] Summary of the Invention
[0007] The present application provides a page display method, electronic device and storage medium, which help to improve the user's browsing experience of the page.
[0008] In a first aspect, the present application provides a page display method, comprising: 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; 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.
[0009] 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.
[0010] 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.
[0011] 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.
[0012] In one possible implementation, 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.
[0013] In one possible implementation, 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.
[0014] 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.
[0015] 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.
[0016] 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.
[0017] 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.
[0018] 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; and the processor is used to run the computer program to implement the page display method as described in the first aspect.
[0019] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer implements the page display method described in the first aspect.
[0020] 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, it enables the electronic device to execute the page display method as described in the first aspect.
[0021] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, or may be stored in whole or in part on a memory not packaged with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0023] FIG2 is a schematic diagram of the system architecture provided in an embodiment of the present application;
[0024] FIG3 is a flow chart of an embodiment of a page display method provided by the present application;
[0025] FIG4 is a schematic diagram of a UI layout architecture provided in an embodiment of the present application;
[0026] FIG5 is a schematic structural diagram of an embodiment of a page display device provided in this application. DETAILED DESCRIPTION
[0027] In the embodiments of this application, unless otherwise specified, the character " / " indicates that the associated objects are in an "or" relationship. For example, A / B can represent A or B. "And / or" describes the relationship between the associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exists simultaneously, or B exists alone.
[0028] It should be pointed out that the words "first", "second", etc. involved in the embodiments of this application are only used for distinguishing description purposes, 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.
[0029] 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 can 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 can be an element itself, or a set containing one or more elements.
[0030] In the embodiments of this application, the terms "exemplary," "in some embodiments," and "in another embodiment" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" in this application should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner.
[0031] In the embodiments of this application, the terms "of," "corresponding," and "relevant" may sometimes be used interchangeably. It should be noted that, when the distinction between them is not emphasized, the meanings they convey are the same. In the embodiments of this application, the terms "communication" and "transmission" may sometimes be used interchangeably. It should be noted that, when the distinction between them is not emphasized, the meanings they convey are the same. For example, "transmission" may include "sending" and / or "receiving," and may be either a noun or a verb.
[0032] In the embodiments of this application, "equal to" can be used in conjunction with "greater than" and is applicable to the technical solution adopted when "greater than" is used, and can also be used in conjunction with "less than" and is applicable to the technical solution adopted when "less than" is used. It should be noted that when "equal to" is used in conjunction with "greater than", it cannot be used in conjunction with "less than"; and when "equal to" is used in conjunction with "less than", it cannot be used in conjunction with "greater than".
[0033] With the continuous development of electronic technology, the screen forms of electronic devices (such as mobile phones) are becoming more and more diverse. At present, a considerable number of electronic devices are equipped with foldable screens. When the foldable screen of an electronic device is in the unfolded state, the screen size becomes larger. However, in some scenarios, the content displayed on the unfolded foldable screen may be less than that displayed on the folded screen. Some layout elements may even exceed the screen range, affecting user operations and failing to fully utilize the advantages of the foldable screen's large screen.
[0034] 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.
[0035] However, currently, applications developed by different manufacturers have their own Webview kernels, and WebUI adaptive technology is a non-open source technology, which makes it impossible to use WebUI adaptive technology in the Webview kernels of different manufacturers, and the user experience on folding screens is still very poor.
[0036] 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.
[0037] The electronic device can be a mobile terminal with a foldable screen. The mobile terminal can also be called a terminal device, user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, 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 capabilities, 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), 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.
[0038] FIG1 first exemplarily shows a structural diagram of an electronic device 100 .
[0039] 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.
[0040] It should be understood that the structure illustrated in the embodiments 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, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0041] 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 processing unit (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). The different processing units may be independent devices or integrated into one or more processors.
[0042] 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.
[0043] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0044] In some embodiments, the processor 110 may include one or more interfaces. The interfaces 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.
[0045] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0046] 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 enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.
[0047] 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, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0048] The UART interface is a universal serial data bus used for asynchronous communication. This 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 typically 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 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.
[0049] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0050] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, 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.
[0051] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 and to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect to other terminal devices, such as AR devices.
[0052] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative 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 from the above embodiments, or a combination of multiple interface connection methods.
[0053] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the terminal device via the power management module 141.
[0054] 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 provides power to the processor 110, the internal memory 121, the display 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 count, and battery health status (leakage, impedance). 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.
[0055] 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.
[0056] 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 antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0057] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G 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.
[0058] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted 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 being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the 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.
[0059] 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 that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0060] 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 a network and other devices through wireless communication technologies. The wireless communication technologies 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).
[0061] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0062] Display screen 194 is used to display images, videos, and the like. 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0063] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0064] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0065] 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 light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion 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.
[0066] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0067] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0068] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.
[0069] 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 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0070] 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.
[0071] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0072] 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 provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0073] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.
[0074] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.
[0075] Microphone 170C, also known as "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 the microphone 170C to input the sound signal into the 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 source of sound, realize directional recording function, etc.
[0076] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0077] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.
[0078] The gyroscope 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 gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope 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 gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0079] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
[0080] 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 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 based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.
[0081] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the terminal's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0082] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.
[0083] 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 is holding 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.
[0084] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.
[0085] 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.
[0086] 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 the 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 prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.
[0087] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.
[0088] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.
[0089] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0090] 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.
[0091] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0092] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it 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.
[0093] The page display method provided in the embodiment of the present application is now described with reference to Figures 2 to 4.
[0094] FIG2 is a diagram of the system architecture provided in an embodiment of the present application. Referring to FIG2 , the electronic device may include a framework and a Webview kernel. The framework may be an Android system framework or a framework of another operating system, and the present application does not specifically limit this.
[0095] Taking the Android system as an example, the framework may include a View subsystem, which is used to manage the application's user interface (UI). The View subsystem may also include an information reading unit, which is used to read information related to View objects. A View object can be understood as a basic UI component in the operating system, used to display the user interface.
[0096] The framework may further include a component repository, the component repository may include a first plug-in, and the first plug-in may include an identification unit and an injection unit. The identification unit is configured to request relevant information of a View object from the information reading unit, so that upon receiving the request, the information reading unit may return relevant information of the corresponding View object to the identification unit and may identify the returned relevant information of the View object.
[0097] When the recognition unit recognizes the view object that comes with the application, the injection unit may be called to enable the injection unit to inject the script file into the view object that comes with the application.
[0098] The script file may be a boot file, and a 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 requires adaptive adjustment of the page layout, the adaptive layout plug-in may be injected through the boot file so as to adaptively adjust the current page.
[0099] 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.
[0100] It is understandable that the above-mentioned script file can also be other types of files or tools, and the embodiments of the present application do not specifically limit this.
[0101] The following text combines Figures 3 and 4 to illustrate the page display method provided in the embodiment of the present application by taking the Android system as an example. It can be understood that although the embodiment of the present application is illustrated by taking 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.
[0102] FIG3 is a flow chart of an embodiment of a page display method provided by the present application, which specifically includes the following steps:
[0103] Step 301 : In response to detecting that an application is opened, initializing a recognition unit.
[0104] Specifically, after the user opens the application, the recognition unit may be initialized during the loading phase of the application.
[0105] 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, waiting to be triggered to initialize the recognition unit. Among them, 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, thereby forming a hierarchical UI layout structure as shown in Figure 4.
[0106] Referring to Figure 4, for 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.
[0107] 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.
[0108] In step 302, in response to detecting that a page in the application is opened, the View subsystem obtains the relevant information and instance of the application's Webview and sends the relevant information and instance of the application's Webview to the identification unit. Correspondingly, the identification unit receives the relevant information and instance of the application's Webview sent by the View subsystem.
[0109] Specifically, the page can be a web page or other types of pages, and the embodiments of the present application do not specifically limit this.
[0110] For example, after opening an application, the user can click any icon on 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 application's Webview and send the relevant information and instances of the application's Webview to the recognition unit.
[0111] The Webview of the application is the Webview corresponding to the current application.
[0112] It's understandable that after the application begins loading a page, it enters the View subsystem's loading phase, where it loads View objects. During the View object loading process, the control tree is traversed to calculate the position and size of each View object within its parent container. The control tree can refer to the UI layout structure shown in Figure 4 and will not be further described here.
[0113] When traversing the control tree, the application's WebView is found. The parent container's addView method is then called to add the application's WebView to the parent container. This addView method triggers the information reading unit, which collects information about the application's WebView and feeds it back to the recognition unit, along with the View object instance.
[0114] When a user opens an application's web page, the system can traverse the application's Webview, and then execute the addView method on the application's Webview, thereby triggering the information reading unit to obtain relevant information and instances of the application's Webview.
[0115] In step 303 , the identification unit determines whether 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.
[0116] Specifically, after receiving the relevant information and instance of the Webview of the application, the identification unit 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.
[0117] Exemplarily, the relevant information of the Webview of the application may include a package name or a class name.
[0118] It will be understood that the above package name or class name is merely an illustrative 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.
[0119] Next, you can determine whether the application's Webview is the application's own Webview based on the package name or class name of the Webview.
[0120] For example, the system may preset a mapping relationship between the type of Webview and the package name or class name. The mapping relationship between the type of Webview and the package name or class name may be as shown in Table 1.
[0121] Table 1
[0122] 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.
[0123] It will be understood that the above-mentioned UC kernel, XWeb kernel and X5 kernel are merely exemplary illustrations and do not constitute a limitation on the embodiments of the present application. In some embodiments, Webview kernels that come with other types of applications may also be included.
[0124] After obtaining the package name (package name) or class name (class name) of the application's Webview, it can be determined whether the corresponding Webview type can be found according to the mapping relationship in Table 1, for example.
[0125] If the application's Webview successfully matches one of the UC kernel, XWeb kernel, and X5 kernel through the mapping relationship in Table 1 above, it can be determined that the application's Webview is the application's own Webview. Or,
[0126] If the application's Webview 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, XWeb kernel, X5 kernel, and system kernel, it can be determined that the application's Webview is the application's own Webview.
[0127] It is understandable that if the Webview of the application is successfully matched with 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.
[0128] Step 304: The identification unit sends an injection notification to the injection unit, instructing the injection unit to inject the script file. Correspondingly, the injection unit receives the injection notification sent by the identification unit.
[0129] Specifically, when the identification unit determines that the application's Webview is the application's own Webview, it can send an injection notification to the injection unit, which is used to notify the injection unit to inject the script file into the application's Webview. The injection notification can include an instance of the application's Webview. For example, if the application's Webview is a UC kernel, the instance of the UC kernel can be notified to the injection unit.
[0130] Step 305: The injection unit injects the script file into the Webview of the application.
[0131] 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.
[0132] 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.
[0133] The second plug-in can be injected on demand. For example, system preset information can be obtained through a 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.
[0134] Then, the injection unit can obtain the boot file and 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 in other system files, which is not specifically limited in this embodiment of the application.
[0135] It is understandable that the injection unit can obtain the injection interface of the application's Webview instance through a reflection mechanism, and can inject the boot file and system preset information into the application's Webview through the injection interface.
[0136] In some optional embodiments, the injection unit may also integrate the boot file and system preset information, and may inject the integrated information into the application's WebView. The integration may be through placeholder replacement or other methods, which are not specifically limited in the present embodiment.
[0137] 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.
[0138] Then, the address of the page (eg, URL) may be matched with the addresses in the whitelist in the system preset information.
[0139] If the whitelist in the system's pre-configured information contains an address that matches the current page, the bootstrap 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. For example, if the second plug-in is an adaptive layout plug-in, when the adaptive layout plug-in is inserted into the current page through the bootstrap file and the current page is loaded, the adaptive layout plug-in can adaptively rearrange the current page.
[0140] It is understandable that the matching method between the addresses in the above whitelist and the page addresses can be through a complete match or a prefix match, and the embodiments of the present application do not specifically limit this.
[0141] In some optional embodiments, the script file may also be a debugging tool, which may be used to debug the current page.
[0142] FIG5 is a schematic diagram of the structure of an embodiment of the page display device of the present application. As shown in FIG5 , the page display device 50 may include: a determination module 51 and an injection module 52; wherein,
[0143] A determination module 51 is configured to, in response to detecting that a page in an application is opened, determine whether the Webview of the application is a Webview that comes with the application;
[0144] 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.
[0145] In one possible implementation, the script file is a boot file, which 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.
[0146] In one possible implementation, the injection module 52 is further configured to determine whether the adaptive layout plug-in needs to be injected into the page;
[0147] 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.
[0148] In one possible implementation, the injection module 52 is further configured to obtain system preset information, wherein the system preset information includes a whitelist address;
[0149] 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.
[0150] In one possible implementation, the script file is a debugging tool, and the debugging tool is used to debug the page.
[0151] In one possible implementation, the determining 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;
[0152] Determine, 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.
[0153] In one possible implementation, the determination module 51 is further configured 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.
[0154] 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.
[0155] The page display device 50 provided in the embodiment shown in FIG5 can be used to execute the technical solution of the method embodiment shown in this application. Its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.
[0156] It should be understood that the division of the various modules of the page display device 50 shown in Figure 5 above 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. Moreover, these modules can all be implemented in the form of software called through processing elements; they can also all be implemented in the form of hardware; some modules can also be implemented in the form of software called 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, these modules can all or partly be integrated together, or they can be implemented independently. During the implementation process, each step of the above method or each of the above modules can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.
[0157] 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 (ASICs), one or more microprocessors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, these modules may be integrated together to implement a system-on-a-chip (SOC).
[0158] 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 (hereinafter referred to as: ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of the program of the technical solution of this 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.
[0159] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. 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.
[0160] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program product is run on a computer, it enables the computer to execute the method provided by the embodiment shown in the present application.
[0161] In the embodiments of the present application, "at least one" refers to one or more, and "more" 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 represent: 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.
[0162] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented using 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. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0163] Those skilled in the art will 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.
[0164] In the several embodiments provided in this 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 this 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. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this 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), magnetic disk or optical disk, and other media that can store program code.
[0165] The above description is merely a specific embodiment of the present application. Any person skilled in the art may easily conceive of variations or substitutions within the technical scope disclosed in this application, and such variations or substitutions shall be within the scope of protection of this application. The scope of protection of this application shall be subject to the scope of protection 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
Compatibility processing method and device for embedding H5 page into APP
CN110020276A
Debugging method executed on intelligent terminal and software debugger
CN111666199A
Method, device and equipment for mobile terminal to store application page and medium
CN114510308A
Method and system for displaying customized webpage on double webview
US20150370912A1