Two-dimensional code display method, electronic equipment, chip and storage medium
Patent Information
- Application Number
- CN202480010440.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-18
- Filing Date
- 2024-03-05
- Publication Date
- 2025-09-12
AI Technical Summary
The back screen utilization rate of folding screen devices is low. Users usually only use the home screen when folding, and the back screen is idle.
A QR code display method is provided. By receiving the user's tapping operation on the back screen when the folding screen device is in the folded state, it triggers the application interface for displaying the QR code on the back screen, and improves the utilization rate of the back screen.
Users can trigger the quick display of QR codes on the back screen without flipping the screen, improving the utilization rate and user experience of the back screen.
Smart Images

Figure CN120641868A_ABST
Abstract
Description
QR code display method, electronic device, chip and storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on August 18, 2023, with application number 202311050723.8 and application name “QR code display method, electronic device, chip 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 terminal technology, and in particular to a two-dimensional code display method, electronic device, chip and storage medium. Background Art
[0003] At present, people's demand for foldable screen devices that combine portability and large screen size is becoming stronger and stronger.
[0004] Take a foldable phone as an example. When folded, the main screen faces the user, while the back screen faces away, making it similar to a candy-bar phone. In this situation, users only use the main screen and ignore the back screen, leaving it idle. Therefore, improving the utilization of the back screen has become a pressing issue.
[0005] Summary of the Invention
[0006] The present application provides a QR code display method, electronic device, chip and storage medium, which solve the technical problem of low utilization rate of the back screen of folding screen devices.
[0007] To achieve the above objectives, this application adopts the following technical solutions:
[0008] In a first aspect, embodiments of the present application provide a method for displaying a QR code. This method can be applied to electronic devices, such as foldable screen devices. The foldable screen device may include a main screen and a back screen. The method may include:
[0009] At a first time point, displaying a first interface of a first application on a home screen;
[0010] receiving a first tap operation on the back screen, and displaying a second interface of a second application on the back screen at a second time point, the second interface including a QR code; while the second interface is displayed on the back screen, the first interface is displayed on the main screen; between the first time point and the second time point, the electronic device is in a folded state, the second application is an application that displays a QR code on the back screen, and the second application has a QR code function enabled;
[0011] At a third time point, the first interface is displayed on the main screen;
[0012] A second tap operation is received on the back screen, and at a fourth time point, a third interface of a third application is displayed on the main screen, and the third interface does not include a QR code; between the third time point and the fourth time point, the electronic device is in a folded state, and the third application is an application that displays a QR code on the back screen, and the QR code function is not enabled for the third application.
[0013] The second time point is later than the first time point, the third time point is later than the second time point, and the fourth time point is later than the third time point. The first application can be any application on the electronic device, such as a desktop application or an e-book application. The second and third applications are applications capable of providing QR codes, such as payment applications.
[0014] In the above scheme, when the electronic device is in a folded state, the main screen faces the user and the back screen faces away from the user. If the user wants to use a QR code, the user can tap the back screen. If the second application is an application that displays a QR code on the back screen by default, and the second application has turned on the QR code function, the electronic device can successfully pull up a QR code on the back screen (such as a payment code, a payment code, a ride code, a health code, or an electronic social security card). In this way, the user can trigger the quick display of the QR code of the second application on the back screen without flipping the back screen to face himself, and use the QR code to scan the code, thereby improving the utilization rate of the back screen.
[0015] After this, when the electronic device is in the folded state, the user may tap the back screen again. If the third application is an application that displays a QR code on the back screen by default, and the QR code function has not been enabled for the third application, the electronic device may display an interface on the main screen that does not include a QR code (such as an interface that prompts the user to enable the QR code function). In this way, the user can find that the QR code display on the back screen fails and enable the QR code function without flipping the screen.
[0016] In a possible implementation, displaying the second interface of the second application on the back screen includes: based on the second application having enabled the QR code function, displaying the second interface of the second application on the back screen.
[0017] In one possible implementation, displaying the third interface of the third application on the main screen includes: based on the fact that the interface of the third application does not include a QR code (i.e., the QR code function is not enabled for the third application), displaying the third interface of the third application on the main screen.
[0018] In one possible implementation, the foldable screen device can be an external foldable screen device or an internal foldable screen device. If it is an external foldable screen device, the external foldable screen device may include a single display screen, with the main screen and the back screen forming two display areas of the single display screen. If it is an internal foldable screen device, the external foldable screen device may include two display screens, one of which is the back screen and the other is the main screen, and the main screen may be folded into at least two display areas.
[0019] Regardless of whether the foldable screen device has one or more display screens, both the inner foldable screen device and the outer foldable screen device can be folded into three forms: folded state, hovering state, and unfolded state. Among them, when the foldable screen device is in the folded state, the main screen and the back screen are oriented in opposite directions, for example, the main screen faces the user and the back screen faces away from the user; when the foldable screen device is in the unfolded state, the main screen and the back screen are oriented in the same direction, for example, both the main screen and the back screen face the user. It should be noted that "the main screen faces the user" means that the side of the main screen used to display content is opposite to the user, and the user can see the content displayed on the main screen; "the back screen faces away from the user" means that the side of the back screen used to display content is opposite to the user, and the user cannot see the content displayed on the back screen.
[0020] In one possible implementation, the second application and the third application can be different applications. For example, the user can first set the second application as the default application for displaying QR codes on the back screen. If the user taps the back screen and the second application has the QR code function enabled, the QR code of the second application can be pulled up on the back screen. Then, the user can set the third application as the default application for displaying QR codes on the back screen. If the user taps the back screen and the third application has not the QR code function enabled, an interface prompting the user to enable QR codes for the third application can be displayed on the main screen.
[0021] In one possible implementation, the second application and the third application are the same application. For example, a user can first set an application as the default application for displaying QR codes on the back screen. If the user taps the back screen and the QR code function is enabled for the application, the QR code can be pulled up on the back screen. Then, the user can turn off the QR code function for the application. If the user taps the back screen, an interface prompting the user to enable the QR code function will be displayed on the main screen.
[0022] In one possible implementation, the second application and the third application are the same application, and the application provides at least two QR codes. For example, the user can first set a QR code of one application as the default QR code displayed on the back screen. If the user taps the back screen and the function of the QR code is enabled, the QR code can be pulled up on the back screen. Then, the user can set another QR code of the same application as the default QR code displayed on the back screen. If the user taps the back screen and the function of the other QR code is not enabled, an interface prompting the user to enable the other QR code can be displayed on the main screen.
[0023] In one possible implementation, the "tapping operation on the back screen" can be two consecutive tapping operations on the back screen, i.e., a double tapping operation. "Two consecutive tapping operations" specifically means that the time interval between the first tapping operation and the second tapping operation is less than or equal to a preset time interval, such as 0.5 seconds. For example, at least one sensor can be provided at a position corresponding to the back screen on the mobile phone body to collect vibration signals generated on the back screen.
[0024] In the above solution, when the user's need is to pull up the QR code interface of the payment application on the back screen, the user is more accustomed to tapping the back screen, so it is more reasonable to set the sensor at a position on the main body corresponding to the back screen.
[0025] In one possible implementation, after receiving the second tap operation on the back screen and before the fourth time point, the method may further include: displaying the fourth interface of the third application on the back screen, the fourth interface does not include a QR code, the first area of the fourth interface is a black background, and the second area of the fourth interface has the same display content as the corresponding area of the third interface.
[0026] In the above scheme, when the electronic device is in a folded state, if it receives a tapping operation from the user on the back screen, the electronic device can first pull up the interface of the third application on the back screen. When this interface does not include a QR code, the interface is unmasked and displayed on the main screen, thereby making it easier for the user to discover that the QR code display on the back screen has failed.
[0027] In one possible implementation, after receiving the first tap operation on the back screen and before the second time point, the method may further include: displaying a first floating capsule on the main screen. The first floating capsule indicates that a QR code of a second application is loading on the back screen. For example, the floating capsule may include a prompt message "Payment Application 1 | Payment Code | Loading."
[0028] In the above solution, according to the prompt information provided by the floating capsule, the user can know that the electronic device has responded to the user's tapping operation on the back screen and is trying to pull up the payment code interface of the second application.
[0029] In one possible implementation, after the second interface of the second application is displayed on the back screen and before the third time point, the method may further include: displaying a second floating capsule on the main screen, that is, updating the first floating capsule displayed on the main screen to the second floating capsule. The second floating capsule indicates that the QR code of the second application has been displayed on the back screen. For example, if the payment code interface of payment application 1 has been successfully displayed on the back screen, the prompt information of the floating capsule can be updated from "Payment application 1 | Payment code | Loading" to "Payment application 1 | Payment code | Already displayed on the back screen."
[0030] In the above solution, by updating the prompt information of the suspended capsule, the user can be informed that the QR code of the second application has been successfully pulled up on the back screen, so that the user can align the back screen with the scanning device to scan the code.
[0031] In one possible implementation, the second floating capsule may further include an expansion control. After updating the first floating capsule displayed on the main screen to the second floating capsule, the method may further include: receiving an operation on the expansion control; and in response to the operation, displaying multiple QR code options on the main screen, each QR code option corresponding to a QR code. For example, a user may trigger the display of a drop-down list by operating the expansion control. The drop-down list includes multiple QR code options pre-set by the user, such as "Use payment app 1 for boarding code" and "Use payment app 2 for payment code."
[0032] In the above solution, by displaying multiple QR code options on the main screen, the user can operate the QR code options on the main screen without flipping the screen to trigger a quick update of the QR code displayed on the back screen.
[0033] In one possible implementation, after displaying multiple QR code options, the method may further include: receiving an operation on the first option among the multiple QR code options, the first option corresponding to the QR code of the fourth application; in response to the operation, displaying the fifth interface of the fourth application on the back screen, and displaying the first interface and the floating capsule on the main screen, the fourth application has turned on the QR code function, the fifth interface includes a QR code, and the floating capsule prompts that the QR code of the fourth application has been displayed on the back screen.
[0034] In the above solution, when the user operates the QR code option corresponding to an application on the main screen, if the QR code function has been enabled for this application, the QR code displayed on the back screen can be quickly updated, and a floating capsule can be used on the main screen to prompt the user that the QR code has been successfully updated.
[0035] In one possible implementation, after displaying multiple QR code options, the method may further include: receiving an operation on a second option among the multiple QR code options, the second option corresponding to the QR code of the fifth application; in response to the operation, displaying the sixth interface of the fifth application on the main screen, the fifth application does not have the QR code function enabled, and the sixth interface does not include a QR code.
[0036] In the above solution, when the user operates the QR code option corresponding to an application on the main screen, if the QR code function is not enabled for this application, the interface that does not include the QR code can be pulled to the main screen (for example, the QR code interface is enabled), thereby making it easier for the user to enable the QR code.
[0037] In one possible implementation, after receiving the second tap operation on the back screen and before a fourth time point, the method may further include: displaying a third floating capsule on the main screen, the third floating capsule indicating that a QR code of a third application is being loaded on the back screen. The third floating capsule is not displayed at the fourth time point.
[0038] In the above solution, after the third time point, when the electronic device attempts to bring up the QR code interface of the third application in response to the user tapping the back screen, the electronic device can prompt the user through the third floating capsule, so that the user is informed that the electronic device is attempting to bring up the payment code interface of the third application. In addition, if the third application does not have the QR code function enabled, the electronic device can remove the third floating capsule from the main screen and bring the interface that enables the QR code function to the main screen.
[0039] In one possible implementation, after receiving the first tap operation on the back screen by the user, the method may further include: registering a first listener; obtaining a screenshot of the second application's interface when the first listener detects a change in the second application's lifecycle or a refresh of the second application's window state; and identifying that the screenshot of the second application's interface includes a QR code. It should be understood that based on identifying that the screenshot of the second application's interface includes a QR code, the second interface includes the second application's QR code.
[0040] For example, the first listener may be a first activity listener ActivityNotifer, which may be used to monitor whether the life cycle of an activity has changed. Accordingly, the interface screenshot of the second application may be a screenshot of the interface of the second application that has been displayed on the back screen. If the electronic device successfully pulls up the QR code on the back screen, that is, the interface screenshot of the second application is a screenshot of the second interface displayed on the back screen, the masked area in the second interface is a black background, and the unmasked area in the second interface is the QR code of the second application.
[0041] For another example, the first listener can be a first window listener WindowStateChangedListener, and the first window listener WindowStateChangedListener can be used to monitor the window state changes of the second application. It should be noted that the "window" here refers to the view of the application; "window state refresh" refers to updating the view of the application in the background, but the view has not yet been displayed on the back screen. Correspondingly, the interface screenshot of the second application is a screenshot of the view of the second application, and the view of the second application is a layer that has not yet been sent to the back screen. If the screenshot of the view of the second application includes a QR code (that is, the QR code function has been turned on in the second application), the second interface of the second application is displayed on the back screen, and the second interface includes the QR code of the second application.
[0042] In one possible implementation, after registering the first listener and before the second time point, the method may further include: synthesizing the view of the second application and the mask view to obtain a second interface; and displaying the second interface on the back screen. The third area of the mask view has a black background, and the fourth area of the mask view has a transparent background. The area of the second interface corresponding to the third area has a black background, and the area of the second interface corresponding to the fourth area has a QR code of the second application.
[0043] In the above solution, setting the area except the area where the QR code is located as a dark background image is conducive to the scanning device quickly identifying the QR code when the user aligns the QR code with the scanning device, thereby improving the success rate of scanning recognition.
[0044] In one possible implementation, after receiving the first tap operation on the back screen, the method may further include: starting timing; before the timing reaches a preset duration, recognizing that the interface screenshot of the second application includes a QR code, stopping timing, and deregistering the first listener.
[0045] In the above scheme, after receiving the user's tapping operation on the back screen, if the QR code is recognized within the preset time, it means that the QR code is successfully displayed on the back screen, and there is no need to monitor whether the QR code is successfully displayed, so the first listener can be cancelled.
[0046] In one possible implementation, after receiving a second tap operation on the back screen by the user, the method may further include: registering a second listener; obtaining a screenshot of the third application's interface when the second listener detects a change in the third application's lifecycle or a refresh of the third application's window state; and identifying that the screenshot of the third application's interface does not include a QR code. It should be understood that, based on identifying that the screenshot of the third application's interface does not include a QR code, the third interface does not include the third application's QR code.
[0047] For example, the second listener can be a second activity listener ActivityNotifer, which is used to monitor the life cycle changes of the third application; the interface screenshot of the third application is a screenshot of the fourth interface of the third application that has been displayed on the back screen; the fourth interface does not include a QR code, the first area of the fourth interface is a black background, and the second area of the fourth interface has the same display content as the corresponding area of the third interface.
[0048] For another example, the second listener may be a second window listener WindowStateChangedListener, which is used to monitor window state changes of a third application; the interface screenshot of the third application is a screenshot of the view of the third application, and the view of the third application is a view that is not displayed on the back screen.
[0049] In one possible implementation, after receiving the second tap operation on the back screen, the method may further include: starting timing; when the timing reaches a preset time and no QR code is identified from the interface screenshot of the third application, stopping timing and deregistering the second listener.
[0050] In the above scheme, after receiving the user's tapping operation on the back screen, if the QR code is not recognized within a long period of time, it means that the QR code display on the back screen has failed, and there is no need to monitor whether the QR code has been successfully displayed, so the second listener can be cancelled.
[0051] In a possible implementation, before the third time point, the method may further include: receiving a selection operation for a third application; and in response to the selection operation, setting the third application as the default application for displaying the QR code on the back screen.
[0052] In the above solution, when the electronic device has turned on the quick code display service, the user can manually change the application that displays the QR code on the back screen by default, so that the user can trigger the electronic device to pull up the QR code of the default application on the back screen by tapping the back screen.
[0053] In one possible implementation, the third interface may include a control for enabling the QR code function, which is used to trigger the third application to enable the QR code function. After the third interface of the third application is displayed on the main screen, the method may further include: receiving an operation on the control for enabling the QR code function, and displaying a seventh interface of the third application on the main screen, the seventh interface including the QR code.
[0054] In the above scheme, when the electronic device displays an interface that does not include a QR code on the main screen (such as turning on the QR code interface), the user can trigger the display of the QR code on the main screen by turning on the control in the payment application on the main screen, such as authorizing the payment application to turn on the payment code, so that the QR code can be scanned, thereby improving the user experience.
[0055] In one possible implementation, at a fourth time point, after the seventh interface of the third application is displayed on the main screen, the method may further include: at a fifth time point, displaying the first interface on the main screen; receiving a third tap operation on the back screen, and at a sixth time point, displaying the eighth interface of the third application on the back screen, the eighth interface including a QR code; while the seventh interface of the third application is displayed on the back screen, the first interface is displayed on the main screen; between the fifth time point and the sixth time point, the electronic device is in a folded state, the third application is the application that displays the QR code on the back screen by default, and the QR code function of the third application is enabled.
[0056] In the above solution, after the user turns on the QR code function for the third application, if the electronic device is in a folded state, the user can pull up the QR code of the third application on the back screen at any time by tapping the back screen.
[0057] In a second aspect, the present application provides a device comprising a unit for executing the method described in the first aspect. The device may be configured to execute the QR code display method described in the first aspect. For a description of the units in the device, please refer to the description of the first aspect above and will not be repeated here for the sake of brevity.
[0058] The method described in the first aspect above can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a processing module or unit, a display module or unit, etc.
[0059] In a third aspect, the present application provides an electronic device comprising a memory and one or more processors. The memory is configured to store computer program code, which includes computer instructions. When the computer instructions are invoked by the processor, the electronic device executes the QR code display method provided in any one of the first aspects.
[0060] In a fourth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the QR code display method provided in the first aspect and any possible implementation thereof.
[0061] In a fifth aspect, the present application provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the QR code display method provided in the first aspect and any possible implementation thereof.
[0062] In a sixth aspect, the present application provides a chip, which is coupled to a memory and configured to read and execute a computer program stored in the memory to implement the two-dimensional code display method provided in any one of the first aspects.
[0063] In a seventh aspect, the present application provides a chip system. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The chip system can be applied to an electronic device including a communication module and a memory. The interface circuit is used to receive a signal from the memory of the electronic device and send the received signal to the processor, where the signal includes a computer instruction stored in the memory. When the processor calls the computer instruction, the electronic device can execute the QR code display method provided in any one of the first aspects.
[0064] It can be understood that the beneficial effects that can be achieved by the above-mentioned device of the second aspect, the electronic device of the third aspect, the computer-readable storage medium of the fourth aspect, the computer program product of the fifth aspect, the chip of the sixth aspect and the chip system of the seventh aspect can be referred to as the beneficial effects in the first aspect and any possible implementation thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figures 1A-1D are schematic diagrams of an outward-folding screen mobile phone provided in an embodiment of the present application;
[0066] Figures 2A to 2G are schematic diagrams of a scenario in which a QR code is successfully displayed on a back screen according to an embodiment of the present application;
[0067] 3A-3D are schematic diagrams of a scenario in which a QR code is not successfully displayed on the back screen according to an embodiment of the present application;
[0068] FIG4 is a schematic diagram of the hardware structure of a folding screen device provided in an embodiment of the present application;
[0069] FIG5 is a schematic diagram of the architecture of a folding screen device provided in an embodiment of the present application;
[0070] FIG6 is a flow chart of a method for identifying whether a QR code is displayed on a back screen according to an embodiment of the present application;
[0071] FIG7 is a schematic diagram of an ACC sensor provided on a rear screen according to an embodiment of the present application;
[0072] FIG8 is a schematic diagram of receiving a TapTap operation according to an embodiment of the present application;
[0073] FIG9 is a flow chart of another method for identifying whether a QR code is displayed on a back screen according to an embodiment of the present application;
[0074] FIG10 is a schematic diagram of a scenario of recognizing a QR code from a back screen screenshot according to an embodiment of the present application;
[0075] FIG11 is a schematic diagram of a scenario in which a QR code is not recognized from a back screen screenshot according to an embodiment of the present application;
[0076] FIG12 is a flow chart of another method for identifying whether a QR code is displayed on a back screen according to an embodiment of the present application;
[0077] FIG13 is a schematic diagram of a scenario in which a QR code is recognized from a screenshot of a payment view according to an embodiment of the present application;
[0078] FIG14 is a schematic diagram of a scenario in which a QR code is not recognized from a screenshot of the payment code opening view according to an embodiment of the present application;
[0079] FIG15 is a schematic diagram of opening a payment code according to an embodiment of the present application. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0081] In the description of this application, unless otherwise specified, " / " means or. For example, A / B can mean A or B. In the description of this application, "and / or" is simply a way to describe the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0082] In the specification and claims of this application, the terms "first" and "second" are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects. For example, "first frame" and "first frame" are used to distinguish different video frames, rather than to describe a specific order of video frames. In the embodiments of this application, "plurality" refers to two or more.
[0083] When a foldable device is folded, the main screen faces the user and the back screen faces away from the user, making it similar to a candy-bar phone. In this case, the user only uses the main screen and does not pay attention to the back screen, causing the back screen to be idle.
[0084] In view of the above problems, an embodiment of the present application provides a QR code display method. This method can be applied to electronic devices (such as folding screen devices) provided with a main screen and a back screen. When the display screen of the folding screen device is in a folded state, the main screen faces the user and the back screen faces away from the user. If the user wants to use a QR code, such as a payment code, a payment code, a ride code or a health code, the user can tap the back screen to trigger the display of the QR code interface on the back screen. In this way, the user can trigger the quick display of the QR code on the back screen without flipping the back screen to face himself, and use the QR code to scan the code, which improves the utilization rate of the back screen and enhances the user experience.
[0085] It should be noted that "the main screen faces the user" means that the side of the main screen used to display content is opposite to the user, and the user can see the content displayed on the main screen; "the back screen faces away from the user" means that the side of the back screen used to display content is facing away from the user, and the user cannot see the content displayed on the back screen.
[0086] The above-mentioned folding screen device can be an inner folding screen device or an outer folding screen device. Both the inner folding screen device and the outer folding screen device can be folded into three forms: folded state, hovering state, and unfolded state. Among them, when the folding screen device is in the folded state, the folding angle between the main screen and the back screen is less than or equal to α, that is, the main screen and the back screen are in opposite directions, such as the main screen facing the user and the back screen facing away from the user; when the folding screen device is in the unfolded state, the folding angle between the main screen and the back screen is greater than or equal to β, and the main screen and the back screen are in the same direction, such as both the main screen and the back screen facing the user; when the folding screen device is in the hovering state, the folding angle between the main screen and the back screen is greater than α and less than β. For example, α is equal to or close to the folding angle of 0°, and β is equal to or close to the folding angle of 180°.
[0087] Exemplarily, the foldable screen device can be an outward-folding screen mobile phone or an inward-folding screen mobile phone.
[0088] Taking the folding screen device as an outward folding screen mobile phone as an example, Figures 1A to 1D show schematic diagrams of an outward folding screen mobile phone.
[0089] Figure 1A shows a schematic diagram of a foldable phone in its folded state. When the phone is folded, the back screen is folded to be flush with the rear camera, with the main screen facing the user and the back screen facing away. In this situation, the user's attention is primarily focused on the main screen, making it difficult to pay attention to the content displayed on the back screen.
[0090] Figure 1B shows a schematic diagram of a foldable phone in a hovering state. When the foldable phone is in the hovering state, the folding angle between the main screen and the back screen is greater than 0° and less than 180°.
[0091] Figure 1C shows a schematic diagram of a foldable phone in an unfolded state. When the foldable phone is in the unfolded state, the main screen and the back screen are in the same plane.
[0092] The main screen and back screen in Figures 1A, 1B, and 1C are essentially two display areas of the same screen. As shown in Figure 1D, a hinge is provided behind the display area corresponding to the main screen and the display area corresponding to the back screen. When a user holds the foldable phone with both hands and folds it along the hinge, the state of the foldable phone can be changed. For example, the foldable phone can be switched from the unfolded state shown in Figure 1C to the hovering state shown in Figure 1B, and then from the hovering state shown in Figure 1B to the folded state shown in Figure 1A.
[0093] Below, based on the outward folding screen mobile phone shown in Figures 1A to 1D, combined with Figures 2A to 2G, an example is given to illustrate the application scenario of the method for successfully displaying a QR code on the back screen provided by this application.
[0094] As an example, as shown in Figure 2A, at the initial moment, a user holds a folded external foldable phone in one hand, with the main screen facing the user and the back screen facing away from the user. If the main screen is displaying an e-book, the user can use their thumb to swipe on the main screen to browse the e-book. In the folded state, the back screen does not respond to user touch operations. If the user needs to scan a code, such as using a payment code to pay, using a payment code to receive money, or using a ride code to board a bus, the user can use their index or middle finger to tap the back screen twice (i.e., double-click the back screen). In response to the tapping operation, the external foldable phone displays a floating capsule 101 on the main screen. The floating capsule 101 includes two areas: one area displays the prompt "Payment App 1 | Payment Code | Loading", through which the user is informed that the external foldable phone is attempting to pull up the payment code interface of Payment App 1; the other area displays a triangular expansion control, which the user can trigger to display a drop-down list by clicking on the expansion control.
[0095] If the external folding screen mobile phone has successfully displayed the payment code interface of the payment application 1 on the back screen, the external folding screen mobile phone can update the prompt information of the floating capsule 101, for example, from "Payment application 1 | Payment code | Loading" to "Payment application 1 | Payment code | Already displayed on the back screen". Among them, the payment code interface displayed on the back screen includes two parts: one part is a dark background image, such as a black mask (presentation); the other part is a hole area, and the hole area displays a QR code, or the hole area displays a QR code and a barcode. It should be understood that setting the area other than the area where the QR code is located as a dark background image is conducive to the scanning device quickly identifying the QR code when the user aligns the QR code with the scanning device, thereby improving the success rate of scanning recognition. In addition, the dark background image can also include a "Payment application 1 payment code" wording, which can be used to indicate the application that provides the QR code and the type of QR code. As an example, an outward-folding screen mobile phone can change the words in the dark background image according to the application that provides the QR code and the QR code type. For example, the words in the dark background image can also be "Payment application 1 boarding code", "Payment application 1 payment code", "Payment application 2 boarding code", "Payment application 2 payment code", etc.
[0096] As another example, a foldable phone can also change the display form of the suspended capsule 101. As shown in Figure 2A, the display form of the suspended capsule 101 displayed on the main screen is similar to a capsule, which is called the capsule state. After displaying the suspended capsule 101 shown in Figure 2A, the foldable phone starts counting. When the countdown reaches a preset time (for example, 5 seconds), if no user touch operation is received on the main screen, the suspended capsule 101 is updated from the capsule state shown in Figure 2A to the hidden state 102 shown in Figure 2B. The hidden state can be a semicircle displayed near the edge of the screen. It should be understood that updating from the capsule state to the hidden state can avoid obstructing the main screen interface and affecting the user's normal browsing of e-books. In addition, if the main screen does not receive any user operation within the countdown time and the countdown time has reached the preset time, the back screen can continue to display the payment code interface. It should be understood that the user can also click on the suspended capsule in the hidden state shown in Figure 2B to switch the suspended capsule back to the capsule state shown in Figure 2A.
[0097] As another example, based on the floating capsule 101 shown in FIG2A , as shown in FIG2C , the user can trigger the display of a drop-down list 103 by operating the expansion control 101a. Drop-down list 103 can include other QR code options, such as "Use payment app 1 to board the ride" and "Use payment app 2 to pay." Furthermore, drop-down list 103 can also include a "Display on home screen" option.
[0098] If the payment code displayed on the back screen does not meet the user's needs, the user can also change the QR code displayed on the back screen. For example, based on the drop-down list 103 shown in Figure 2C, as shown in Figure 2D, the user can click "Use Payment App 1 to Board the Ride Code". The foldable phone will update the payment code of Payment App 1 displayed on the back screen to the boarding code of Payment App 1 and display the updated floating capsule 104 on the main screen. The prompt message of the updated floating capsule 104 is "Payment App 1 | Boarding Code | Displayed on the Back Screen".
[0099] In addition, the user may need to switch the payment code interface to the main screen. For example, based on the drop-down list 103 shown in FIG2C , as shown in FIG2E , the user can click the "Show on Main Screen" option, so that the foldable phone will pull the payment code interface displayed on the back screen to the main screen and close the back screen.
[0100] In the description of Figures 2A to 2E in the above embodiment, the folding screen device will first pop up a floating capsule of "Payment Application 1 | Payment Code | Loading" on the main screen, and when the QR code is successfully displayed on the back screen, the prompt information of the floating capsule 101 will be updated to "Payment Application 1 | Payment Code | Already displayed on the back screen". The embodiment of the present application also provides another method for displaying a floating capsule. As shown in Figure 2F, after the user taps the back screen twice in succession with the index finger or middle finger, the external folding screen mobile phone responds to the tapping operation, displays the QR code interface on the back screen, and pops up a floating capsule 105 of "Payment Application 1 | Payment Code | Already displayed on the back screen" on the main screen. That is to say, before the QR code interface is pulled up on the back screen, the external folding screen mobile phone will not pop up the floating capsule of "Payment Application 1 | Payment Code | Loading" on the main screen.
[0101] As another example, Figure 2G shows an operational diagram for enabling the Quick Code Show service (also known as the TapTap service). The user can click the "Folding Screen Zone" option 1061 on the settings interface to trigger the external folding screen mobile phone to display the folding screen zone interface. Then, the user can click the "Quick Code Show" option 1062 on the folding screen zone interface to trigger the external folding screen mobile phone to display the Quick Code Show interface. The Quick Code Show interface may include: a Quick Code Show option, a display location option, an Added Service option, and an Add Service option 1063. The Quick Code Show option can be used to trigger the external folding screen mobile phone to enable the Quick Code Show service; the Display Location option can be used to set the screen that displays the QR code, such as the back screen; the Added Service option includes the QR code that is displayed by default on the back screen when the Quick Code Show service is launched. Of course, the user can also manually change the QR code displayed by default on the back screen, or manually change the application that displays the QR code by default on the back screen; and the Add Service option is used to add a QR code. The user can also click the Add Service option 1063 to trigger the foldable phone to display the Add Service interface 1064. This interface 1064 displays multiple payment apps installed on the foldable phone and the QR codes supported by each payment app. The user can then manually add one or more QR codes based on their needs by operating the Add control. When the Quick Code Display service is launched, these manually added QR codes will be displayed in the drop-down list shown in Figure 2C.
[0102] For example, if a user sets Payment App 1 as the default app for displaying a QR code on the back screen, and the user double-taps the back screen, the electronic device will attempt to display the QR code for Payment App 1. For another example, if a user sets the payment code for Payment App 1 as the default QR code for display on the back screen, and the user double-taps the back screen, the electronic device will attempt to display the payment code for Payment App 1. Of course, the default app for displaying a QR code on the back screen, or the default QR code for displaying on the back screen, can also be automatically set by the electronic device, such as setting the ride code for an e-wallet as the default QR code for display on the back screen.
[0103] In the display method provided in Figures 2A to 2G, the external folding screen mobile phone may not be able to successfully display the QR code interface on the back screen due to reasons such as the user has not yet authorized the payment code function to be turned on. One possible scenario is that the floating capsule that has been displayed on the main screen always remains "Payment Application 1 | Payment Code | Loading", and another possible scenario is that the main screen will not display the floating capsule. Since the back screen is facing away from the user at this moment, the user's attention is mainly focused on the main screen. Therefore, if the user does not flip the back screen to face himself, the user may not be able to find out in time that the QR code is not successfully displayed on the back screen. When the user points the back screen at the scanning device, the scanning failure may occur.
[0104] The following takes the example of a foldable phone that pops up a floating capsule of "Payment Application 1 | Payment Code | Loading" on the main screen as an example, and provides several examples of scenarios in which the QR code is not successfully displayed on the back screen in combination with Figures 3A to 3D.
[0105] Example 1 of a scenario where the QR code fails to display on the back screen:
[0106] As shown in Figure 3A, after the user taps the back screen twice in succession, the foldable phone detects that the user has not authorized the QR code function, and thus cannot pull up the QR code on the back screen. Specifically, in one scenario, a floating capsule with the text "Payment App 1 | Payment Code | Loading" pops up on the main screen, while the back screen remains black. This means that the main screen changes, but the back screen does not. In another scenario, a floating capsule with the text "Payment App 1 | Payment Code | Loading" pops up on the main screen, while the back screen displays an interface prompting the user to enable the payment code function. This means that both the main screen and the back screen change.
[0107] It should be noted that the embodiments of the present application involve the two concepts of "QR code function turned on" and "QR code function not turned on". For ease of understanding, the conventional scenario of using QR code is used as an example for explanation. When a user clicks on the QR code control of an application (such as a travel control, a payment control), if the user has pre-authorized the application to turn on the QR code function, that is, the application has turned on the QR code function, then the electronic device displays the QR code interface corresponding to the QR code control, and the QR code interface includes a QR code; if the user has not authorized the application to turn on the QR code function, that is, the application has not turned on the QR code function, then the electronic device displays an interface prompting the user to turn on the QR code function, and the user clicks the control or option to agree to turn on the QR code function. The electronic device turns on the QR code function and displays the QR code interface corresponding to the QR code control.
[0108] Example 2 of a scenario where the QR code fails to display on the back screen:
[0109] As shown in Figure 3B, after the user taps the back screen twice in succession, the foldable phone detects that it needs to manually confirm the QR code before it can display it. Specifically, in one scenario, a floating capsule with the text "Payment App 1 | Payment Code | Loading" pops up on the main screen, while the back screen remains black. This means the main screen changes, but the back screen doesn't. In another scenario, a floating capsule with the text "Payment App 1 | Payment Code | Loading" pops up on the main screen, while a prompt message interface appears on the back screen, prompting the user to manually confirm the QR code. This means both the main and back screens change.
[0110] Example 3 of a scenario where the QR code fails to display on the back screen:
[0111] As shown in Figure 3C, after the user taps the back screen twice in succession, the foldable phone detects that the payment app has an app lock. Before displaying the QR code, the user is required to manually enter the app's unlock password. Specifically, in one scenario, a floating capsule with the text "Payment App 1 | Payment Code | Loading" pops up on the home screen, while the back screen remains black. This means the home screen changes, but the back screen doesn't. In another scenario, a floating capsule with the text "Payment App 1 | Payment Code | Loading" pops up on the home screen, while a prompt message interface appears on the back screen, prompting the user to manually enter the app's unlock password. This means both the home and back screens change.
[0112] Example 4 of a scenario where the QR code fails to display on the back screen:
[0113] As shown in Figure 3D, after the user taps the back screen twice in succession, the foldable phone displays the payment code of Payment App 1 on the back screen and a floating capsule on the main screen. If the payment code displayed on the back screen is not the QR code the user wants to use, the user can trigger the floating capsule to update to a drop-down list 103 and select "Use Payment App 2 to board the ride code" from drop-down list 103. The foldable phone detects that the user has not authorized Payment App 2 to enable the boarding code function. In one scenario, a floating capsule with the words "Payment App 1 | Payment Code | Loading" pops up on the main screen, while the back screen retains the payment code of Payment App 1, or the back screen goes off. In another scenario, a floating capsule with the words "Payment App 1 | Payment Code | Loading" pops up on the main screen, while the back screen displays an interface prompting the user to enable the boarding code. In both scenarios, the back screen will not display the boarding code of Payment App 2.
[0114] It should be noted that the above embodiments only list a few common scenarios in which the QR code is not successfully displayed on the back screen. It should be understood that the external folding screen mobile phone may also fail to successfully display the QR code in other scenarios.
[0115] In view of the above problems, the present application also provides a method for identifying whether a QR code is displayed on the back screen of a foldable screen device. This method can be applied to a foldable screen device in a folded state. After receiving the user's trigger to display a QR code on the back screen, the foldable screen device obtains a screenshot of the payment application and detects whether the screenshot of the payment application includes a QR code. If the QR code is not included, the QR code display task on the back screen is moved to the main screen, and the interface of the payment application is displayed on the main screen. In this way, the user can find that the QR code fails to be displayed on the back screen without flipping the screen, and through operations on the interface of the payment application on the main screen, such as authorizing the payment application to open the payment code, confirming the operation of opening the QR code interface, and entering the unlock password of the payment application, etc., the QR code is triggered to be displayed on the main screen, and the QR code is used to scan the code, thereby improving the user experience.
[0116] In order to better understand the method for identifying whether the back screen of a folding screen device displays a QR code provided by the embodiment of the present application, the hardware structure of the folding screen device of the embodiment of the present application is introduced below.
[0117] For example, FIG4 is a schematic diagram of the hardware structure of a folding screen device 100 provided in an embodiment of the present application.
[0118] As shown in Figure 4, the folding screen 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 194, and a SIM card interface 195, etc. Among them, 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, and a bone conduction sensor 180M, etc.
[0119] The processor 110 may include one or more processing units. For example, the processor 110 may include a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), an image signal processor (ISP), a neural-network processing unit (NPU), a video codec, a modem, a data processing unit (DPU) and / or a baseband processor, etc.
[0120] The CPU is the final execution unit for information processing and program execution. Its main tasks include processing instructions, executing operations, controlling time, and processing data. The CPU may include a controller, an arithmetic unit, a cache memory, and a bus for connecting these components. The controller is the nerve center and command center of the folding screen device 100. The controller can generate operation control signals based on the instruction opcode and timing signal to complete the control of instruction fetching and execution. The arithmetic unit refers to a component that performs various arithmetic and logical operations. The cache memory can store instructions or data that have just been used or recycled by the processor 110.
[0121] The GPU, also known as a display core, visual processor, or display chip, is a microprocessor for graphics and image processing. The GPU connects the display 194, the AP, and the CPU. The GPU can perform complex mathematical and geometric calculations, floating-point operations, parallel computing, and graphics rendering. The GPU reduces graphics card reliance on the CPU, especially when processing 3D graphics. The GPU utilizes core technologies such as cubic environment material mapping and vertex blending, allowing the GPU to perform some of the work previously performed by the CPU.
[0122] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the folding screen device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store the operating system and applications required for at least one function, such as payment applications. The data storage area can store configuration files of various applications, as well as data created during the use of the folding screen device 100.
[0123] The foldable screen device 100 can implement audio functions through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and AP.
[0124] The display screen 194 includes a main screen and a back screen as shown in FIG. 1A to FIG. 1D .
[0125] It is understood that the hardware structure illustrated in the embodiments of this application does not constitute a specific limitation on the foldable screen device 100. In other embodiments, the foldable screen device 100 may include more or fewer components than shown, or combine or split certain components, or arrange the components differently. The components shown in Figure 4 can be implemented in hardware, software, or a combination of software and hardware.
[0126] The software system of the foldable screen device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, and a microservice architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software architecture of the foldable screen device.
[0127] For example, FIG5 shows a schematic diagram of the architecture of the folding screen device provided in an embodiment of the present application.
[0128] As shown in Figure 5, the folding screen device can adopt a layered architecture to divide the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the software layers of the software structure are divided from top to bottom into: application (APP) layer, application framework (FW) layer, system library (FWK LIB), hardware abstraction layer (HAL) layer and kernel layer. The above software architecture runs on the hardware layer, which may include display screen, GPU and DPU, etc.
[0129] The application layer, also known as the application layer, can include a series of application packages. For example, the application layer may include payment applications and TapTap services, etc. Among them, the payment application can be a system application or a third-party payment application. Folding screen devices can support the installation of multiple payment applications, such as payment application 1 and payment application 2. The TapTap service is a system application provided by the folding screen device, which is used to pull up the QR code interface of the payment application on the back screen in response to the user's startup operation. In addition, the TapTap service can also be used to draw floating capsules and masks, etc. When these application packages are running, the various service modules provided by the application framework layer can be accessed through the application programming interface (API) and the corresponding intelligent services can be performed.
[0130] The application framework layer provides APIs and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 5, the application framework layer may include an activity manager service (AMS), a window manager service (WMS), a package manager service (PMS), a TapTap control service, and a surface manager (SurfaceFlinger). Among them, AMS manages the life cycle of each application. WMS manages all windows in the system. PMS manages all applications installed in the Android system. The TapTap control service is responsible for moving back-screen tasks to the main screen. SurfaceFlinger is responsible for the synthesis and display of layer data. For example, SurfaceFlinger can provide layer information to the hardware composer (HWC) HAL. The HWC HAL can decide whether to use the underlying hardware of the HWC or GPU synthesis based on the hardware performance.
[0131] The system library can include multiple functional modules, such as the surface manager, media libraries, a 2D graphics engine (e.g., SGL), and a 3D graphics processing library (e.g., OpenGL ES). The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of various common audio and video formats, as well as static image files. The media library supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The 2D graphics engine is a drawing engine for 2D graphics. The 3D graphics processing library implements 3D graphics drawing, image rendering, compositing, and layer processing.
[0132] Within the system libraries, the Android Runtime includes the core libraries and a virtual machine. The Android Runtime is responsible for scheduling and management of the Android system. The core libraries consist of two parts: one for the Java language's callable functions and the other for the Android core libraries. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files in the application layer and application framework layer as binary files. The virtual machine is responsible for performing functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0133] The hardware abstraction layer (HAL) has standard interfaces implemented by hardware vendors. For example, the HAL may include the TapTap algorithm, the hardware synthesizer HAL, and the audio HAL. The TapTap algorithm is used to determine whether a tap on the back screen triggers the TapTap service.
[0134] The kernel layer is the layer between hardware and software and belongs to the bottom layer of the Android system. The kernel layer can contain various driver interfaces, such as display drivers, audio drivers, sensor drivers, etc.
[0135] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to foldable screen devices based on operating systems such as iOS or Windows.
[0136] FIG6 is a flow chart showing a method for identifying whether a QR code is displayed on a back screen. Taking the method performed by a foldable screen device as an example, as shown in FIG6 , the method may include the following steps S1 to S5.
[0137] S1. The folding screen device receives a tapping operation on the back screen by the user.
[0138] The above-mentioned “tap operation” can be a tap operation twice in a row on the back screen. “Tap operation twice in a row” specifically means that the time interval between the first tap operation and the second tap operation is less than or equal to a preset time length, such as 0.5S (seconds).
[0139] As an example, at least one sensor may be provided on the mobile phone body at a position corresponding to the back screen, and the sensor may be used to collect vibration signals generated on the back screen.
[0140] As another example, at least one sensor can be installed on the phone body at a location corresponding to the main screen. It should be understood that since the main screen and back screen are essentially a single screen, when the foldable screen device is folded, even if the user taps the back screen, the sensor installed at the location corresponding to the main screen can still collect vibration signals.
[0141] As another example, at least one sensor is provided at each position on the main body corresponding to the main screen and the back screen. It should be understood that when sensors are provided at each position corresponding to the main screen and the back screen, the detection accuracy of the vibration signal is higher.
[0142] The above-mentioned sensor may be, for example, an acceleration (ACC) sensor, a shock sensor, a vibration sensor, and the like.
[0143] As shown in Figure 7, two ACC sensors are provided on the external folding screen mobile phone, and these two ACC sensors correspond to the main screen and the back screen respectively. When the folding screen device is in the folded state and the user has a need to scan a code, such as using a payment code to pay, using a payment code to receive money, or using a ride code to take a ride, the user can use the palm, fingertips, fingernails, side nails, knuckles and other body parts to tap the back screen twice in succession. Under the action of mechanical force, the main screen and the back screen generate mechanical vibrations. ACC sensor 1 and ACC sensor 2 each collect at least two ACC signals. Using the collected ACC signals, the size, position and time interval of the mechanical force applied by the user to the touch screen can be calculated, so as to determine whether the input is a TapTap operation. As an example, the TapTap operation can be a double-click operation on the back screen.
[0144] As shown in Figure 8, when the folding screen device is in the folded state and the main screen is unlocked and the screen is on, the TapTap control service of the application framework layer notifies the device management service to register the TapTap listener. Among them, the TapTap listener can be used to monitor whether there is a TapTap operation, and the TapTap operation can be used to trigger the pull-up of the QR code on the back screen. After the ACC sensor collects the ACC signal, the TapTap algorithm of the HAL layer can calculate whether the currently received user input is a TapTap operation based on the ACC signal. If it is a TapTap operation, the TapTap algorithm notifies the device management service. The listener of the device management service monitors the TapTap operation and transmits the TapTap operation to the TapTap service of the application layer through the TapTap control service to trigger the TapTap service to pull up the application that provides the QR code, such as a payment application. It should be noted that the embodiment of the present application is described by taking the application that provides the QR code as a payment application as an example, which does not limit the present application. In actual implementation, it can also be any application that provides a QR code, such as a social application, a financial application, etc.
[0145] It should be understood that when the user's demand is to pull up the QR code interface of the payment application on the back screen, the user is more accustomed to tapping the back screen, so it is more reasonable to set the sensor at a position corresponding to the back screen on the mobile phone body. It should be noted that although the above embodiment is described by taking the folding screen device receiving the user's tapping operation on the back screen as an example, it does not limit the present application. Since the main screen and the back screen are essentially two display areas of a large screen, when the user taps the main screen, the sensor set at the position corresponding to the main screen on the mobile phone body can also collect the vibration signal. The TapTap algorithm has a higher recognition accuracy for TapTap operations on the back screen than for TapTap operations on the main screen.
[0146] S2. In response to the tap operation, the foldable screen device registers a listener and launches the payment application.
[0147] For example, the TapTap service can register any of the following two listeners:
[0148] One is the ActivityNotifer, an activity listener registered with AMS, which monitors changes in the activity lifecycle. An activity represents a single screen with a user interface, such as a Java window or frame. Android activities are subclasses of contextThemeWrapper.
[0149] For example, when the TapTap service executes onStart(), onRestart(), onResume(), onCreate(), onPause(), or onStop(), the activity lifecycle will change. Among them, onStart() is called when the activity is visible to the user, onRestart() is called when the activity is restarted after being stopped, onResume() is called when the application starts interacting with the user, onCreate() is called when the activity is first created, onPause() is called when the current activity is about to be paused and the previous activity is about to be resumed, and onStop() is called when the activity is not visible.
[0150] The other is the WindowStateChangedListener, a window listener registered with WMS, which monitors whether the window state has been refreshed. It should be noted that "window" here refers to the application's view; "window state refresh" refers to updating the application's view in the background, but the view has not yet been displayed on the back screen.
[0151] Furthermore, the aforementioned "launching the payment app" refers to quickly jumping to the payment app's QR code interface based on the TapTap service settings. This eliminates the need to first open the payment app's homepage and then trigger multiple user actions to display the QR code interface, as is traditionally done.
[0152] S3. When a change in the life cycle of the payment application is detected through the activity listener ActivityNotifer, or when a window state refresh of the payment application is detected through the window listener WindowStateChangedListener, the folding screen device obtains the first interface of the payment application.
[0153] For example, the first interface may be a screenshot of a payment application interface. The screenshot of the payment application interface may be a screen (display) screenshot or a view (view) screenshot.
[0154] If the TapTap service registers an ActivityNotifer activity listener with AMS, it can notify the TapTap service when it detects changes in the payment app's lifecycle. The TapTap service obtains a screenshot of the payment app's display from WMS. Note that the "display" here refers to the image currently displayed on the back screen.
[0155] If the TapTap service registers a WindowStateChangedListener with the WMS, then when the WindowStateChangedListener detects a window state refresh for the payment app, it notifies the TapTap service. This message includes a screenshot of the payment app's interface. The TapTap service then obtains a screenshot of the payment app's view based on the screenshot information. It should be noted that the "view" here refers to the image that has not yet been displayed on the back screen.
[0156] S4. The folding screen device identifies whether the first interface includes a QR code.
[0157] For example, after the TapTap service obtains a screenshot of the payment application interface, it can call the zxing service to identify whether the first interface includes a QR code. The zxing service is an open source Java-based library for processing 1D barcodes (i.e., barcodes) and 2D barcodes (i.e., QR codes) in various formats.
[0158] S5. If the first interface does not include a QR code, the foldable screen device displays the second interface of the payment application on the main screen.
[0159] Among them, the first interface and the second interface are interfaces that do not contain QR codes.
[0160] Specifically, if the first interface is a screen capture (display), the first interface is a masked interface superimposed on the second interface. For example, the first interface is a QR code opening interface with a portion of the area covered by the mask, and the second interface is a complete QR code opening interface, that is, the content of some areas of the first and second interfaces are the same. If the first interface is a view capture (view), the content of the first and second interfaces is the same, for example, the first and second interfaces are both QR code opening interfaces.
[0161] It should be understood that when the foldable screen device is in the folded state, the user's attention is mainly focused on the main screen. In the case that the screenshot of the payment application interface does not include a QR code, if the user does not flip the back screen to face himself, the user may not be able to find in time that the back screen has not successfully displayed the QR code. In order to avoid the failure of scanning the code, the foldable screen device can move the display task of the back screen to the main screen, and display the interface of the payment application on the main screen. In this way, the user can find that the QR code fails to be displayed on the back screen without flipping the screen, and through operations on the interface of the payment application on the main screen, such as authorizing the payment application to open the payment code, confirming the operation of opening the QR code interface and entering the unlock password of the payment application, etc., the QR code is triggered to be displayed on the main screen, and the code is scanned using the QR code, thereby improving the user experience.
[0162] The following two embodiments introduce two methods for identifying whether a QR code is displayed on the back screen of a foldable screen device.
[0163] Example 1
[0164] Figure 9 shows a flow chart of a method for using an activity listener, ActivityNotifer, to identify whether a QR code is displayed on the back screen of a foldable screen device. The execution body of this method can be various functional modules of the foldable screen device. As shown in Figure 9, this method may include the following A1 to A20.
[0165] A1: When the user taps the back screen, the TapTap control service receives the TapTap operation and starts the TapTap service.
[0166] After the TapTap service is launched, the timer is started. The maximum duration of the timer is preset by the TapTap service, such as 5 seconds or 10 seconds.
[0167] For the specific implementation of A1, please refer to the relevant description of S1 in the above embodiment, which will not be repeated here.
[0168] A2: The TapTap service notifies AMS to register the activity listener ActivityNotifer.
[0169] Among them, the activity listener ActivityNotifer is used to monitor whether the life cycle of the activity changes.
[0170] For example, the changes in the activity life cycle can be onStart(), onRestart(), onResume(), onCreate(), onPause(), and onStop().
[0171] Specifically, the TapTap service can notify an ActivityManagerEx object in the AMS to register an activity listener ActivityNotifier. The ActivityManagerEx object registers an activity listener ActivityNotifier of the ActivityLifeStateCallBack type and stores this listener ActivityNotifier in mActivityNotifier.
[0172] After the TapTap service notifies AMS to register the activity listener ActivityNotifer, the TapTap service can also use any of the following methods to pull up the QR code interface of the payment application:
[0173] One method is to first execute the following A3 and then execute the following A4.
[0174] Another method is to first execute the following A5 and then execute the following A6.
[0175] A3. The TapTap service uses the StartActivity() method to launch the QR code interface of the payment application.
[0176] The StartActivity() method carries a parameter indicating the QR code interface of the payment application. Through this parameter, AMS can determine whether to launch the QR code interface of the payment application.
[0177] A4, AMS pulls up the QR code interface of the payment application.
[0178] A5. The TapTap service calls the software development kit (SDK) provided by the payment application to open the QR code interface of the payment application.
[0179] A6. The payment app calls AMS through the StartActivity() method to open the QR code interface of the payment app.
[0180] A7: After the TapTap service notifies the payment app or AMS to bring up the payment app's QR code interface, the TapTap service draws a floating capsule and stores it in a SurfaceFlinger cache (for example, cache 1). SurfaceFlinger then combines the floating capsule with other app interfaces (for example, e-books) and displays it on the main screen.
[0181] For the implementation of drawing floating capsules in the TapTap service, please refer to the descriptions of A12 and A13 below.
[0182] For example, the suspended capsule 101 may be as shown in FIG2A , including the prompt information “Payment Application 1 | Payment Code | Loading”. Through this prompt information, the user can know that the external folding screen mobile phone is trying to pull up the payment code interface of the payment application 1.
[0183] A8, the TapTap service draws the mask and stores the drawn mask in a cache of SurfaceFlinger (for example, cache 2).
[0184] For the implementation of the TapTap service drawing mask, please refer to the description of A12 and A13 below.
[0185] It's important to note that the "mask" in the A8 has already processed the hole area, making it transparent. When SurfaceFlinger composites the layers, the mask does not block the underlying layers (such as the QR code interface of the payment app or the activation QR code interface), allowing the underlying layers to show through the mask.
[0186] In addition, since the floating capsule in A7 and the mask in A8 will be displayed on the back screen and the main screen respectively, there is no display time limit for the two. Therefore, the embodiment of the present application does not limit the execution order of A7 and A8. For example, A7 and A8 can be executed at the same time, or A7 can be executed first and then A8, or A8 can be executed first and then A7.
[0187] A9: After launching the payment app, the payment app notifies the WMS to create a window for the payment app. This window is used to display the payment app interface.
[0188] Accordingly, the WMS returns a reply message indicating that the window has been created to the payment application.
[0189] A10: The payment application calls the onResume() method to notify AMS that the payment application's activity has reached onResume.
[0190] A11. After AMS detects through the activity listener ActivityNotifer that the payment application's activity has reached onResume, AMS notifies (calls) the TapTap service.
[0191] When the lifecycle of the payment application changes, WMS will notify the activity listener ActivityNotifer, so that the activity listener ActivityNotifer can monitor the change in the lifecycle of the payment application and notify the TapTap service.
[0192] It should be noted that the above embodiment is based on the example of AMS notifying the TapTap service when the payment application calls the onResume() method, which does not limit this application. Referring to the description of the above embodiment, AMS will also notify the TapTap service when the payment application calls the onStart(), onRestart(), onCreate(), onPause(), onStop() methods or other methods related to the life cycle.
[0193] A12: The payment application executes the setView() method to set the view.
[0194] Among them, the setView() method is used to add a view.
[0195] For example, when the payment application executes setView(), it first executes the requestLayout() method for re-layout, and then executes the addWindow() method for adding a window. The requestLayout() method is used to trigger the redrawing of the view, and the addWindow() method is used to add a window to the view.
[0196] When the payment app executes the requestLayout() method, it interacts with SurfaceFlinger and requests registration. After successful registration, SurfaceFlinger returns a vertical synchronization (Vsync) signal to the payment app. The Vsync signal is used to control the drawing, rendering, and compositing of one or more layers. The Vsync signal is periodic, and its frequency determines the system frame rate.
[0197] It should be noted that SurfaceFlinger will continue to generate periodic Vsync signals. Only after the payment application is successfully registered will SurfaceFlinger start returning Vsync signals to the payment application.
[0198] A13, the payment application executes the performTraversals() method to redraw the view.
[0199] The performTraversals() method is used to redraw the view for the payment application.
[0200] For example, after receiving the Vsync signal, the payment application may call the performTraverals() method of viewRootlpml to trigger view drawing.
[0201] On the one hand, the performTraverals() method calls the RelayoutWindow() method to set the desired window height and width, for example, the desired window height is the height of the back screen and the desired window width is the width of the back screen. WMS first executes the RelayoutWindow() method, and then, if it determines that the foldable screen device is in the folded state and the view is to be displayed on the back screen, it lights up the back screen (which was previously in a black screen state).
[0202] On the other hand, when the payment app executes the performTraversals() method, it first executes the performDraw() method, followed by the render thread. The performDraw() method prepares a canvas, and the render thread renders the view onto the canvas, drawing the displayed app interface. The payment app then stores the drawn app interface in a SurfaceFlinger cache (for example, cache 3).
[0203] After the payment app stores the drawn application interface in a SurfaceFlinger cache (for example, cache 3), SurfaceFlinger reads the application interface data from cache 3 and the mask data from cache 2. SurfaceFlinger then overlays the mask over the application interface, leaving only a portion of the area exposed from the hole, ultimately synthesizing it into a single frame. SurfaceFlinger then sends the masked application interface to the back screen, which then displays the masked application interface.
[0204] It should be noted that the application interface here can be an interface containing a QR code, that is, the application interface to be actually opened; it can also be an interface that does not contain a QR code, such as an interface that prompts the user to enable the payment code, an interface that prompts the user to confirm the display of the QR code, or an interface that prompts the user to enter the password of the payment application, etc.
[0205] A14. After the TapTap service receives the activity lifecycle change notification from AMS, the TapTap service calls the getSystemScreenshots() method to request the WMS to obtain the payment application's screen (display) screenshot data.
[0206] Accordingly, the WMS returns the acquired screen (display) screenshot data to the TapTap service.
[0207] It should be noted that the above-mentioned screen (display) screenshot data refers to the screenshot data obtained after taking a screenshot of the application interface covered by the mask displayed on the back screen.
[0208] A15. The TapTap service decodes the screen (display) screenshot data to obtain a screen (display) screenshot.
[0209] The above screen (display) screenshot is the first interface in the above S3.
[0210] A16, the TapTap service determines whether the screen (display) screenshot contains a QR code.
[0211] For example, the TapTap service can call the zxing service to identify whether the screen (display) screenshot includes a QR code.
[0212] If the screen (display) screenshot includes a QR code and the timer duration has not reached 5 seconds, the TapTap service can execute the following A17 and A18.
[0213] If the screen (display) screenshot does not include a QR code and the timer duration has not reached 5 seconds, the TapTap service can return to execute the above A15 and A16.
[0214] If the screen (display) screenshot does not include a QR code and the timer has reached 5 seconds, the TapTap service can execute the following A19 and A20.
[0215] A17, the TapTap service draws the floating capsule and stores it in a SurfaceFlinger cache (for example, cache 4). SurfaceFlinger combines the floating capsule with other application interfaces (for example, e-books) and displays it on the main screen.
[0216] For the implementation of drawing the floating capsule using the TapTap service, please refer to the descriptions of A12 and A13 above.
[0217] It should be noted that the prompt information in the floating capsule drawn by A7 is different from that in the floating capsule drawn by A17. The prompt information in the floating capsule drawn by A7 is used to indicate that the QR code interface is loading, while the prompt information in the floating capsule drawn by A17 is used to indicate that the QR code interface is displayed on the back screen.
[0218] For example, if it is detected within 5 seconds that the screen (display) screenshot includes a QR code, the application interface (i.e., the QR code) covered by the mask can be displayed on the back screen, and a floating capsule as shown in Figure 2A can be popped up on the main screen. The floating capsule 101 may include the prompt information "Payment application 1 | Payment code | has been displayed on the back screen." Through this prompt information, the user can know that the folding screen device has successfully pulled up the payment code interface of payment application 1. It should be understood that when different payment applications are pulled up, or when different QR code interfaces are pulled up, the prompt information of the floating capsule is also different.
[0219] A18, the TapTap service calls the unregisterActivityNotifiers() method to notify AMS to unregister the activity listener ActivityNotifer.
[0220] It should be understood that if the screen (display) screenshot is detected within 5S and includes a QR code, it means that the QR code has been successfully displayed on the back screen, and there is no need to monitor whether the QR code has been successfully displayed. Therefore, the TapTap service can notify AMS to unregister the activity listener ActivityNotifer.
[0221] A19, the TapTap service calls the moveTaskToFrontDisplay() method and notifies the AMS to move the display task on the back screen to the main screen through the TapTap control service.
[0222] For example, AMS can change the display ID of the task from the back screen ID to the main screen ID. The payment application draws the application interface and stores the drawn application interface in a cache of SurfaceFlinger (such as cache 5). After completing the layer synthesis, SurfaceFlinger sends the application interface to the main screen. The main screen displays the interface of the payment application, which is the second interface of S5 mentioned above, such as the QR code interface.
[0223] It should be noted that before moving the display task on the back screen to the main screen, the application interface displayed on the back screen is covered by a mask to facilitate users to scan the code, while the main screen displays the application interface before receiving the TapTap operation, such as the e-book interface; after moving the display task on the back screen to the main screen, the application interface displayed on the main screen is updated to an interface that is not covered by the mask (that is, the original application interface is displayed on the main screen), so that users can trigger the display of the QR code by operating the application interface.
[0224] A20, the TapTap service calls the unregisterActivityNotifiers() method to notify AMS to unregister the activity listener ActivityNotifer.
[0225] After the A19 and A20, the back screen has no display tasks and enters a black screen state. The black screen state means that the back screen is powered off or turned off.
[0226] It should be understood that if the QR code is still not detected when the maximum timing of 5 seconds is reached, it means that the QR code display on the back screen has failed, and there is no need to monitor whether the QR code has been successfully displayed. Therefore, the TapTap service can notify AMS to unregister the activity listener ActivityNotifer.
[0227] As an example, Figure 10 illustrates a scenario where a QR code is recognized from a screenshot of the back screen. As shown in Figure 10, with the foldable screen in the folded state, the user taps the back screen twice in succession. On the one hand, a floating capsule containing "Payment App 1 | Payment Code | Loading" pops up on the main screen. On the other hand, the foldable device draws the payment interface and overlays a dark mask over it, covering most of the interface, with only the QR code and barcode visible through the cutout area. SurfaceFlinger then sends the masked payment interface to the back screen, causing the masked payment interface (i.e., the QR code and barcode) to appear on the back screen. The foldable device then captures a screenshot of the screen, recognizes that it contains a QR code, and updates the floating capsule. For example, the notification message on the floating capsule changes from "Payment App 1 | Payment Code | Loading" to "Payment App 1 | Payment Code | Displayed on Back Screen." This notification lets the user know that the payment code from Payment App 1 has been successfully displayed on the back screen. It should be understood that when the payment application pulled up is different or the QR code interface pulled up is different, the prompt information of the floating capsule will also be different.
[0228] As an example, Figure 11 illustrates a scenario where a QR code is not recognized from a screenshot of the back screen. As shown in Figure 11, while the foldable screen is folded, the user taps the back screen twice in succession. The payment app has not yet enabled the payment function. On the one hand, the foldable device pops up a floating capsule containing "Payment App 1 | Payment Code | Loading" on the main screen. On the other hand, the foldable device first draws the payment interface and overlays a dark mask over the payment interface, covering most of the payment interface. Only the payment activation prompt is visible through the cutout area. SurfaceFlinger then sends the masked payment interface to the back screen, causing the back screen to display the masked payment interface (i.e., without the QR code). The foldable device then captures a screenshot of the screen and recognizes that it does not contain a QR code. It then moves the payment app display task to the main screen and displays the unmasked payment interface on the main screen. This allows the user to detect the failure to display the QR code on the back screen without having to flip the screen. In the method provided in Example 1, the TapTap service can monitor whether the activity of the payment application changes by registering the activity listener ActivityNotifer, and obtain screen (display) screenshot data when the activity changes, and move the display task of the payment application to the main screen if the QR code is not recognized from the screen (display) screenshot data, so that the user can find that the QR code is not successfully displayed on the back screen without flipping the screen.
[0229] It should be noted that in the method provided in Example 1, the foldable screen device first displays the masked application interface on the back screen, and then detects whether the application interface contains a QR code. In other words, regardless of whether the application interface to be displayed contains a QR code, the foldable screen device will directly display the masked application interface on the back screen.
[0230] The embodiment of the present application also provides another method for identifying whether a QR code is displayed on the back screen of a foldable screen device. The specific implementation of this method can be referred to the following embodiment 2. In the method provided in embodiment 2, the foldable screen device will only display the masked QR code interface on the back screen when it recognizes that the application interface to be displayed includes a QR code. That is, other interfaces covered by the mask will not be displayed on the back screen, such as an interface prompting the user to turn on the payment code, an interface prompting the user to confirm the display of the QR code, or an interface prompting the user to enter the password of the payment application.
[0231] Example 2
[0232] Figure 12 shows a flowchart of a method for using a window listener WindowStateChangedListener to identify whether an application interface to be displayed on the back screen (i.e., an application interface that has not yet been displayed on the back screen) includes a QR code. The execution subject of this method can be various functional modules of the foldable screen device. As shown in Figure 12, this method may include the following B1 to B19.
[0233] B1: When the user taps the back screen, the TapTap control service receives the TapTap operation and starts the TapTap service.
[0234] For the specific implementation of B1, reference may be made to the relevant descriptions of S1 and A1 in the above embodiments, which will not be repeated here.
[0235] B2. The TapTap service notifies WMS to register the window listener WindowStateChangedListener.
[0236] The window listener WindowStateChangedListener is used to monitor whether the window state of the payment application changes.
[0237] Specifically, the TapTap service can notify an object windowManagerEX in the WMS. WindowManagerEX executes the mWindowStateChangedListener.add() method to notify another object in the WMS to register a window listener WindowStateCallbackEX to register a window listener WindowStateChangedListener.
[0238] After the TapTap service notifies the WMS to register the window listener WindowStateChangedListener, the TapTap service can also pull up the payment application's QR code interface in any of the following ways:
[0239] One way is to first execute B3 below, and then execute B4 below.
[0240] Another method is to first execute B5 below and then execute B6 below.
[0241] B3. The TapTap service uses the StartActivity() method to launch the QR code interface of the payment application.
[0242] The StartActivity() method carries a parameter indicating the QR code interface of the payment application. Through this parameter, AMS can determine whether to launch the QR code interface of the payment application.
[0243] B4. AMS opens the QR code interface of the payment application.
[0244] B5. The TapTap service calls the software development kit (SDK) provided by the payment application to open the QR code interface of the payment application.
[0245] B6: The payment application calls AMS through the StartActivity() method, which means launching the QR code interface of the payment application.
[0246] B7. After the TapTap service notifies the payment app or AMS to bring up the payment app's QR code interface, the TapTap service draws a floating capsule and stores it in a SurfaceFlinger cache (for example, cache a). SurfaceFlinger then combines the floating capsule with other app interfaces (for example, an e-book) and displays it on the main screen.
[0247] For the implementation of drawing a floating capsule using the TapTap service, please refer to the descriptions of B11 and B12 below.
[0248] For example, the suspended capsule 101 may be as shown in FIG2A , including the prompt information “Payment Application 1 | Payment Code | Loading”. Through this prompt information, the user can know that the external folding screen mobile phone is trying to pull up the payment code interface of the payment application 1.
[0249] B8, the TapTap service draws the mask and stores the drawn mask in a cache of SurfaceFlinger (such as cache b).
[0250] For the implementation of drawing the mask in the TapTap service, please refer to the descriptions of B11 and B12 below.
[0251] It should be noted that the “mask” in B8 above does not contain a hole area.
[0252] In addition, since the floating capsule in B7 and the mask in B8 will be displayed on the back screen and the main screen respectively, there is no display time limit for the two. Therefore, the embodiment of the present application does not limit the execution order of B7 and B8. For example, B7 and B8 can be executed at the same time, or B7 can be executed first and then B8, or B8 can be executed first and then B7.
[0253] B9: After launching the payment application, the payment application notifies the WMS to create a window for the payment application. Accordingly, the WMS returns a reply message to the payment application indicating that the window has been created.
[0254] B10: The payment application calls the onResume() method to notify AMS that the payment application's activity has reached onResume.
[0255] It should be noted that in the second embodiment, since the TapTap service does not register the activity listener ActivityNotifer in the AMS, even if the life cycle of the payment application changes, the AMS will not notify the TapTap service, that is, there is no need to execute A9 in the above-mentioned first embodiment.
[0256] B11. The payment application executes the setView() method to set the view.
[0257] Among them, the setView() method is used to add a view.
[0258] For the implementation of B11, please refer to the above description of A12, which will not be repeated here.
[0259] B12, the payment application executes the performTraversals() method to redraw the view.
[0260] For example, after receiving the Vsync signal, the payment application may call the performTraverals() method of viewRootlpml to trigger view drawing.
[0261] On the one hand, the performTraverals() method calls the RelayoutWindow() method to set the desired window height and width, for example, the desired window height is the height of the back screen and the desired window width is the width of the back screen. WMS first executes the RelayoutWindow() method, and then, if it determines that the foldable screen device is in the folded state and the view is to be displayed on the back screen, it lights up the back screen (which was previously in a black screen state).
[0262] On the other hand, when the payment app executes the performTraversals() method, it first executes the notifyWindowStateForBackDisplay() method, which notifies the back screen window of its state. It then executes the performdraw() method, which then executes the render thread, storing the drawn application interface data in cache c. For the specific implementation of the performdraw() method and the render thread, refer to the description of step A11 in the first embodiment above and will not be repeated here.
[0263] Specifically, during the execution of the notifyWindowStateForBackDisplay() method, the payment application will take a screenshot of the current view by obtaining the root view hardware cache getRootViewHardwareBuffer() method, and store the relevant information of the view screenshot (such as screenshot height, screenshot width, screenshot format, etc.) in the cache HardwareBuffer. The view here refers to a layer that has not yet been sent to the back screen. In addition, the getRootViewHardwareBuffer() method will call the WMS window state change callback WindowStateChangedCallback() method to notify the WMS, where WindowStateChangedCallback() carries HardwareBuffer. Then, WMS notifies the TapTap service through the onWindowStateChanged() method, where onWindowStateChanged() also carries HardwareBuffer.
[0264] HardwareBuffer refers to a buffer in memory where the view screenshot is located. HardwareBuffer is an object, similar to a structure. WMS passes this HardwareBuffer as data to the TapTap service.
[0265] For example, HardwareBuffer may specifically cache windowStateInfo, which includes format, image width, image height, and the like.
[0266] B13. After the TapTap service receives the window state change notification from the WMS, the TapTap service obtains the view screenshot data from the buffer indicated by HardwareBuffer and decodes the view screenshot data to obtain a view screenshot.
[0267] B14, the TapTap service determines whether the screenshot contains a QR code.
[0268] For example, the TapTap service can call the zxing service to identify whether a view screenshot includes a QR code.
[0269] If the view screenshot includes a QR code and the timer duration has not reached 5 seconds, the TapTap service can execute B15 to B17 below.
[0270] If the view screenshot does not include a QR code and the timer duration has not reached 5 seconds, the TapTap service can wait for a window change and execute B13 and B14 above when a window change occurs.
[0271] If the view screenshot does not include a QR code and the timer has reached 5 seconds, the TapTap service can execute B18 and B19 below.
[0272] B15, TapTap draws the mask and stores the drawn mask in a cache of SurfaceFlinger (such as cache d).
[0273] Different from the above-mentioned B8 whose mask does not include the hole area, the B15 mask includes the hole area.
[0274] After the payment app stores the drawn mask in a SurfaceFlinger cache (for example, cache d), SurfaceFlinger reads the mask data from cache d and the application interface data from cache c. SurfaceFlinger then overlays the mask over the application interface, leaving only the QR code visible through the cutout area, ultimately compositing the resulting image into a single frame. SurfaceFlinger then sends this frame to the back screen, where the QR code appears.
[0275] B16, TapTap draws the floating capsule and stores it in a SurfaceFlinger cache (such as cache e). SurfaceFlinger combines the floating capsule with other application interfaces (such as e-books) and displays it on the main screen.
[0276] The suspension capsule of B16 may include a prompt message indicating that the QR code has been successfully displayed.
[0277] For the specific implementation of B16, please refer to the relevant description of A17 in the above embodiment, which will not be repeated here.
[0278] B17, the TapTap service calls the unregisterWindowStateChangedListener() method to notify the WMS to unregister the window listener WindowStateChangedListener.
[0279] It should be understood that if it is detected within 5 seconds that the view screenshot includes a QR code, there is no need to continue monitoring whether the QR code has been successfully displayed. The TapTap service can notify the WMS to unregister the window listener WindowStateChangedListener.
[0280] B18, the TapTap service calls the moveTaskToFrontDisplay() method and notifies the AMS to move the display task on the back screen to the main screen through the TapTap control service.
[0281] B19, the TapTap service calls the unregisterWindowStateChangedListener() method to notify the WMS to unregister the window listener WindowStateChangedListener.
[0282] For the implementation of B18 and B19, please refer to the above description of A19 and A20, which will not be repeated here.
[0283] It should be understood that if the QR code is still not detected when the maximum timing of 5 seconds is reached, there is no need to continue monitoring whether the QR code has been successfully displayed. The TapTap service can notify the WMS to unregister the window listener WindowStateChangedListener.
[0284] As an example, Figure 13 illustrates a scenario where a QR code is recognized from a view screenshot. As shown in Figure 13, with the foldable screen in the folded state, the user taps the back screen twice in succession. On the one hand, a floating capsule containing "Payment App 1 | Payment Code | Loading" pops up on the main screen. On the other hand, the foldable device first draws the payment view and then retrieves and recognizes the view screenshot. If the view screenshot is recognized to contain a QR code, the foldable device can overlay a dark mask over the payment view to cover most of the payment interface, leaving only the QR code and barcode visible through the cutout area. SurfaceFlinger then forwards the masked payment interface to the back screen, causing the back screen to display the masked payment interface (e.g., QR code and barcode). Additionally, the foldable device can update the floating capsule on the main screen, for example, updating the notification message from "Payment App 1 | Payment Code | Loading" to "Payment App 1 | Payment Code | Displayed on the back screen." Through this prompt information, the user can know that the back screen has successfully displayed the payment code from the payment application 1. It should be understood that when the payment application pulled up is different, or when the QR code interface pulled up is different, the prompt information of the suspended capsule will also be different.
[0285] As an example, Figure 14 shows a schematic diagram of a scenario in which a QR code is not recognized from a view screenshot. As shown in Figure 14, when the folding screen is in the folded state, the user taps the back screen twice in succession. On the one hand, the folding screen device pops up a floating capsule containing "Payment Application 1 | Payment Code | Loading" on the main screen; on the other hand, the folding screen device first draws the payment view (view), and then obtains and recognizes the view (view) screenshot. If the view (view) screenshot is not recognized to contain a QR code, the folding screen device can keep the back screen black, move the display task of the payment application to the main screen, and display the payment interface that is not covered by the mask on the main screen, so that the user can find that the QR code is not successfully displayed on the back screen without flipping the screen.
[0286] In the method provided in Example 2, the TapTap service can monitor whether the view screenshot contains a QR code by registering the window listener WindowStateChangedListener, and move the display task of the payment application to the main screen if the QR code is not recognized from the screenshot data, so that the user can find that the QR code is not successfully displayed on the back screen without flipping the screen.
[0287] In the above-mentioned embodiments 1 and 2, two methods for identifying whether a QR code is displayed on the back screen of a foldable screen device are introduced. In combination with the description of the above embodiments, regardless of the method used, if the foldable screen device still fails to detect the QR code when the maximum timer duration is reached, the display task of the payment application will be moved to the main screen, and the application interface that is not covered by the mask will be displayed on the main screen, such as an interface prompting the user to enable the payment code, an interface prompting the user to confirm the display of the QR code, or an interface prompting the user to enter the password of the payment application. In this way, the user can find that the QR code was not successfully displayed on the back screen without flipping the screen.
[0288] It should be noted that the above-mentioned embodiment 1 and embodiment 2 are both described by taking the example of the inability to pull up the QR code interface on the back screen when the TapTap operation is received, which does not limit the present application. Referring to the above embodiment, as described in Figure 3D, after the folding screen device has pulled up a QR code interface on the back screen, the user can trigger the folding screen device to pull up another QR code interface on the back screen by inputting into the drop-down list. In the process of pulling up another QR code interface, if the QR code is not recognized, you can also refer to the solution provided in the above embodiment to move the display task of the payment application to the main screen, and display the application interface that is not covered by the mask on the main screen, such as an interface prompting the user to turn on the payment code, an interface prompting the user to confirm the display of the QR code, or an interface prompting the user to enter the password of the payment application, etc. Please refer to the specific description of the above embodiment and will not repeat it here.
[0289] This application also provides a method for triggering the display of a QR code. When the main screen displays an application interface that does not contain a QR code, the user can trigger the display of a QR code on the main screen by operating the payment application interface on the main screen, such as authorizing the payment application to enable the payment code, confirming the opening of the QR code interface, or entering the unlock password of the payment application.
[0290] For example, let's take Payment App 1 as an application that displays a QR code on the back screen by default, and Payment App 1 doesn't have the QR code function enabled. When a user double-clicks the back screen to trigger the foldable device to display the payment code for Payment App 1, if the foldable device detects that the QR code function hasn't been enabled, it can display the payment code activation interface shown in Figure 15 on the main screen. This interface can include a control to activate the QR code function, such as a "Turn on Now" control. The user can click the "Turn on Now" control. The foldable device activates the QR code function for Payment App 1 and updates the payment code activation interface on the main screen to the payment interface. This interface includes both a QR code and a barcode, as well as options for receiving, paying, and transferring. The user can then flip the main screen and face the scanning device. After the payment is successful, the foldable device updates the payment interface on the main screen to indicate the successful payment. If the user exits the payment app, the main screen may return to the e-book interface or display the desktop.
[0291] It should be understood that the interfaces of payment apps designed by different app developers may vary, and the content exposed through the cutout area after being covered by the mask may also vary. Foldable screen devices can adjust the position of the cutout area in the interface for payment apps designed by different app developers to allow the QR code to be exposed through the cutout area.
[0292] An embodiment of the present application also provides a folding screen device, including a processor, which is coupled to a memory, and the processor is used to execute a computer program or instruction stored in the memory, so that the folding screen device implements the methods in the above embodiments.
[0293] The embodiment of the present application also provides a computer-readable storage medium having computer instructions stored therein; when the computer-readable storage medium is run on a computer, the computer is caused to execute the method shown above. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more servers that can be integrated with the medium. The available medium can be a magnetic medium (e.g., a floppy disk, hard disk, or tape), an optical medium, or a semiconductor medium (e.g., a solid state disk (SSD)).
[0294] An embodiment of the present application further provides a computer program product, which includes computer program code. When the computer program code runs on a computer, the computer executes the methods in the above embodiments.
[0295] The present application also provides a chip that is coupled to a memory and is used to read and execute computer programs or instructions stored in the memory to perform the methods in the above embodiments. The chip can be a general-purpose processor or a dedicated processor. It should be noted that the chip can be implemented using the following circuits or devices: one or more field programmable gate arrays (FPGAs), programmable logic devices (PLDs), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits capable of performing the various functions described throughout this application.
[0296] The folding screen device, computer-readable storage medium, computer program product and chip provided in the above-mentioned embodiments of the present application are all used to execute the method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects corresponding to the method provided above, and will not be repeated here.
[0297] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0298] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0299] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0300] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0301] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0302] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A two-dimensional code display method, characterized in that: The method is applied to an electronic device, wherein the electronic device comprises a main screen and a back screen, wherein the main screen and the back screen are two display areas of a display screen; when the electronic device is in a folded state, the main screen and the back screen face opposite directions; When the electronic device is in the unfolded state, the main screen and the back screen are oriented in the same direction; the method includes: At a first time point, displaying a first interface of a first application on the main screen; receiving a first tap operation on the back screen, and displaying a second interface of a second application on the back screen at a second time point, the second interface including a QR code; while the second interface is displayed on the back screen, the first interface is displayed on the main screen; between the first time point and the second time point, the electronic device is in the folded state, the second application is an application that displays a QR code on the back screen, and the second application has enabled a QR code function; At a third time point, displaying the first interface on the main screen; A second tap operation is received on the back screen, and at a fourth time point, a third interface of a third application is displayed on the main screen, wherein the third interface does not include a QR code; between the third time point and the fourth time point, the electronic device is in the folded state, and the third application is an application that displays a QR code on the back screen, and the QR code function is not enabled for the third application.
2. The method according to claim 1, characterized in that After receiving the second tapping operation on the back screen and before the fourth time point, the method further includes: The fourth interface of the third application is displayed on the back screen, the fourth interface does not include a QR code, the first area of the fourth interface is a black background, and the second area of the fourth interface has the same display content as the corresponding area of the third interface.
3. The method according to claim 1, characterized in that After receiving the first tapping operation on the back screen and before the second time point, the method further includes: displaying a first floating capsule on the main screen, the first floating capsule prompting that a QR code of the second application is being loaded on the back screen; After the second interface of the second application is displayed on the back screen and before the third time point, the method further includes: displaying a second floating capsule on the main screen, wherein the second floating capsule prompts that the QR code of the second application has been displayed on the back screen.
4. The method according to claim 3, characterized in that The second suspension capsule includes a deployment control; After the second suspended capsule is displayed on the main screen, the method further includes: Receiving an operation on the expansion control, and displaying a plurality of QR code options on the main screen, each QR code option corresponding to a QR code; receiving an operation on a first option among a plurality of QR code options, and displaying a fifth interface of a fourth application on the back screen, wherein the fifth interface includes a QR code; the fourth application has enabled a QR code function; or, An operation on a second option among multiple QR code options is received, and a sixth interface of a fifth application is displayed on the main screen, wherein the sixth interface includes a QR code; the fifth application has enabled a QR code function.
5. The method according to claim 1, characterized in that After receiving the second tapping operation on the back screen and before the fourth time point, the method further includes: A third floating capsule is displayed on the main screen, and the third floating capsule prompts that a QR code of the third application is being loaded on the back screen; and the third floating capsule is not displayed at the fourth time point.
6. The method according to any one of claims 1 to 5, characterized in that After receiving the first tapping operation on the back screen, the method further includes: Register the first listener; When the first listener detects that the life cycle of the second application changes, or the window state of the second application is refreshed, obtaining a screenshot of the interface of the second application; Recognizing that the interface screenshot of the second application includes a QR code; Among them, based on identifying that the interface screenshot of the second application includes a QR code, the second interface includes the QR code of the second application.
7. The method according to claim 6, characterized in that The first listener is a first activity listener, and the first activity listener is used to monitor the life cycle changes of the second application; the interface screenshot of the second application is a screenshot of the second interface sent to the back screen; or, The first listener is a first window listener, which is used to monitor the window state changes of the second application; the interface screenshot of the second application is a screenshot of the view of the second application, and the view of the second application is a view that is not displayed on the back screen.
8. The method according to claim 6 or 7, characterized in that: Before the second time point, the method further includes: synthesizing the view of the second application and the mask view to obtain the second interface; Among them, the third area of the mask view is a black background, and the fourth area of the mask view is transparent; the area corresponding to the third area in the second interface is a black background, and the area corresponding to the fourth area in the second interface is the QR code of the second application.
9. The method according to any one of claims 1 to 5, characterized in that After receiving the second tapping operation on the back screen, the method further includes: Register the second listener; When the second listener monitors that the life cycle of the third application changes, or the window state of the third application is refreshed, obtaining a screenshot of the interface of the third application; Recognizing that the interface screenshot of the third application does not include a QR code; Among them, based on identifying that the interface screenshot of the third application does not include a QR code, the third interface does not include the QR code of the third application.
10. The method according to claim 9, characterized in that The second listener is a second activity listener, and the second activity listener is used to monitor the life cycle changes of the third application; the interface screenshot of the third application is a screenshot of the fourth interface of the third application displayed on the back screen; the fourth interface does not include a QR code, the first area of the fourth interface is a black background, and the second area of the fourth interface has the same display content as the corresponding area of the third interface; or, The second listener is a second window listener, which is used to monitor the window state changes of the third application; the interface screenshot of the third application is a screenshot of the view of the third application, and the view of the third application is a view that is not displayed on the back screen.
11. The method according to any one of claims 1 to 10, characterized in that The third interface includes a control for enabling a QR code function; after the third interface of the third application is displayed on the main screen, the method further includes: An operation on the control for enabling the QR code function is received, and a seventh interface of the third application is displayed on the main screen, wherein the seventh interface includes a QR code.
12. The method according to any one of claims 1 to 11, characterized in that Before the third time point, the method further includes: receiving a selection operation on the third application; In response to the selection operation, the third application is set as an application that displays a QR code on the back screen.
13. The method according to any one of claims 1 to 12, characterized in that The first tapping operation and the second tapping operation are double tapping operations on the back screen.
14. An electronic device, characterized in that: comprising a processor, and a memory coupled to the processor; The memory stores instructions, and the processor calls the instructions so that the electronic device executes the two-dimensional code display method as described in any one of claims 1 to 13.
15. A chip, characterized in that: The chip is coupled to a memory, and the chip is used to read and execute a computer program stored in the memory to implement the two-dimensional code display method according to any one of claims 1 to 13.
16. 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 an electronic device, the electronic device executes the two-dimensional code display method according to any one of claims 1 to 13.