Methods for switching page broadcast modes, electronic devices and readable media
By displaying a floating window on the interface of the second application and using AccessibilityService to intercept and parse events, the problem of inconvenient switching of broadcast modes in the existing technology is solved, realizing a simple and convenient switching of broadcast modes and improving the user experience.
Patent Information
- Application Number
- CN202211443375.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-11-17
AI Technical Summary
In existing technologies, switching the broadcast mode of applications that support accessibility services is not simple or convenient enough, and the user operation is cumbersome.
By displaying a floating window on the interface of the second application and responding to the user's trigger operation, the broadcast mode of the first application can be switched. The AccessibilityService is used to intercept and parse events to switch to the target broadcast mode.
It enables easy and convenient switching of the broadcast mode for applications that support accessibility services, thus improving the user experience.
Smart Images

Figure CN118051289B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic equipment technology, and in particular to a method for switching page broadcast modes, electronic equipment, computer program products, and computer-readable storage media. Background Technology
[0002] Mobile phones and other electronic devices are equipped with applications that support accessibility services. Accessibility services provide better user interaction features for users with disabilities or those who are temporarily unable to fully interact with the device.
[0003] Currently, one type of application supporting accessibility services has the function of providing screen content reading to users. This application typically includes multiple reading modes, and it is necessary to provide users with a simple and convenient way to switch between the reading modes of applications supporting accessibility services. Summary of the Invention
[0004] This application provides a method for switching page broadcast modes, an electronic device, a computer program product, and a computer-readable storage medium, with the aim of providing a simple and convenient way to switch the broadcast mode of an application that supports accessibility services.
[0005] To achieve the above objectives, this application provides the following technical solution:
[0006] In a first aspect, this application provides a method for switching page display modes applicable to an electronic device. The electronic device has a first application and a second application installed. The first application supports accessibility services. The method for switching page display modes includes: displaying a first interface of the second application, the first interface of the second application including a first floating window, the first floating window displaying an icon of the first application's first display mode; and responding to a user's trigger operation on the first floating window, displaying a second floating window on the first interface of the second application, the second floating window displaying an icon of the first application's second display mode.
[0007] As can be seen from the above: the first application supports accessibility services and runs in the first broadcast mode; the first interface of the second application can display the first floating window. When a user wants to switch the broadcast mode of the first application, the user performs a trigger operation on the first floating window displayed on the first interface of the second application. The electronic device can respond to the user's trigger operation on the first floating window and display a second floating window on the first interface of the second application. The second floating window displays the icon of the second broadcast mode of the first application, thus realizing a simple and convenient way to switch the broadcast mode of an application that supports accessibility services.
[0008] It should be noted that the user's trigger action on the first floating window can usually be a double-click, but it can also be a swipe, a long-term click, etc.
[0009] In one possible implementation, before displaying the second floating window on the first interface of the second application, the method further includes: the AccessibilityService intercepts an event generated by a user's triggering operation on the first floating window; the AccessibilityService reports the event to the first application; the first application parses the event and uses the parsing result to switch the first broadcast mode to the second broadcast mode.
[0010] In one possible implementation, after the first floating window displays the icon of the first application's point-and-read mode and the first interface of the second application is displayed, the method further includes: in response to a single-finger swipe operation input by the user on the first interface of the second application, displaying a second floating window on the first interface of the second application, the second floating window displaying the icon of the first application's second broadcast mode.
[0011] In one possible implementation, switching from a first broadcast mode to a second broadcast mode using the event parsing results includes: pausing broadcasting, changing the icon of the first broadcast mode to the icon of the second broadcast mode, and modifying the status value from a first value to a second value, the status value being used to indicate the broadcast mode of the first application.
[0012] In one possible implementation, the first application parses the event, including: an event type and an event object, wherein the event type is used to indicate the type of user operation, and the event object is used to indicate the object of the user operation.
[0013] In one possible implementation, the first floating window displays an icon of the full-text reading mode of the first application. After displaying the first interface of the second application, the method further includes: responding to a single-finger swipe operation input by the user on the first interface of the second application, displaying a second interface of the second application, wherein the second interface of the second application includes the first floating window, and the content of the second interface is different from the content of the first interface.
[0014] In one possible implementation, after the first floating window displays the icon of the first application's point-and-read mode and the first interface of the second application is displayed, the method further includes: in response to a user's two-finger swipe operation on the first interface of the second application, displaying a third interface of the second application, wherein the third interface of the second application includes the first floating window and the interface content of the third interface is different from the interface content of the first interface.
[0015] In one possible implementation, the method for switching the page broadcast mode further includes: displaying a fourth interface of the second application, the fourth interface of the second application including a floating frame; and displaying a fifth interface of the second application in response to a single-finger swipe operation input by the user on the fourth interface of the second application, the fifth interface of the second application including a floating frame, and the interface content of the fifth interface being different from the interface content of the fourth interface.
[0016] In one possible implementation, the AccessibilityService is configured with status values for user actions.
[0017] In one possible implementation, before the AccessibilityService reports the event to the first application, it further includes: the AccessibilityService using filtering rules to determine that the first application belongs to the application that reported the event.
[0018] In a second aspect, this application provides an electronic device, including: one or more processors, a memory, and a display screen; the memory and the display screen are coupled to one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and when one or more processors execute the computer instructions, the electronic device executes the page broadcast mode switching method described in any one of the first aspects.
[0019] Thirdly, this application provides a computer-readable storage medium for storing a computer program, which, when executed, is specifically used to implement the page broadcast mode switching method as described in any one of the first aspects.
[0020] Fourthly, this application provides a computer program product that, when run on a computer, causes the computer to execute a page broadcast mode switching method as described in any one of the first aspects. Attached Figure Description
[0021] Figure 1 A schematic diagram illustrating a user interface for launching an on-demand reading application, provided as an embodiment of this application;
[0022] Figure 2 A schematic diagram illustrating another user interface for launching an on-demand reading application, provided as an embodiment of this application;
[0023] Figure 3 Schematic diagrams of various user interfaces for the on-demand reading application provided in the embodiments of this application;
[0024] Figure 4 A schematic diagram of the user interface for switching between full-text reading mode and point-and-read mode in the on-demand reading application provided in this application embodiment;
[0025] Figure 5a A schematic diagram of a user interface for displaying a floating frame of an on-demand reading application on the interface of an application, provided for an embodiment of this application;
[0026] Figure 5b A schematic diagram of a user interface for displaying a floating ball in the full-text reading mode of an on-demand reading application on the interface of an application provided in this application embodiment;
[0027] Figure 5c A schematic diagram of a user interface for displaying a floating ball representing the point-and-read mode of a selectable reading application on the interface of an application provided in this application embodiment;
[0028] Figure 6 A schematic diagram of a user interface provided for an embodiment of this application, showing how inputting operations on the interface of an application to control the switching between full-text reading mode and point-and-read mode of the on-demand reading application;
[0029] Figure 7 A hardware structure diagram of the electronic device provided in the embodiments of this application;
[0030] Figure 8 A software framework diagram of an electronic device provided in the embodiments of this application;
[0031] Figure 9 A timing diagram illustrating a method for switching page broadcast modes provided in an embodiment of this application. Detailed Implementation
[0032] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. The terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to be a limitation of this application. As used in the specification and appended claims of this application, the singular expressions "a," "an," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the embodiments of this application, "one or more" refers to one, two, or more; "and / or" describes the relationship between related objects, indicating that three relationships may exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0033] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0034] The "multiple" mentioned in the embodiments of this application refers to two or more. It should be noted that in the description of the embodiments of this application, terms such as "first" and "second" are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance, nor should they be construed as indicating or implying order.
[0035] Accessibility services provide better accessibility features for users with disabilities or those temporarily unable to fully interact with devices. On-Demand Reading apps are applications that support accessibility services, providing users with the ability to read screen content aloud. Of course, "On-Demand Reading" is an example name; it can be called "Multi-Select Reading" or other names without specific limitations.
[0036] The on-demand text-to-speech app offers two reading modes: full-text reading mode and point-and-read mode. In full-text reading mode, the app reads the text displayed on the device screen; in point-and-read mode, it reads the text selected by the user. Furthermore, when a user selects content to be read aloud by clicking on the text, a blue box appears around the clicked text to indicate the content to be read. The blue box disappears after a certain duration, such as one second.
[0037] The following example uses the On-Demand Reading app installed on a mobile phone to illustrate how to enable or disable it. Normally, the On-Demand Reading app is disabled by default; users can manually activate it.
[0038] Figure 1 This demonstrates one way for users to manually launch the on-demand text-to-speech application.
[0039] like Figure 1 As shown in (a), the user taps the settings app icon 101 to open the settings app. The phone responds to the user's tap and displays the settings app interface. For example, Figure 1 (b) shows the interface for setting up the application. For example... Figure 1 As shown in (b), the settings application's interface displays an accessibility button 102. When the user clicks the accessibility button 102, the phone responds to the user's click and displays the accessibility interface. For example, Figure 1 (c) in the diagram shows the accessibility interface. For example... Figure 1 As shown in (c), the accessibility interface displays an accessibility button 103. When the user clicks the accessibility button 103, the phone responds to the user's click and displays the accessibility interface. For example, Figure 1 (d) in the example demonstrates an accessible interface. For example... Figure 1 As shown in (d), the accessible interface displays a button 104 for the on-demand reading application. When the user clicks the button 104, the phone responds to the user's click and displays the on-demand reading application interface. For example, Figure 1 (e) in the image shows the interface of the on-demand text-to-speech application. For example... Figure 1 As shown in (e), the interface of the on-demand reading application displays an on / off button 105. Figure 1 In (e), the on / off button 105 of the on-demand reading application is shown to be in the off state, indicating that the on-demand reading application is not open. Figure 1 As shown in (e), the user clicks the on / off button 105 of the on-demand reading application, indicating that the on-demand reading application should be turned on. The phone responds to the user's click, turns on the on-demand reading application, and... Figure 1 As shown in (f), a pop-up (also known as a floating box, floating window, etc.) is displayed on the interface of the on-demand reading application.
[0040] The pop-up window from the on-demand text-to-speech app is an accessibility-type pop-up, with higher display priority. It can be displayed on top of other applications, including native operating system applications and third-party applications. Native applications include launcher apps and settings apps, while third-party applications include news apps. It's worth noting that the on-demand text-to-speech app pop-up window can also be displayed on top of the lock screen.
[0041] It should be noted that once the on-demand reading application is enabled, it can run in full-text reading mode.
[0042] Figure 2 This demonstrates another way for users to manually launch the on-demand text-to-speech application.
[0043] Control switches for on-demand text-to-speech applications can be added to the Control Center. For example... Figure 2 As shown in (a), the control center interface of the mobile phone displays a control switch 201 for on-demand reading. When the user clicks the on-demand reading control switch 201, the mobile phone responds to the user's click operation and displays as shown in (a). Figure 2The interface of the On-Demand Reading app is shown in (b). Users can turn on the On-Demand Reading app by clicking the on or off button displayed on the interface.
[0044] Once the On-Demand Reading app is launched, a floating window appears on its interface. This window includes control buttons for the text to be read aloud. Users can click on different control buttons to control the text being read aloud. The floating window also includes the name of the app it belongs to. Furthermore, when the On-Demand Reading app is in full-text reading mode and not reading aloud, the floating window also displays the estimated time for the content to be read aloud.
[0045] like Figure 3 As shown in (a), the control buttons for the reading content on the floating frame include: refresh button 301, zoom out button 302, point-and-read button 303, rewind button 304, play / pause button 305, fast forward button 306, and zoom button 307.
[0046] The refresh button 301 is used to control the On-Demand Reading application to update the content to be read. After the phone enters a new interface, the user can click the refresh button 301 to control the On-Demand Reading application to read the content of the new interface.
[0047] The shrink button 302 is used to control the floating frame to shrink into a floating ball. For example... Figure 3 As shown in (a), when the user clicks the zoom-out button 302, the phone responds to the user's click operation, closes the floating window, and displays the following on the interface of the on-demand reading application: Figure 3 The floating ball 308 shown in (b) can be understood as the floating ball in the full-text reading mode. Users such as... Figure 3 As shown in (b), clicking the floating ball 308 will cause the phone to respond to the user's click, closing the floating ball and displaying the following on the interface of the on-demand reading application: Figure 3 The floating box shown in (a) is shown in the image.
[0048] The point-and-read button 303 is used to control the selected reading application to enter point-and-read mode. For example... Figure 3 As shown in (a), when the user clicks the point-and-read button 303, the phone responds to the user's click and controls the on-demand reading application to enter point-and-read mode. Furthermore, the floating window on the on-demand reading application's interface is closed, displaying as shown in [image missing]. Figure 3 The floating ball 309 in the point-reading mode is shown in (d) in the figure.
[0049] The rewind button 304 is used to control the on-demand reading application to replay previously read content. The play / pause button 305 is used to control the on-demand reading application to start or stop reading page content. The fast forward button 306 is used to control the on-demand reading application to fast forward the read content. The rate up button 307 is used to adjust the reading speed of the on-demand reading application.
[0050] It should be noted that, Figure 3 The floating box shown in (a) and Figure 3 The floating ball shown in (b) is toggleable. The user drags it towards the edge of the interface. Figure 3 The floating box shown in (a) can disappear from the interface of the Read On Demand app and appear on the interface of the Read On Demand app. Figure 3 The suspended sphere 308 is shown in (b) of the diagram.
[0051] User Figure 3 When the floating box shown in (a) remains inactive for a certain period of time, such as 5 seconds, the floating box may disappear from the interface of the Read On Demand app and then reappear on the interface of the Read On Demand app. Figure 3 The suspended sphere 308 is shown in (b) of the diagram.
[0052] Furthermore, users' views Figure 3 As shown in (b), when the time of inactivity of the levitating ball 308 reaches another threshold, such as 5 seconds, the levitating ball 308 can also enter a semi-hidden state, such as... Figure 3 As shown in (c) in the figure.
[0053] Users Figure 3 As shown in (c), clicking the semi-hidden floating ball 308 will cause the phone to respond to the user's click, closing the semi-hidden floating ball 308 and displaying it on the interface of the on-demand reading application. Figure 3 The floating box shown in (a) is shown in the image.
[0054] Figure 3 The floating ball of the on-demand reading application shown in (b) and (d) is an accessibility-type pop-up, which has a high display priority and can be displayed on top of other applications or on top of the lock screen.
[0055] As mentioned earlier, the on-demand reading application can be divided into full-text reading mode and point-and-read mode, and users can control the on-demand reading application to switch between full-text reading mode and point-and-read mode. Figure 3 (a) and (d) in the text show one way to switch between full-text reading mode and point-and-read mode in the Read On Demand app, but this method cannot achieve the more convenient switching from point-and-read mode to full-text reading mode in the Read On Demand app.
[0056] Figure 4This demonstrates another way for the On-Demand Reading app to switch between full-text reading mode and point-and-read mode.
[0057] like Figure 4 As shown in (a) and (b), users can control the on-demand reading application to switch from full-text reading mode to point-and-read mode by double-clicking the floating ball 308 in full-text reading mode; or they can control the on-demand reading application to switch from point-and-read mode to full-text reading mode by double-clicking the floating ball 309 in point-and-read mode.
[0058] It should also be noted that once the On-Demand Reading app is launched, it typically runs in the background. When other apps are launched on the phone and their interfaces are displayed on the screen, the On-Demand Reading app's floating window and floating ball will also appear on those other apps' interfaces.
[0059] Figure 5a The image shows the floating window of the On-Demand Reading app displayed on the XX News app interface after the On-Demand Reading app is enabled. (Example:) Figure 5a As shown in (a), the floating window of the on-demand reading application appears on top of the XX News application's interface. In addition to clicking the control buttons for the reading content in the floating window of the on-demand reading application, users can also perform swipe operations on the XX News application's interface.
[0060] For example, such as Figure 5a As shown in (a), when a user swipes up with one finger on the XX News app interface, the phone responds by displaying the hidden content of the XX News app interface. Similarly, when a user swipes down with one finger on the XX News app interface, the phone responds by displaying the hidden content of the XX News app interface.
[0061] After the floating ball of the on-demand reading app appears on top of other apps, users can also input up or down swipe actions on the app's interface. The phone responds to the user's swipe actions and displays the hidden content of the app's interface.
[0062] Figure 5b The image shows a floating window displaying the full-text reading mode of the On-Demand Reading app on the XX News app's interface after the app is activated. For example, as shown... Figure 5b As shown in (a), when a user swipes up with one finger on the XX News app interface, the phone responds by displaying the hidden content of the XX News app interface. Similarly, when a user swipes down with one finger on the XX News app interface, the phone responds by displaying the hidden content of the XX News app interface.
[0063] Figure 5c The image shows a floating window displaying the point-and-read mode of the On-Demand Reading app on the XX News app's interface after the app is activated. For example,... Figure 5c As shown in (a), when a user swipes up with two fingers on the XX News app interface, the phone responds by displaying the hidden content of the XX News app interface. Similarly, when a user swipes down with two fingers on the XX News app interface, the phone responds by displaying the hidden content of the XX News app interface.
[0064] The On-Demand Reading app runs in point-and-read mode. The floating ball of the On-Demand Reading app in point-and-read mode is displayed on the interface of other apps. Users can control the On-Demand Reading app to exit point-and-read mode and enter full-text reading mode by swiping a single finger on the interface of other apps.
[0065] For example, Figure 6 The image shows the floating icon of the On-Demand Reading app displayed on the XX News app interface after the On-Demand Reading app is enabled. Figure 6 As shown in (a), the XX News app's interface displays a floating ball indicating the point-and-read mode of the on-demand reading app. When the user swipes up or down with a single finger on the XX News app's interface, the phone responds to the user's action, controlling the on-demand reading app to exit point-and-read mode and enter full-text reading mode. Correspondingly, as... Figure 6 As shown in (b), the interface of the XX News app displays a floating ball indicating the full-text reading mode of the Read On Demand app.
[0066] To achieve Figure 4 The application demonstrates that users can switch between full-text reading mode and point-and-read mode by double-clicking the floating ball. This application also proposes a method for switching page broadcast modes.
[0067] The page broadcast mode switching method provided in this application embodiment can be applied to mobile phones, tablets, personal digital assistants (PDAs), desktop, laptop, and notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, and wearable devices, as well as other electronic devices that support accessibility services. This application does not impose any special restrictions on the specific form of the above-mentioned electronic devices.
[0068] Taking mobile phones as an example, Figure 7 This is an example of the composition of an electronic device provided in an embodiment of this application. For example... Figure 7As shown, the electronic device 700 may include a processor 710, an internal memory 720, a sensor module 730, a mobile communication module 740, a wireless communication module 750, a display screen 760, and an audio module 770, etc.
[0069] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 700. In other embodiments, the electronic device 700 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0070] The processor 710 may include one or more processing units, such as 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, a smart sensor hub, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0071] The processor 710 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 710 is a cache memory. This memory can store instructions or data that the processor 710 has just used or that are used repeatedly. If the processor 710 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 710, and thus improves the efficiency of the system.
[0072] Internal memory 720 can be used to store computer executable program code, including instructions. Processor 710 executes various functional applications and data processing of electronic device 700 by running the instructions stored in internal memory 720. Internal memory 720 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 700 (such as audio data, phonebook, etc.). Furthermore, internal memory 720 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 710 executes various functional applications and data processing of electronic device 700 by running instructions stored in internal memory 720 and / or instructions stored in memory located within the processor.
[0073] In some embodiments, the internal memory 720 stores instructions for executing the switching of control page playback modes. The processor 710 can execute the instructions stored in the internal memory 720 to control the electronic device in response to user operations, controlling the on-demand reading application to switch between full-text reading mode and point-and-read mode.
[0074] Electronic devices implement display functions through a GPU, a display screen 760, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 760 and the application processor. The GPU performs mathematical and geometric calculations for image rendering. The processor 710 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0075] The display screen 760 is used to display images, video interfaces, etc. The display screen 760 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 Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N displays 760, where N is a positive integer greater than 1.
[0076] The wireless communication function of the electronic device 700 can be implemented through antenna 1, antenna 2, mobile communication module 740, wireless communication module 750, modem processor, and baseband processor.
[0077] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 700 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0078] The mobile communication module 740 can provide solutions for wireless communication, including 7G / 3G / 4G / 5G, applied to the electronic device 700. The mobile communication module 740 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 740 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 740 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 740 may be housed in the processor 710. In some embodiments, at least some functional modules of the mobile communication module 740 and at least some modules of the processor 710 may be housed in the same device.
[0079] The wireless communication module 750 can provide solutions for wireless communication applications on the electronic device 700, 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), and infrared (IR) technologies. The wireless communication module 750 can be one or more devices integrating at least one communication processing module. The wireless communication module 750 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 710. The wireless communication module 750 can also receive signals to be transmitted from processor 710, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0080] In sensor module 730, pressure sensor 730A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 730A can be disposed on display screen 760. There are many types of pressure sensors 730A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 730A, the capacitance between the electrodes changes. The electronic device determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 760, the electronic device detects the touch operation intensity based on pressure sensor 730A. The electronic device can also calculate the touch position based on the detection signal from pressure sensor 730A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands.
[0081] Touch sensor 730B, also known as a "touch device," can be located on display screen 760. The touch sensor 730B and display screen 760 together form a touchscreen, also known as a "touchscreen." Touch sensor 730B is used to detect touch operations applied to or near it. The touch sensor can transmit 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 display screen 760. In other embodiments, touch sensor 730B may also be located on the surface of the electronic device, in a different position than display screen 760.
[0082] Electronic device 700 can implement audio functions such as music playback and recording through audio module 770, speaker 770A, receiver 770B, microphone 770C, headphone jack 770D, and application processor.
[0083] The audio module 770 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 770 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 770 may be located in the processor 710, or some functional modules of the audio module 770 may be located in the processor 710.
[0084] The 770A speaker, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic devices can listen to music or make hands-free calls through the 770A speaker.
[0085] The receiver 770B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When an electronic device answers a phone call or voice message, the receiver 770B can be brought close to the ear to hear the voice.
[0086] Microphone 770C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 770C, inputting the sound signal into microphone 770C. Electronic devices can have at least one microphone 770C. In some embodiments, electronic devices can have two microphones 770C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic devices can have three, four, or more microphones 770C, enabling sound signal collection, noise reduction, sound source identification, and directional recording, among other functions.
[0087] The 770D headphone jack is used to connect wired headphones. The 770D headphone jack can be a USB 730 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0088] In addition, the electronic device runs an operating system on top of the aforementioned components. For example... operating system, operating system, Operating systems, etc. Applications can be installed and run on an operating system.
[0089] Figure 8 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application.
[0090] A layered architecture divides the operating system of an electronic device into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the operating system of the electronic device is the Android system. The Android system, from top to bottom, consists of the application (APP) layer, the application framework layer (FWK), system libraries, the kernel layer, and the hardware layer.
[0091] The application layer can include a series of application packages. For example... Figure 8 As shown, the application package may include applications such as gallery, maps, calendar, call, camera, and on-demand text-to-speech.
[0092] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 8 As shown, the application framework layer may include WindowManagerService (WMS), ActivityManagerService (AMS), content provider, phone manager, file manager, and accessibility service, etc.
[0093] The window management service is used to manage window programs. It allows for the addition, deletion, display, and hiding of windows.
[0094] The Activity Management Service is used to manage Activity behavior, control the Activity lifecycle, dispatch message timing, and manage memory.
[0095] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0096] A phone manager is used to provide communication functions for electronic devices. For example, it manages call status (including connection and disconnection).
[0097] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0098] Accessibility services provide accessibility features to applications through text-to-speech, haptic feedback, gesture navigation, trackballs, and directional navigation, making applications more accessible to users.
[0099] The Accessibility Service can run in the background and receive AccessibilityEvents. These events represent changes in the user interface state, such as changes in focus, input content, or button clicks. The Accessibility Service can also retrieve the active window and its contents.
[0100] The Android Runtime includes core libraries and a virtual machine. The Android Runtime is responsible for scheduling and managing the Android system. In some embodiments of this application, application cold starts run within the Android Runtime, which obtains the application's optimized file status parameters. The Android Runtime can then use these parameters to determine whether the optimized file has become outdated due to system upgrades and returns the result to the application management module.
[0101] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0102] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0103] System libraries can include multiple functional modules. For example, a surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), and 2D graphics engines (e.g., SGL).
[0104] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0105] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0106] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0107] A 2D graphics engine is a graphics engine for 2D drawing.
[0108] The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, sensor drivers, etc. In some embodiments, the display driver is used to control the display screen to show images; the sensor driver is used to control the operation of multiple sensors, such as controlling the operation of pressure sensors and touch sensors.
[0109] Within the aforementioned four-layer architecture, the receiving device also includes a hardware layer, which may include the aforementioned electronic device hardware components. For example, Figure 8 The display screen was shown.
[0110] It should be noted that, although the embodiments of this application are based on... The system is used as an example for explanation, but its basic principles also apply to systems based on... , Electronic devices with operating systems, etc.
[0111] This section describes how to switch the page playback mode of an on-demand reading application installed on mobile phones and other electronic devices. Taking a mobile phone as an example, the following section introduces how to switch the page playback mode of an on-demand reading application after it is enabled.
[0112] Figure 9 The diagram illustrates a signaling method for switching page broadcast modes according to an embodiment of this application.
[0113] like Figure 9 As shown in the embodiments of this application, the method for switching page broadcast modes includes:
[0114] S901, AccessibilityService intercepts events generated by the operating system, which are triggered by user input on the phone screen.
[0115] AccessibilityService can be configured with setServiceinfo, which allows setting various status values (flags). In this embodiment, setServiceinfo is used to set the status values of user actions, such as clicking, double-clicking, and swiping the screen.
[0116] After setting the status value of the user operation on the AccessibilityService using setServiceinfo, the AccessibilityService can intercept the event when the operating system detects the user operation and generates an event.
[0117] AccessibilityService can intercept events and distribute these intercepted events. Typically, the distribution of intercepted events by AccessibilityService refers to reporting intercepted events to applications such as on-demand text-to-speech apps installed on the phone.
[0118] This application embodiment relates to the switching of the page broadcast mode of the on-demand reading application. Therefore, this embodiment mainly introduces the interaction between AccessibilityService and the on-demand reading application.
[0119] The AccessibilityService intercepting this event can be understood as the AccessibilityService obtaining the event information. This event information typically includes: the event type (EventType) and the event object (Source). The event type can be understood as the type of user action corresponding to the event; the event object can be understood as the object of the user action corresponding to the event, which can be a button, pop-up, or floating window on the interface. Different event objects can be distinguished by their tags.
[0120] Users Figure 4 As shown in (a), after double-clicking the floating ball 308 in the full-text reading mode of the selected reading application, the operating system responds to the operation by generating an event corresponding to the operation. In some embodiments, the operating system generating the event can be understood as generating event information.
[0121] S902, AccessibilityService reports events to the Read On Demand app.
[0122] AccessibilityService can also be configured with filtering rules, which can include the package name. The package name can be understood as the package name of the application that needs to receive accessibility events processed by AccessibilityService. Based on this package name, AccessibilityService can determine that the Read On Demand app is an application that can report events. Therefore, after AccessibilityService intercepts an event, it can report the event to the Read On Demand app.
[0123] S903, the selected reading application parses the event and obtains the event used to represent the user's double-click operation on the floating ball.
[0124] After receiving an event reported by the AccessibilityService, the on-demand reading application can parse the event to determine its type. In some embodiments, parsing the event can be understood as parsing the event information. By identifying the event type, the on-demand reading application can determine the type of user operation corresponding to the event; by identifying the event object, it can determine the object of the user operation corresponding to the event.
[0125] The on-demand reading application determines the event representation to which the event information belongs by parsing the event information: when the user performs a double-click operation on the floating ball, the on-demand reading application can perform the following step S904.
[0126] It should be noted that the user's double-clicking of the floating ball to control the on-demand reading application to switch page playback modes is an exemplary illustration. In some embodiments, the user can also control the on-demand reading application to switch page playback modes by performing other operations on the floating ball, such as clicking, long-duration touch, or swiping, and this application does not specifically limit this. Based on this, after the on-demand reading application parses the event and obtains that the event represents the user's input of an operation to switch page playback modes, the on-demand reading application can execute the following step S904.
[0127] S904, the selectable reading application switches the full-text reading mode to point-and-read mode.
[0128] The on-demand reading application can determine its current mode. This example uses the full-text reading mode as an example. When the on-demand reading application receives an event and parses the event information, determining that the event was generated by the user performing a double-click operation on the ball, it switches the full-text reading mode to the point-and-read mode.
[0129] In some embodiments, the on-demand reading application switches the full-text reading mode to the point-reading mode in the following ways: the on-demand reading application pauses the broadcast, the icon for switching the full-text reading mode in the on-demand reading application is changed to the icon for the point-reading mode, and the on-demand reading application changes the status value to true.
[0130] It should be noted that the on-demand reading application is in full-text reading mode, and can read aloud the content currently displayed on the screen. Therefore, if the on-demand reading application determines through step S903 that the event represents a double-click operation by the user on the floating ball, it needs to pause the reading. Pausing the reading can be understood as resetting the on-demand reading application's player (mReaderPlayerManager).
[0131] Of course, in some embodiments, if the on-demand reading application has finished reading the content displayed on the current interface, the on-demand reading application may not pause the reading during the process of switching the full-text reading mode to the point-reading mode.
[0132] The icon for the full-text reading mode in the on-demand reading app can be understood as... Figure 4 The floating ball 308 shown in (a) can be understood as the icon for the point-reading mode. Figure 4 The suspended sphere 309 is shown in (b) of the diagram.
[0133] The state value, mIsClickToReadState, indicates whether the on-demand reading application is in point-and-read mode. Typically, a state value of `true` indicates the application is in point-and-read mode, while a state value of `false` indicates it is in full-text reading mode. This embodiment describes a method for switching page playback modes using the example where the on-demand reading application is currently in full-text reading mode, and the user double-clicks the floating ball in full-text reading mode, causing the application to switch to point-and-read mode. Of course, the method provided in this embodiment can also achieve the same functionality, where the on-demand reading application is currently in point-and-read mode, and the user double-clicks the floating ball in point-and-read mode, causing the application to switch to full-text reading mode.
[0134] In implementing the above functions, users such as Figure 4 As shown in (b), after a double-click operation is performed on the floating ball in the point-and-read mode of the Read-Aloud application, the operating system can generate an event corresponding to the operation. AccessibilityService intercepts the event generated by the operating system and reports the event to the Read-Aloud application. The Read-Aloud application parses the event and determines that the event represents a double-click operation performed by the user on the floating ball in the point-and-read mode, then switches the point-and-read mode to the full-text reading mode.
[0135] In some embodiments, the on-demand reading application switches from point-and-read mode to full-text reading mode in the following ways: the on-demand reading application pauses the broadcast, the icon for switching the on-demand reading application to the icon for full-text reading mode is changed, and the on-demand reading application changes the status value to false.
[0136] It should be noted that when the app is in point-and-read mode and reading content clicked by the user, it needs to pause the reading when switching from point-and-read mode to full-text reading mode. If the app is not currently reading, it does not need to pause the reading when switching from point-and-read mode to full-text reading mode.
[0137] In this embodiment, after a user interacts with the floating ball of the On-Demand Reading application, the AccessibilityService intercepts the event generated by the operating system in response to the interaction and reports the event to the On-Demand Reading application. The On-Demand Reading application parses the event and determines that it indicates the user has switched the page playback mode by interacting with the floating ball. If so, it switches the page playback mode of the On-Demand Reading application, thus achieving the switching of the page playback mode of the On-Demand Reading application.
[0138] Furthermore, the event parsing of the on-demand reading application indicates that the user has interacted with the application's floating ball, which allows switching the page playback mode of the on-demand reading application. It also provides the user with the convenience of switching page playback modes simply by operating the floating ball. It should also be noted that, as seen in the aforementioned step S901, when the user inputs an operation on the phone's interface, the operating system generates an event corresponding to that operation. Because the AccessibilityService sets the state value of the user's operation through setServiceinfo, it can intercept the events generated by the operating system.
[0139] When a user swipes up or down on the phone's interface, the AccessibilityService can intercept the corresponding event. In response to this intercepted event, the AccessibilityService can use the application running the phone's interface to scroll the screen content and reveal hidden content.
[0140] For example, users such as Figure 5a As shown in (a), when a single-finger swipe up is input into the interface of the XX News application, the AccessibilityService intercepts the corresponding event for the single-finger swipe up. The AccessibilityService can respond to this intercepted event as follows: Figure 5a As shown in (b) above, the hidden content of the display interface is achieved through the XX News application.
[0141] Users Figure 5b As shown in (a), when a single-finger swipe up is input into the interface of the XX News application, the AccessibilityService intercepts the corresponding event for the single-finger swipe up. The AccessibilityService can respond to this intercepted event as follows: Figure 5b As shown in (b) above, the hidden content of the display interface is achieved through the XX News application.
[0142] Users Figure 5c As shown in (a), when the XX News app's interface inputs a two-finger swipe up gesture, the AccessibilityService intercepts the corresponding event. The AccessibilityService can respond to this intercepted event as follows: Figure 5c As shown in (b) above, the hidden content of the display interface is achieved through the XX News application.
[0143] Depend on Figure 5a , Figure 5b and Figure 5c It can be seen that: when the on-demand reading app is in full-text reading mode (i.e., the phone screen displays the app's floating window or the full-text reading mode's floating ball), users can scroll the displayed content and reveal hidden content by swiping up or down with a single finger. Similarly, when the on-demand reading app is in point-and-read mode (i.e., the phone screen displays the app's point-and-read mode's floating ball), users can scroll the displayed content and reveal hidden content by swiping up or down with two fingers.
[0144] When the app is in point-and-read mode, users can switch to full-text reading mode by swiping up or down with a single finger on the phone's screen.
[0145] Based on this, in another embodiment of the present application, the method for switching page broadcast modes, such as... Figure 6 As shown in (a), when a user inputs a single-finger swipe up or down on the phone's interface, the AccessibilityService can intercept the event corresponding to that swipe. In response to this intercepted event, the AccessibilityService can report it to the on-demand text-to-speech application.
[0146] After receiving the event, the Read On Demand app parses it. If it determines that the event represents a user's single-finger swipe up or down gesture on the phone's interface, the Read On Demand app switches the point-and-read mode to the full-text reading mode.
[0147] It should be noted that the on-demand reading application parses events to determine how the event represents the user's single-finger swipe up or down input on the phone's interface, as described in step S903 above, and will not be repeated here. The on-demand reading application switches from point-and-read mode to full-text reading mode as described above, and will also not be repeated here.
[0148] Another embodiment of this application provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps of any of the above methods.
[0149] Computer-readable storage media can be non-transitory computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage devices.
[0150] Another embodiment of this application provides a computer program product containing instructions. When the computer program product is run on a computer or processor, it causes the computer or processor to perform one or more steps of any of the methods described above.
Claims
1. A method for switching page broadcast modes, characterized in that, Applied to an electronic device, the electronic device having a first application and a second application installed, the first application supporting accessibility services, the method includes: The first interface of the second application is displayed, and the first interface of the second application includes a first floating window, which displays an icon of the first broadcast mode of the first application. In response to a user's triggering operation on the first floating window, the AccessibilityService of the electronic device intercepts the event and reports the event to the first application. The event is generated by the user's triggering operation on the first floating window. The first application parses the event, switches the icon of the first broadcast mode to the icon of the second broadcast mode, and modifies the status value from a first value to a second value so that the first broadcast mode of the first application is switched to the second broadcast mode. The status value is used to indicate the broadcast mode of the first application. In response to the state value being the second value, a second floating window is displayed on the first interface of the second application, and the second floating window displays an icon of the second broadcast mode of the first application.
2. The method for switching page broadcast modes according to claim 1, characterized in that, The first floating window displays an icon for the point-and-read mode of the first application. After displaying the first interface of the second application, the following is also included: In response to a user's single-finger swipe operation on the first interface of the second application, a second floating window is displayed on the first interface of the second application, and the second floating window displays an icon of the second broadcast mode of the first application.
3. The method for switching page broadcast modes according to claim 1, characterized in that, Before switching the icon of the first broadcast mode to the icon of the second broadcast mode, the process also includes: Broadcast paused.
4. The method for switching page broadcast modes according to claim 1, characterized in that, The first application parses the event, including: The first application parses the event type and event object of the event, whereby the event type indicates the type of user operation and the event object indicates the object of user operation.
5. The method for switching page broadcast modes according to any one of claims 1 to 4, characterized in that, The first floating window displays an icon for the full-text reading mode of the first application. After displaying the first interface of the second application, the following is also included: In response to a user's single-finger swipe operation on the first interface of the second application, a second interface of the second application is displayed. The second interface of the second application includes the first floating window, and the content of the second interface is different from the content of the first interface.
6. The method for switching page broadcast modes according to any one of claims 1 to 4, characterized in that, The first floating window displays an icon for the point-and-read mode of the first application. After displaying the first interface of the second application, the following is also included: In response to a user's two-finger swipe operation on the first interface of the second application, a third interface of the second application is displayed. The third interface of the second application includes the first floating window, and the content of the third interface is different from the content of the first interface.
7. The method for switching page broadcast modes according to any one of claims 1 to 4, characterized in that, Also includes: Display a fourth interface of the second application, the fourth interface of the second application including a floating window; In response to a user's single-finger swipe operation on the fourth interface of the second application, a fifth interface of the second application is displayed. The fifth interface of the second application includes the floating frame, and the content of the fifth interface is different from the content of the fourth interface.
8. The method for switching page broadcast modes according to claim 1, characterized in that, The AccessibilityService is configured with status values for user actions.
9. The method for switching page broadcast modes according to claim 1, characterized in that, Before the AccessibilityService reports the event to the first application, it also includes: The AccessibilityService uses filtering rules to determine that the first application is the application that reports the event.
10. An electronic device, characterized in that, include: One or more processors, memory, and a display screen; The memory and the display screen are coupled to the one or more processors. The memory is used to store computer program code, which includes computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the page broadcast mode switching method as described in any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that, Used to store computer programs, which, when executed, are specifically used to implement the page broadcast mode switching method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Function switching method and device, electronic equipment and readable storage medium
CN111880706A
Floating window display method and electronic equipment
CN114047867A