Two-dimensional code display method, electronic equipment, chip and storage medium
By implementing the QR code display method in the folding screen device, users can trigger the display of QR code on the back screen by tapping the back screen, solving the problem of low utilization rate of the back screen and improving the user experience.
Patent Information
- Application Number
- CN202311050723.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2025-02-21
AI Technical Summary
The back screen utilization rate of folding screen devices is low. Users mainly use the home screen when folding, and the back screen is idle.
By implementing a QR code display method in electronic devices, users can quickly display QR codes on the back screen by tapping the back screen, improving the utilization rate of the back screen. The method includes switching the application interface between the home screen and the back screen, and displaying the corresponding interface on the home screen when the QR code is displayed on the back screen.
Without the need to flip the screen, the QR code can be triggered to be displayed on the back screen, which improves the utilization rate of the back screen and improves the user experience.
Smart Images

Figure CN119493542A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] At present, people's demand for foldable screen devices that combine portability and large screen sizes is becoming increasingly strong.
[0003] Take the foldable phone as an example. When the foldable phone is in the folded state, the main screen faces the user and the back screen faces away from the user. The foldable phone is similar to a straight-screen phone. In this case, the user only uses the main screen and does not pay attention to the back screen, which causes the back screen to be idle. Therefore, how to improve the utilization rate of the back screen has become an urgent problem to be solved. Summary of the invention
[0004] The present application provides a two-dimensional code display method, an electronic device, a chip and a storage medium, which solve the technical problem of low utilization rate of the back screen of a folding screen device.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a method for displaying a two-dimensional code. The method can be applied to an electronic device, such as a folding screen device. The folding screen device may include a main screen and a back screen. The method may include:
[0007] At a first time point, displaying a first interface of a first application on a main screen;
[0008] A first tap operation is received on the back screen, and at a second time point, a second interface of a second application is displayed on the back screen, the second interface including a QR code; when 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 enabled a QR code function;
[0009] At a third time point, the first interface is displayed on the main screen;
[0010] 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.
[0011] 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 may be any application in the electronic device, such as a desktop application or an e-book application. The second application and the third application are applications capable of providing a QR code, such as a payment application.
[0012] 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 the QR code on the back screen (such as a payment code, a payment code, a ride 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.
[0013] After that, 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 the 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 that does not include the QR code on the main screen (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 fails to be displayed on the back screen without flipping the screen and enable the QR code.
[0014] 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.
[0015] 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 (ie, the QR code function is not enabled for the third application), displaying the third interface of the third application on the main screen.
[0016] In a possible implementation, the folding screen device may be an external folding screen device or an internal folding screen device. If it is an external folding screen device, the external folding screen device may include a display screen, and the main screen and the back screen are two display areas of the same display screen. If it is an internal folding screen device, the external folding screen device includes two display screens, one of which is the back screen and the other is the main screen, and the main screen can be bent into at least two display areas.
[0017] Regardless of whether the folding screen device has one or more display screens, 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 main screen and the back screen are in opposite directions, for example, the main screen faces the user and the back screen faces away from the user; when the folding screen device is in the unfolded state, the main screen and the back screen face 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.
[0018] In one possible implementation, the second application and the third application may be different applications. For example, the user may first set the second application as the default application for displaying the QR code on the back screen. If the user taps the back screen and the second application has enabled the QR code function, the QR code of the second application may be pulled up on the back screen. Then, the user may set the third application as the default application for displaying the QR code on the back screen. If the user taps the back screen and the third application has not enabled the QR code function, an interface prompting the user to enable the QR code for the third application may be displayed on the main screen.
[0019] In a possible implementation, the second application and the third application are the same application. For example, the user can first set an application as the default application for displaying the QR code on the back screen. If the user taps the back screen and the QR code function of the application is turned on, the QR code can be pulled up on the back screen; then, the user can turn off the QR code function of the application. If the user taps the back screen, an interface prompting the user to turn on the QR code can be displayed on the main screen.
[0020] In a 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 an application as the QR code displayed by default on the back screen. If the user taps the back screen and the function of the QR code is turned on, the QR code can be pulled up on the back screen; then, the user can set another QR code of the application as the QR code displayed by default on the back screen. If the user taps the back screen and the function of the other QR code is not turned on, an interface prompting the user to turn on the other QR code can be displayed on the main screen.
[0021] In a possible implementation, the above-mentioned "tapping operation on the back screen" may 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.5S. For example, at least one sensor may be provided at a position corresponding to the back screen on the mobile phone body to collect vibration signals generated on the back screen.
[0022] In the above solution, 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 on the main body corresponding to the back screen.
[0023] In one possible implementation, after receiving a second tap operation on the back screen and before a fourth time point, the method may also include: displaying a fourth interface of a third application on the back screen, the fourth interface not including a QR code, the first area of the fourth interface being a black background, and the second area of the fourth interface having the same display content as the corresponding area of the third interface.
[0024] In the above scheme, when the electronic device is in a folded state, if the user taps 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.
[0025] In a possible implementation, after receiving the first tapping 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 prompts that the QR code of the second application is being loaded on the back screen. For example, the floating capsule may include a prompt message "payment application 1 | payment code | loading".
[0026] In the above scheme, 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.
[0027] In a 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 prompts 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|displayed on the back screen".
[0028] 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.
[0029] In a possible implementation, the second floating capsule may further include an expansion control. After the first floating capsule displayed on the main screen is updated to the second floating capsule, the method may further include: receiving an operation on the expansion control; 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, the user may trigger the display of a drop-down list by operating the expansion control, and the drop-down list includes multiple QR code options pre-set by the user, such as "Use payment application 1 to board the bus" and "Use payment application 2 to pay the bus".
[0030] In the above scheme, 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.
[0031] In one possible implementation, after displaying multiple QR code options, the method may further include: receiving an operation on a first option among the multiple QR code options, the first option corresponding to a QR code of a fourth application; in response to the operation, displaying a fifth interface of the fourth application on the back screen, and displaying the first interface and a 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.
[0032] In the above scheme, 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 the user can be prompted on the main screen through a floating capsule that the QR code has been successfully updated.
[0033] 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 a fifth application; in response to the operation, displaying a 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.
[0034] In the above scheme, when the user operates the QR code option corresponding to an application in 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 (such as enabling the QR code interface), thereby facilitating the user to enable the QR code.
[0035] In a possible implementation, after receiving the second tap operation on the back screen and before the fourth time point, the method may further include: displaying a third floating capsule on the main screen, the third floating capsule prompting 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.
[0036] In the above solution, after the third time point, when the electronic device responds to the user's tapping operation on the back screen and attempts to pull up the QR code interface of the third application, the electronic device can prompt the user through the third floating capsule, so that the user knows that the electronic device is trying to pull 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 cancel the display of the third floating capsule on the main screen and pull the interface that enables the QR code function to the main screen.
[0037] In a possible implementation, after receiving the first tap operation of the user on the back screen, the method may further include: registering a first listener; when the first listener detects that the life cycle of the second application has changed, or the window state of the second application has been refreshed, obtaining a screenshot of the interface of the second application; and recognizing that the screenshot of the interface of the second application includes a QR code. It should be understood that based on recognizing that the screenshot of the interface of the second application includes a QR code, the second interface includes the QR code of the second application.
[0038] 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.
[0039] For another example, the first listener may be a first window listener WindowStateChangedListener, and the first window listener WindowStateChangedListener may be used to monitor 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 displayed on 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.
[0040] In a 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 to the back screen. 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 a QR code of the second application.
[0041] In the above scheme, 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.
[0042] 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 the timing, and deregistering the first listener.
[0043] 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 deregistered.
[0044] In a possible implementation, after receiving the second tap operation of the user on the back screen, the method may further include: registering a second listener; when the second listener detects that the life cycle of the third application has changed, or the window state of the third application has been refreshed, obtaining a screenshot of the interface of the third application; and identifying that the screenshot of the interface of the third application does not include a QR code. It should be understood that based on identifying that the screenshot of the interface of the third application does not include a QR code, the third interface does not include the QR code of the third application.
[0045] 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.
[0046] 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.
[0047] In one possible implementation, after receiving a second tap operation on the back screen, the method may further include: starting timing; when the timing reaches a preset duration and no QR code is identified from the interface screenshot of the third application, stopping the timing and deregistering the second listener.
[0048] In the above scheme, after receiving the user's tapping operation on the back screen, if the QR code is not recognized for 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 deregistered.
[0049] 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.
[0050] In the above scheme, 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.
[0051] In a possible implementation, the third interface may include a control for enabling a QR code function, and the control 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, wherein the seventh interface includes a QR code.
[0052] In the above scheme, when the electronic device displays an interface that does not include a QR code on the main screen (such as opening a QR code interface), the user can trigger the display of the QR code on the main screen by opening the control in the payment application on the main screen, such as authorizing the payment application to open the payment code, so that the QR code can be scanned, thereby improving the user experience.
[0053] In a possible implementation, at the fourth time point, after the seventh interface of the third application is displayed on the main screen, the method may further include: at the fifth time point, displaying the first interface on the main screen. Receiving a third tapping operation on the back screen, at the sixth time point, displaying the eighth interface of the third application on the back screen, the eighth interface including a QR code; when 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 an application that displays a QR code on the back screen by default, and the QR code function of the third application has been enabled.
[0054] In the above scheme, 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.
[0055] In a second aspect, the present application provides a device, which includes a unit for executing the method in the first aspect. The device may correspond to executing the QR code display method described in the first aspect. For the relevant description of the unit in the device, please refer to the description of the first aspect, which will not be repeated here for the sake of brevity.
[0056] 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.
[0057] In a third aspect, the present application provides an electronic device, the electronic device comprising a memory and one or more processors. The memory is used to store computer program code, and the computer program code comprises computer instructions. When the computer instructions are called by the processor, the electronic device executes the two-dimensional code display method provided in any one of the first aspects.
[0058] 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 two-dimensional code display method provided in the first aspect and any possible implementation thereof.
[0059] 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 two-dimensional code display method provided in the first aspect and any possible implementation thereof.
[0060] In a sixth aspect, the present application provides a chip. 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 provided in any one of the first aspects.
[0061] 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 lines. 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, the signal including a computer instruction stored in the memory. When the processor calls the computer instruction, the electronic device can execute the two-dimensional code display method provided in any one of the first aspects.
[0062] 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 method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1A-Figure 1D A schematic diagram of an outward folding screen mobile phone provided in an embodiment of the present application;
[0064] Figure 2A-2G A schematic diagram of a scenario in which a QR code is successfully displayed on a back screen provided in an embodiment of the present application;
[0065] Figure 3A-3D A schematic diagram of a scenario in which a QR code is not successfully displayed on the back screen provided in an embodiment of the present application;
[0066] Figure 4 A schematic diagram of the hardware structure of a folding screen device provided in an embodiment of the present application;
[0067] Figure 5 A schematic diagram of the architecture of a folding screen device provided in an embodiment of the present application;
[0068] Figure 6 A flowchart of a method for identifying whether a QR code is displayed on a back screen provided in an embodiment of the present application;
[0069] Figure 7 A schematic diagram of setting an ACC sensor on the back screen provided in an embodiment of the present application;
[0070] Figure 8 A schematic diagram of receiving a TapTap operation provided in an embodiment of the present application;
[0071] Fig. 9 A flowchart of another method for identifying whether a QR code is displayed on a back screen provided in an embodiment of the present application;
[0072] Fig.10A schematic diagram of a scenario from back screen screenshot recognition to QR code provided in an embodiment of the present application;
[0073] Fig.11 A schematic diagram of a scenario in which a QR code is not recognized from a back screen screenshot provided in an embodiment of the present application;
[0074] Fig.12 A flowchart of another method for identifying whether a QR code is displayed on a back screen provided in an embodiment of the present application;
[0075] Fig.13 A schematic diagram of a scenario in which a QR code is recognized from a screenshot of a payment view provided in an embodiment of the present application;
[0076] Fig.14 A schematic diagram of a scenario in which a QR code is not recognized from a screenshot of the payment code opening view provided in an embodiment of the present application;
[0077] Fig.15 A schematic diagram of opening a payment code provided in an embodiment of the present application. DETAILED DESCRIPTION
[0078] 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 conjunction 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.
[0079] 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 only a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0080] The terms "first" and "second" in the specification and claims of this application 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, the first frame and the 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, "multiple" refers to two or more.
[0081] When the foldable screen device is in the folded state, the main screen faces the user and the back screen faces away from the user. The foldable screen device is similar to a straight-screen mobile 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.
[0082] In view of the above problems, an embodiment of the present application provides a QR code display method. The method can be applied to an electronic device (such as a folding screen device) 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 collection code, or a ride 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.
[0083] 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.
[0084] 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 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 the main screen and the back screen are both 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 approaches the folding angle of 0°, and β is equal to or approaches the folding angle of 180°.
[0085] Exemplarily, the folding screen device may be an outward-folding screen mobile phone or an inward-folding screen mobile phone.
[0086] Take the folding screen device as an example, Figures 1A to 1D A schematic diagram of an outward folding screen mobile phone is shown.
[0087] Figure 1A A schematic diagram of an external folding screen mobile phone in a folded state is shown. When the external folding screen mobile phone is in the folded state, the back screen is folded to be flush with the rear camera, the main screen faces the user, and the back screen faces away from the user. In this case, the user's attention is mainly focused on the main screen, and it is impossible to pay attention to the content displayed on the back screen in time.
[0088] Figure 1B A schematic diagram of an external folding screen mobile phone in a hovering state is shown. When the external folding screen mobile phone is in a hovering state, the folding angle between the main screen and the back screen is greater than 0° and less than 180°.
[0089] Figure 1CA schematic diagram of an external folding screen mobile phone in an unfolded state is shown. When the external folding screen mobile phone is in the unfolded state, the main screen and the back screen are in the same plane.
[0090] Above Figure 1A , Figure 1B and Figure 1C The main screen and back screen in the system are essentially two display areas of the same screen. Figure 1D As shown in the figure, a hinge is set behind the display area corresponding to the main screen and the display area corresponding to the back screen. When the user holds the folding screen phone with both hands and folds along the hinge, the state of the folding screen phone can be changed. For example, start with Figure 1C The expanded state shown switches to Figure 1B The hover state shown, then from Figure 1B The hover state shown switches to Figure 1A The folded state is shown.
[0091] Below in Figures 1A to 1D Based on the external folding screen mobile phone shown, 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.
[0092] As an example, Figure 2A As shown, at the initial moment, the user holds the folded external folding screen mobile phone in one hand, with the main screen facing the user and the back screen away from the user. If the main screen is displaying an e-book, the user can use the thumb to slide on the main screen to browse the e-book. In the folded state, the back screen does not respond to the user's touch operation. If the user has a need to scan the code, such as using the payment code to pay, using the payment code to collect money, or using the ride code to take a ride, the user can use the index finger or middle finger to continuously tap the back screen twice (i.e. double-click the back screen). In response to the tapping operation, the external folding screen mobile phone displays a suspended capsule 101 on the main screen. Among them, the suspended capsule 101 may include two areas: one area displays the prompt message "Payment application 1 | Payment code | Loading", through which the user can know that the external folding screen mobile phone is trying to pull up the payment code interface of payment application 1; the other area displays a triangular expansion control, and the user can trigger the display of a drop-down list by operating the expansion control.
[0093] If the external folding screen mobile phone has successfully displayed the payment code interface of payment application 1 on the back screen, then the external folding screen mobile phone can update the prompt information of the suspended capsule 101, for example, from "Payment application 1|Payment code|Loading" to "Payment application 1|Payment code|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 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. In addition, the dark background image can also include a "Payment application 1 payment code" word, 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 type of QR code. 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.
[0094] As another example, the external folding screen mobile phone can also change the display form of the suspension capsule 101. Figure 2A As shown, the display form of the suspended capsule 101 displayed on the main screen is similar to a capsule, which is called a capsule state. Figure 2A After the suspended capsule 101 is opened, the external folding screen mobile phone starts timing. When the timing reaches a preset time (for example, 5S), if no touch operation of the user on the main screen is received, the suspended capsule 101 is opened. Figure 2A The capsule state shown is updated as follows Figure 2B The hidden state 102 shown. 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 blocking the interface of the main screen and affecting the user's normal browsing of the e-book. In addition, if the main screen does not receive any user operation within the timing time, and the timing 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 Figure 2B The suspended capsule in the hidden state is shown in FIG. Figure 2A The capsule state shown.
[0095] As another example, in Figure 2A The suspension capsule 101 is shown based on Figure 2CAs shown, the user can trigger the display of the drop-down list 103 by operating the expansion control 101a. The drop-down list 103 may include other QR code options, such as "Use payment application 1 to board the bus" and "Use payment application 2 to pay the bus". In addition, the drop-down list 103 may also include a "Display on the main screen" option.
[0096] 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. Figure 2C Based on the drop-down list 103 shown, Figure 2D As shown, the user can click "Use payment application 1 to board the bus code", and the external folding screen mobile phone will update the payment code of payment application 1 displayed on the back screen to the boarding code of payment application 1, and display the updated floating capsule 104 on the main screen. The prompt information of the updated floating capsule 104 is "Payment application 1|boarding code|has been displayed on the back screen".
[0097] In addition, the user may need to switch the payment code interface to the main screen. Figure 2C Based on the drop-down list 103 shown, Figure 2E As shown, 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.
[0098] In the above embodiment, FIG. 2A to FIG. 2E In the description of , the folding screen device will first pop up a floating capsule "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 is 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. Figure 2F As shown, after the user taps the back screen twice in succession with the index finger or the middle finger, the external folding screen mobile phone displays a QR code interface on the back screen in response to the tapping operation, and pops up a floating capsule 105 of "Payment application 1|Payment code|Displayed on the back screen" on the main screen. That is, before the back screen pulls up the QR code interface, the external folding screen mobile phone will not pop up a floating capsule of "Payment application 1|Payment code|Loading" on the main screen.
[0099] As another example, Figure 2GThe operation diagram of opening the quick code display service (also called TapTap service) is shown. The user can click the "Folding Screen Zone" option 1061 of the setting interface to trigger the external folding screen mobile phone to display the folding screen zone interface. Then, the user can click the "Quick Code Display" option 1062 of the folding screen zone interface to trigger the external folding screen mobile phone to display the quick code display interface, which may include: quick code display option, display position option, added service option and add service option 1063. Among them, the quick code display option can be used to trigger the external folding screen mobile phone to open the quick code display service; the display position 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 display service is pulled up. 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; the add service option is used to add a QR code. The user can also click on the add service option 1063 to trigger the external folding screen mobile phone to display the add service interface 1064, which provides multiple payment applications installed in the external folding screen mobile phone and the QR codes supported by each payment application. Then, the user can manually add one or more QR codes by operating the add control according to usage needs. When the quick code display service is pulled up, these manually added QR codes will be displayed in the following Figure 2C is displayed in the drop-down list shown.
[0100] For example, when the user sets the payment application 1 as the application that displays the QR code on the back screen by default, if the user double-taps on the back screen, the electronic device will try to pull up the QR code of the payment application 1. For another example, when the user sets the payment code of the payment application 1 as the QR code displayed on the back screen by default, if the user double-taps on the back screen, the electronic device will try to pull up the payment code of the payment application 1. Of course, the application that displays the QR code on the back screen by default, or the QR code displayed on the back screen by default, can also be automatically set by the electronic device, such as setting the boarding code of the electronic wallet as the QR code displayed on the back screen by default.
[0101] In such Figures 2A to 2G In the provided display method, 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 authorized the payment code function to be enabled. One possible scenario is that the floating capsule that has been displayed on the main screen remains as "Payment App 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 promptly discover 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.
[0102] The following example shows that a floating capsule "Payment App 1 | Payment Code | Loading" will pop up on the main screen of a foldable phone. FIG. 3A to FIG. 3D Provides several examples of scenarios where the QR code cannot be successfully displayed on the back screen.
[0103] Example 1 of a scenario where the QR code is not successfully displayed on the back screen
[0104] like Figure 3A As shown in the figure, after the user taps the back screen twice in succession, the external folding screen 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 case, a floating capsule "Payment Application 1 | Payment Code | Loading" pops up on the main screen, and the back screen remains black, that is, the main screen changes but the back screen does not; in another case, a floating capsule "Payment Application 1 | Payment Code | Loading" pops up on the main screen, and the back screen displays an interface prompting the user to turn on the payment code, that is, both the main screen and the back screen change.
[0105] 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 a QR code control of an application (such as a travel control, a payment control), if the user has authorized the application to turn on the QR code function in advance, that is, the application has turned on the QR code function, then the electronic device displays a 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 on the control or option that agrees 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.
[0106] Example 2 of a scenario where the QR code is not displayed successfully on the back screen
[0107] like Figure 3B As shown in the figure, after the user taps the back screen twice in succession, the external folding screen phone detects that the user needs to manually click to confirm before displaying the QR code. Specifically, in one case, a floating capsule "Payment Application 1 | Payment Code | Loading" pops up on the main screen, and the back screen remains black, that is, the main screen changes but the back screen does not; in another case, a floating capsule "Payment Application 1 | Payment Code | Loading" pops up on the main screen, and the back screen displays a prompt information interface to prompt the user to manually confirm opening the QR code, that is, both the main screen and the back screen change.
[0108] Example 3 of a scenario where the QR code is not displayed successfully on the back screen
[0109] like Figure 3CAs shown, after the user taps the back screen twice in succession, the external folding screen phone detects that the payment application is set with an application lock, and the user is required to manually enter the unlock password of the application before displaying the QR code. Specifically, in one case, a floating capsule "Payment Application 1 | Payment Code | Loading" pops up on the main screen, and the back screen remains black, that is, the main screen changes, but the back screen does not change; in another case, a floating capsule "Payment Application 1 | Payment Code | Loading" pops up on the main screen, and the back screen displays a prompt information interface to prompt the user to manually enter the unlock password of the application, that is, both the main screen and the back screen change.
[0110] Example 4 of a scenario where the QR code is not successfully displayed on the back screen
[0111] like Figure 3D As shown, after the user taps the back screen twice in succession, the external folding screen mobile phone displays the payment code of payment application 1 on the back screen and displays a floating capsule on the main screen. If the payment code displayed on the back screen is not the QR code that the user wants to use, the user can trigger the floating capsule to update to the drop-down list 103, and select "Use payment application 2 boarding code" from the drop-down list 103. The external folding screen mobile phone detects that the user has not authorized payment application 2 to enable the boarding code function. In one case, a floating capsule of "Payment application 1|Payment code|Loading" pops up on the main screen, and the back screen keeps the payment code of payment application 1, or the back screen goes off; in another case, a floating capsule of "Payment application 1|Payment code|Loading" pops up on the main screen, and the back screen displays an interface prompting to enable the boarding code. In both cases, the back screen will not display the boarding code of payment application 2.
[0112] 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.
[0113] 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 folding screen device. This method can be applied to a folding screen device in a folded state. After receiving the user's trigger to display a QR code on the back screen, the folding 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 in 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 scanned, thereby improving the user experience.
[0114] 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.
[0115] For example, Figure 4 A schematic diagram of the hardware structure of a folding screen device 100 provided in an embodiment of the present application.
[0116] like Figure 4 As shown, 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 screen 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.
[0117] 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.
[0118] The CPU is the final execution unit for information processing and program running. 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 an operation control signal based on the instruction opcode and timing signal to complete the control of fetching and executing instructions. The arithmetic unit refers to a component that performs various arithmetic and logical operations. The cache memory can save instructions or data that the processor 110 has just used or recycled.
[0119] GPU, also known as display core, visual processor or display chip, is a microprocessor for graphics and image processing. GPU connects display screen 194, AP and CPU. GPU can be used to perform complex mathematical and geometric calculations, floating-point operations, parallel calculations, and can also be used for graphics rendering. GPU reduces the graphics card's dependence on the CPU, especially when processing 3D graphics. GPU uses core technologies such as cubic environment material mapping and vertex blending, so GPU performs some of the work originally done by the CPU.
[0120] The internal memory 121 can be used to store computer executable program codes, and the executable program codes 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 an operating system, an application required for at least one function, such as a payment application, etc. 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.
[0121] The folding screen device 100 can realize audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an AP.
[0122] Display screen 194 includes Figures 1A to 1D Main screen and back screen shown.
[0123] It is understandable that the hardware structure illustrated in the embodiment of the present application does not constitute a specific limitation on the folding screen device 100. In other embodiments, the folding screen device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange the components differently. Figure 4 The components shown may be implemented in hardware, software or a combination of software and hardware.
[0124] The software system of the folding screen device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, and a micro-service 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 folding screen device.
[0125] For example, Figure 5 A schematic diagram of the architecture of a folding screen device provided in an embodiment of the present application is shown.
[0126] like Figure 5 As shown, the folding screen device can adopt a layered architecture to divide the software into several layers, each with clear roles and division of labor. The layers communicate 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 top of the hardware layer, which may include display screens, GPUs, DPUs, etc.
[0127] The application layer, also known as the application layer, may include a series of application packages. For example, the application layer may include payment applications and TapTap services, etc. Among them, the payment application may 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.
[0128] The application framework layer provides API and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 5As shown, 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 the back screen task 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, and the HWC HAL can decide whether to use the underlying hardware of the HWC or GPU synthesis based on the hardware performance.
[0129] The system library can include multiple functional modules, such as surface manager, media libraries, 2D graphics engine (e.g. SGL), 3D graphics processing library (e.g. OpenGLES), etc. Among them, the surface manager is used to manage the display subsystem and provide fusion of 2D layers and 3D layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 2D graphics engine is a drawing engine for 2D drawing. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing.
[0130] In the system library, Android Runtime includes the core library and the virtual machine. Android Runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the core library of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
[0131] The hardware abstraction layer has a standard interface implemented by hardware vendors. For example, the hardware abstraction layer may include the TapTap algorithm, the hardware synthesizer HAL, and the audio HAL. Among them, the TapTap algorithm is used to calculate whether the tapping operation is a trigger to open the TapTap service when the user taps the back screen.
[0132] 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 driver, audio driver, sensor driver, etc.
[0133] 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 folding screen devices based on operating systems such as iOS or Windows.
[0134] Figure 6 A schematic diagram of a method for identifying whether a QR code is displayed on a back screen is shown. Take the folding screen device as an example. Figure 6 As shown, the method may include the following S1 to S5.
[0135] S1. The folding screen device receives a tapping operation on the back screen by the user.
[0136] The above-mentioned “tap operation” may be two consecutive tap operations on the back screen. “Two consecutive tap operations” 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).
[0137] As an example, at least one sensor may be provided at a position on the mobile phone body corresponding to the back screen, and the sensor may be used to collect a vibration signal generated on the back screen.
[0138] As another example, at least one sensor may be provided at a position corresponding to the main screen on the mobile phone body. It should be understood that since the main screen and the back screen are essentially one screen, when the folding screen device is in the folded state, even if the user taps the back screen, the sensor provided at the corresponding position of the main screen can also collect vibration signals.
[0139] As another example, at least one sensor is provided at positions corresponding to the main screen and the back screen on the machine body. It should be understood that when sensors are provided at positions corresponding to the main screen and the back screen, the detection accuracy of the vibration signal is higher.
[0140] The sensor may be, for example, an acceleration (ACC) sensor, a shock sensor, a vibration sensor, and the like.
[0141] like Figure 7As shown, 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 the code, such as using the payment code to pay, using the payment code to collect money, or using the ride code to take a ride, the user can use the palm, fingertips, fingernails, side nails and 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.
[0142] like Figure 8 As shown, when the folding screen device is in the folded state, 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 listen for TapTap operations, 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 listens to 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, or the like.
[0143] 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 on the mobile phone body corresponding to the back screen. 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 the TapTap operation of the back screen than the TapTap operation of the main screen.
[0144] S2. In response to the tapping operation, the folding screen device registers a listener and launches a payment application.
[0145] For example, the TapTap service can register any of the following two listeners:
[0146] One is the activity listener ActivityNotifer registered in AMS, which is used to monitor whether the life cycle of an activity has changed. Among them, an activity represents a single screen with a user interface, such as a Java window or frame. The activity of the Android system is a subclass of contextThemeWrapper.
[0147] For example, when the TapTap service executes onStart(), onRestart(), onResume(), onCreate(), onPause(), or onStop(), the life cycle of the activity 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 interaction is about to be paused and the previous activity is about to be resumed, and onStop() is called when the activity is not visible.
[0148] The other is the window listener WindowStateChangedListener registered in WMS, which is used to monitor whether the window state is refreshed. It should be noted that the "window" here refers to the view of the application; "window state refresh" means updating the view of the application in the background, but the view has not yet been displayed on the back screen.
[0149] In addition, the above-mentioned "pull up the payment application" means quickly jumping to the QR code interface of the payment application according to the TapTap service settings. That is, there is no need to open the homepage of the payment application first as in the traditional operation, and then trigger the display of the QR code interface through multiple operations of the user.
[0150] 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.
[0151] Exemplarily, the first interface may be a screenshot of the interface of the payment application. The screenshot of the interface of the payment application may be a screen (display) screenshot or a view (view) screenshot.
[0152] If the TapTap service registers the activity listener ActivityNotifer in AMS, then when the activity listener ActivityNotifer detects changes in the life cycle of the payment application, the activity listener ActivityNotifer can notify the TapTap service. The TapTap service obtains the screen (display) screenshot of the payment application from WMS. It should be noted that the "screen (display)" here refers to the image that has been displayed on the back screen.
[0153] If the TapTap service registers the window listener WindowStateChangedListener in WMS, then when the window listener WindowStateChangedListener detects the window state refresh of the payment application, the window listener WindowStateChangedListener notifies the TapTap service, and the message notifying the TapTap service contains the interface screenshot information of the payment application. The TapTap service obtains the view screenshot of the payment application based on the interface screenshot information. It should be noted that the "view" here refers to the image that has not yet been displayed on the back screen.
[0154] S4. The folding screen device identifies whether the first interface includes a QR code.
[0155] For example, when the TapTap service obtains a screenshot of the payment application interface, the TapTap service can call the zxing service to identify whether the first interface includes a QR code. The zxing service is an open source, Java-based 1D barcode (i.e., barcode) and 2D barcode (i.e., QR code) image processing library in multiple formats.
[0156] S5. If the first interface does not include a QR code, the folding screen device displays the second interface of the payment application on the main screen.
[0157] Among them, the first interface and the second interface are interfaces that do not contain QR codes.
[0158] Specifically, if the first interface is a screen (display) screenshot, the first interface is an interface with a mask superimposed on the second interface, for example, the first interface is an opening QR code interface with a partial area covered by the mask, and the second interface is a complete opening QR code interface, that is, the content of some areas of the first interface and the second interface are the same. If the first interface is a view (view) screenshot, the content of the first interface and the second interface is the same, for example, the first interface and the second interface are both opening QR code interfaces.
[0159] It should be understood that when the folding 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 promptly discover that the back screen did not successfully display the QR code. In order to avoid code scanning failure, the folding 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 in 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., trigger the display of the QR code on the main screen, and use the QR code to scan the code, thereby improving the user experience.
[0160] The following two methods for identifying whether a QR code is displayed on the back screen of a folding screen device are introduced through two embodiments.
[0161] Embodiment 1
[0162] Fig. 9 The flowchart of the method for using the activity listener ActivityNotifer to identify whether the back screen of the folding screen device displays a QR code is shown. The execution subject of the method can be each functional module of the folding screen device. Fig. 9 As shown, the method may include the following A1 to A20.
[0163] A1. When the user taps the back screen, the TapTap control service obtains the TapTap operation and starts the TapTap service.
[0164] After the TapTap service is started, the timer is started. The maximum timing duration of the timer is preset by the TapTap service, such as 5S or 10 seconds.
[0165] For the specific implementation of A1, reference may be made to the relevant description of S1 in the above embodiment, which will not be repeated here.
[0166] A2, the TapTap service notifies AMS to register the activity listener ActivityNotifer.
[0167] Among them, the activity listener ActivityNotifer is used to monitor whether the life cycle of the activity changes.
[0168] For example, the changes in the activity life cycle can be onStart(), onRestart(), onResume(), onCreate(), onPause(), and onStop().
[0169] Specifically, the TapTap service can notify an object ActivityManagerEx in the AMS to register an activity listener ActivityNotifier. The object ActivityManagerEx registers an activity listener ActivityNotifier of the ActivityLifeStateCallBack type and stores the listener ActivityNotifier in mActivityNotifier.
[0170] After the TapTap service notifies AMS to register the activity listener ActivityNotifer, the TapTap service can also pull up the QR code interface of the payment application in any of the following ways:
[0171] One way is to first execute the following A3 and then execute the following A4.
[0172] Another method is to first execute the following A5 and then execute the following A6.
[0173] A3. The TapTap service uses the StartActivity() method to launch the QR code interface of the payment application.
[0174] The StartActivity() method carries a parameter for indicating the QR code interface of the payment application. Through this parameter, AMS can determine that the QR code interface of the payment application needs to be pulled up.
[0175] A4, AMS pulls up the QR code interface of the payment application.
[0176] A5. The TapTap service calls the software development kit (SDK) provided by the payment application to pull up the QR code interface of the payment application.
[0177] A6. The payment application calls AMS through the StartActivity() method to open the QR code interface of the payment application.
[0178] A7, after the TapTap service notifies the payment application or AMS to pull up the QR code interface of the payment application, the TapTap service draws a floating capsule and stores the drawn floating capsule in a cache of SurfaceFlinger (such as cache 1). SurfaceFlinger synthesizes the floating capsule with other application interfaces (such as e-books) and sends them to the main screen for display.
[0179] For the implementation method of drawing the floating capsule by the TapTap service, please refer to the description of A12 and A13 below.
[0180] For example, the suspension capsule 101 may be Figure 2A As shown, it includes 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 payment application 1.
[0181] A8, the TapTap service draws the mask and stores the drawn mask in a cache of SurfaceFlinger (such as cache 2).
[0182] For the implementation of drawing the mask by the TapTap service, please refer to the description of A12 and A13 below.
[0183] It should be noted that the "mask" in the above A8 has already processed the hole area, that is, the hole area is transparent. When SurfaceFlinger synthesizes the layer, the mask will not block the underlying layer (such as the QR code interface of the payment application, the activation QR code interface, etc.), so that the underlying layer can be seen through the mask.
[0184] 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 simultaneously, or A7 can be executed first and then A8, or A8 can be executed first and then A7.
[0185] A9: After launching the payment application, the payment application notifies WMS to create a window for the payment application. The window is used to display the interface of the payment application.
[0186] Accordingly, the WMS returns a reply message indicating that the window has been created to the payment application.
[0187] A10: The payment application calls the onResume() method to notify AMS that the activity of the payment application has been executed to onResume.
[0188] A11, after AMS detects through the activity listener ActivityNotifer that the activity of the payment application has been executed to onResume, AMS notifies (calls) the TapTap service.
[0189] When the life cycle of the payment application changes, WMS will notify the activity listener ActivityNotifer, so that the activity listener ActivityNotifer can monitor the change of the life cycle of the payment application and notify the TapTap service.
[0190] It should be noted that the above embodiment is illustrated by taking the example of AMS notifying the TapTap service when the payment application calls the onResume() method, which does not limit the present 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() method or other methods related to the life cycle.
[0191] A12, the payment application executes the setView() method to set the view.
[0192] Among them, the setView() method is used to add a view.
[0193] For example, when the payment application executes setView(), the requestLayout() method is first executed for re-layout, and then the addWindow() method is executed 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.
[0194] When the payment application executes the requestLayout() method, the payment application interacts with SurfaceFlinger and requests registration. After successful registration, SurfaceFlinger returns a vertical synchronization (Vsync) signal to the payment application. The Vsync signal is used to control the drawing, rendering, and synthesis of one or more layers. The Vsync signal is a periodic signal, and the periodic frequency of the Vsync signal determines the system frame rate.
[0195] It should be noted that SurfaceFlinger will continue to generate periodic Vsync signals. Only after the payment application is successfully registered, SurfaceFlinger will start to return Vsync signals to the payment application.
[0196] A13, the payment application executes the performTraversals() method to redraw the view.
[0197] The performTraversals() method is used to redraw the view for the payment application.
[0198] Exemplarily, after receiving the Vsync signal, the payment application may call the performTraverals() method of viewRootlpml to trigger view drawing.
[0199] On the one hand, the performTraverals() method calls the RelayoutWindow() method to set the expected window height and width, for example, the expected window height is the height of the back screen and the expected window width is the width of the back screen. WMS first executes the RelayoutWindow() method, and then, if it is determined that the folding 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).
[0200] On the other hand, when the payment application executes the performTraversals() method, it first executes the performdraw() method and then executes the render thread. The performdraw() method is used to prepare a canvas, and the render thread is used to render the view to the canvas, that is, to draw the application interface that is pulled up. Then, the payment application stores the drawn application interface in a cache of SurfaceFlinger (for example, cache 3).
[0201] After the payment application stores the drawn application interface into a cache of SurfaceFlinger (for example, cache 3), SurfaceFlinger reads the application interface data from cache 3 and the mask data from cache 2. Then, SurfaceFlinger covers the application interface with the mask, and only part of the area is exposed from the hole area, and finally synthesizes it into a frame of image. Then, SurfaceFlinger sends the application interface covered by the mask to the back screen, so that the back screen displays the application interface covered by the mask.
[0202] It should be noted that the application interface here can be an interface containing a QR code, that is, the application interface that is actually to be pulled up; 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.
[0203] A14, after the TapTap service receives the notification of the activity lifecycle change from the AMS, the TapTap service calls the getSystemScreenshots() method to request the WMS to obtain the screen (display) screenshot data of the payment application.
[0204] Accordingly, the WMS returns the acquired screen (display) screenshot data to the TapTap service.
[0205] 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 and displayed on the back screen.
[0206] A15, the TapTap service decodes the screen (display) screenshot data to obtain the screen (display) screenshot.
[0207] The above screen (display) screenshot is the first interface in the above S3.
[0208] A16, the TapTap service determines whether the screen (display) screenshot contains a QR code.
[0209] For example, the TapTap service can call the zxing service to identify whether the screen (display) screenshot includes a QR code.
[0210] If the screen (display) screenshot includes a QR code and the timer duration has not reached 5S, the TapTap service can execute A17 and A18 described below.
[0211] If the screen (display) screenshot does not include a QR code and the timer duration has not reached 5S, the TapTap service can return to execute the above A15 and A16.
[0212] If the screen (display) screenshot does not include a QR code and the timer has reached 5S, the TapTap service can execute A19 and A20 described below.
[0213] A17, the TapTap service draws the floating capsule and stores the drawn floating capsule in a cache of SurfaceFlinger (such as cache 4). SurfaceFlinger synthesizes the floating capsule with other application interfaces (such as e-books) and sends them to the main screen for display.
[0214] For the implementation method of drawing the floating capsule by the TapTap service, please refer to the description of A12 and A13 above.
[0215] 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 prompt that the QR code interface is being loaded, and the prompt information in the floating capsule drawn by A17 is used to prompt that the QR code interface is displayed on the back screen.
[0216] For example, if the screen (display) screenshot is detected within 5S and includes a QR code, the application interface (i.e., the QR code) covered by the mask can be displayed on the back screen and popped up on the main screen. Figure 2A The suspended capsule 101 may include a prompt message "Payment application 1 | Payment code | has been displayed on the back screen". Through this prompt message, 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 message of the suspended capsule is also different.
[0217] A18, the TapTap service calls the unregisterActivityNotifiers() method to notify AMS to unregister the activity listener ActivityNotifer.
[0218] 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, so the TapTap service can notify AMS to unregister the activity listener ActivityNotifer.
[0219] 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.
[0220] 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 opening the QR code interface.
[0221] 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 user scanning of 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 the user can trigger the display of the QR code by operating the application interface.
[0222] A20, the TapTap service calls the unregisterActivityNotifiers() method to notify AMS to unregister the activity listener ActivityNotifer.
[0223] After A19 and A20, since the back screen has no display task, the back screen enters a black screen state. The black screen state means that the back screen is powered off or enters a screen-off state.
[0224] It should be understood that if the QR code is still not detected when the maximum timing length of 5S is reached, it means that the QR code has failed to be 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.
[0225] As an example, Fig.10 Schematic diagram of the scene from back screen screenshot recognition to QR code. Fig.10 As shown, 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 draws the payment interface and covers a layer of dark mask on the layer above the payment interface to cover most of the payment interface, with only the QR code and barcode exposed from the hole area. Then, SurfaceFlinger sends the payment interface covered by the mask to the back screen, so that the back screen displays the payment interface covered by the mask (i.e., the QR code and barcode). Then, the folding screen device obtains a screenshot of the screen (display), recognizes that the screenshot of the screen (display) contains a QR code, and then updates the floating capsule. For example, the prompt information of the floating capsule is updated from "Payment Application 1 | Payment Code | Loading" to "Payment Application 1 | Payment Code | Already displayed on the back screen". Through this prompt information, the user can know that the back screen has successfully displayed the payment code from payment application 1. 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 suspended capsule is also different.
[0226] As an example, Fig.11 The schematic diagram shows a scenario where the QR code is not recognized from the back screen screenshot. Fig.11As shown, when the folding screen is in the folded state, the user taps the back screen twice in succession. The payment application has not yet enabled the payment function. 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 interface, and covers a dark mask on the layer above the payment interface to cover most of the payment interface. Only the prompt information for enabling payment is exposed from the hole area. Then, SurfaceFlinger sends the masked payment interface to the back screen, so that the back screen displays the masked payment interface (that is, does not contain the QR code). Then, the folding screen device obtains a screenshot of the screen (display), and recognizes that the screenshot of the screen (display) does not contain a QR code, and then moves the payment application display task to the main screen, and displays the payment interface that is not covered by the mask on the main screen, so that the user can find that the QR code fails to be displayed on the back screen without flipping the screen. In the method provided in Example 1, the TapTap service can monitor whether the activity of the payment application changes by registering an activity listener ActivityNotifer, and obtain the 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.
[0227] It should be noted that in the method provided in Example 1, the folding screen device first displays the application interface covered by the mask on the back screen, and then detects whether the application interface contains a QR code. That is, regardless of whether the application interface to be displayed includes a QR code, the folding screen device will directly display the application interface covered by the mask on the back screen.
[0228] The embodiment of the present application also provides another method for identifying whether the back screen of a folding screen device displays a QR code. The specific implementation of this method can refer to the following embodiment 2. In the method provided in embodiment 2, the folding screen device will only display the QR code interface covered by the mask 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.
[0229] Embodiment 2
[0230] Fig.12The flowchart of the method of using the window listener WindowStateChangedListener to identify whether the application interface to be displayed on the back screen (i.e., the application interface that has not yet been displayed on the back screen) includes a QR code is shown. The execution subject of this method can be various functional modules of the folding screen device. Fig.12 As shown, the method may include the following B1 to B19.
[0231] B1. When the user taps the back screen, the TapTap control service obtains the TapTap operation and starts the TapTap service.
[0232] 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.
[0233] B2. The TapTap service notifies WMS to register the window listener WindowStateChangedListener.
[0234] Among them, the window listener WindowStateChangedListener is used to monitor whether the window state of the payment application changes.
[0235] Specifically, the TapTap service can notify an object windowManagerEX in the WMS. The 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.
[0236] After the TapTap service notifies WMS to register the window listener WindowStateChangedListener, the TapTap service can also pull up the QR code interface of the payment application in any of the following ways:
[0237] One way is to first execute the following B3 and then execute the following B4.
[0238] Another method is to first execute the following B5 and then execute the following B6.
[0239] B3. The TapTap service uses the StartActivity() method to launch the QR code interface of the payment application.
[0240] The StartActivity() method carries a parameter for indicating the QR code interface of the payment application. Through this parameter, AMS can determine that the QR code interface of the payment application needs to be pulled up.
[0241] B4, AMS pulls up the QR code interface of the payment application.
[0242] B5. The TapTap service calls the software development kit (SDK) provided by the payment application to pull up the QR code interface of the payment application.
[0243] B6, the payment application calls AMS through the StartActivity() method, indicating that the QR code interface of the payment application is opened.
[0244] B7, after the TapTap service notifies the payment application or AMS to pull up the QR code interface of the payment application, the TapTap service draws a floating capsule and stores the drawn floating capsule in a cache of SurfaceFlinger (such as cache a). SurfaceFlinger synthesizes the floating capsule with other application interfaces (such as e-books) and displays them on the main screen.
[0245] For the implementation method of drawing the floating capsule by the TapTap service, please refer to the description of B11 and B12 below.
[0246] For example, the suspension capsule 101 may be Figure 2A As shown, it includes 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 payment application 1.
[0247] B8, the TapTap service draws the mask and stores the drawn mask in a cache of SurfaceFlinger (such as cache b).
[0248] For the implementation of drawing the mask by the TapTap service, please refer to the description of B11 and B12 below.
[0249] It should be noted that the “mask” in B8 above does not contain a hole-digging area.
[0250] 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.
[0251] 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 indicating that the window has been created to the payment application.
[0252] B10, the payment application calls the onResume() method to notify AMS that the activity of the payment application has been executed to onResume.
[0253] 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.
[0254] B11, the payment application executes the setView() method to set the view.
[0255] Among them, the setView() method is used to add a view.
[0256] For the implementation method of B11, please refer to the relevant description of A12 above, which will not be repeated here.
[0257] B12, the payment application executes the performTraversals() method to redraw the view.
[0258] Exemplarily, after receiving the Vsync signal, the payment application may call the performTraverals() method of viewRootlpml to trigger view drawing.
[0259] On the one hand, the performTraverals() method calls the RelayoutWindow() method to set the expected window height and width, for example, the expected window height is the height of the back screen and the expected window width is the width of the back screen. WMS first executes the RelayoutWindow() method, and then, if it is determined that the folding 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).
[0260] On the other hand, when the payment application executes the performTraversals() method, the notifyWindowStateForBackDisplay() method is first executed to notify the back screen window state callback, and then the performdraw() method is executed, and then the render thread is executed to store the drawn application interface data into the cache C. For the specific implementation of the performdraw() method and the render thread, refer to the relevant description of A11 in the above embodiment 1, which will not be repeated here.
[0261] 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.) into the cache HardwareBuffer. The view here refers to a layer that has not yet been displayed on the back screen. In addition, the getRootViewHardwareBuffer() method will call the WMS window state change callback WindowStateChangedCallback() method to notify the WMS, in which WindowStateChangedCallback() carries the HardwareBuffer. Then, WMS notifies the TapTap service through the onWindowStateChanged() method, in which onWindowStateChanged() also carries the HardwareBuffer.
[0262] HardwareBuffer is used to point to a buffer in the memory, that is, the buffer where the view screenshot is located. HardwareBuffer is an object, similar to a structure. WMS passes this HardwareBuffer as a data to the TapTap service.
[0263] For example, HardwareBuffer may specifically cache windowStateInfo, which includes format, image width, image height, and the like.
[0264] 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 the HardwareBuffer, and decodes the view screenshot data to obtain the view screenshot.
[0265] B14, the TapTap service determines whether the screenshot contains a QR code.
[0266] For example, the TapTap service can call the zxing service to identify whether the view screenshot includes a QR code.
[0267] If the view screenshot includes a QR code and the timer duration has not reached 5S, the TapTap service can execute B15 to B17 described below.
[0268] If the view screenshot does not include a QR code and the timer duration has not reached 5S, the TapTap service can wait for a window change and execute B13 and B14 above when a window change occurs.
[0269] 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.
[0270] B15, TapTap draws the mask and stores the drawn mask in a cache of SurfaceFlinger (such as cache d).
[0271] Different from the above-mentioned B8 whose mask does not include the hole-digging area, the B15's mask includes the hole-digging area.
[0272] After the payment application stores the drawn mask in a cache of SurfaceFlinger (for example, cache d), SurfaceFlinger reads the mask data from cache d and the application interface data from cache c. Then, SurfaceFlinger covers the mask on the application interface, leaving only the QR code exposed from the hole area, and finally synthesizes it into a frame of image. Then, SurfaceFlinger sends this frame of image to the back screen, so that the QR code is displayed on the back screen.
[0273] B16, TapTap draws the suspended capsule and stores the drawn suspended capsule in a cache of SurfaceFlinger (such as cache e). SurfaceFlinger synthesizes the suspended capsule with other application interfaces (such as e-books) and sends them to the main screen for display.
[0274] The suspension capsule of B16 may include prompt information indicating that the QR code has been successfully displayed.
[0275] For the specific implementation of B16, reference may be made to the relevant description of A17 in the above embodiment, which will not be repeated here.
[0276] B17, the TapTap service calls the unregisterWindowStateChangedListener() method to notify the WMS to unregister the window listener WindowStateChangedListener.
[0277] 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.
[0278] 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.
[0279] B19, the TapTap service calls the unregisterWindowStateChangedListener() method to notify the WMS to unregister the window listener WindowStateChangedListener.
[0280] For the implementation of B18 and B19, please refer to the relevant description of A19 and A20 above, which will not be repeated here.
[0281] It should be understood that if the QR code is still not detected when the maximum timing length of 5S 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.
[0282] As an example, Fig.13 FIG. 1 shows a schematic diagram of a scene from view screenshot recognition to a QR code. Fig.13As shown, 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 it is recognized that the view (view) screenshot contains a QR code, the folding screen device can cover a layer of dark mask on the upper layer of the payment view (view) to cover most of the payment interface area, with only the QR code and barcode exposed from the hole area. Then, SurfaceFlinger sends the payment interface covered by the mask to the back screen, so that the back screen displays the payment interface covered by the mask (such as the QR code and barcode). In addition, the folding screen device can also update the floating capsule on the main screen, for example, the prompt information of the floating capsule is updated from "Payment Application 1 | Payment Code | Loading" to "Payment Application 1 | Payment Code | Already displayed on the back screen". Through this prompt information, the user can know that the back screen has successfully displayed the payment code from 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.
[0283] As an example, Fig.14 FIG. 1 shows a schematic diagram of a scenario in which a QR code is not recognized from a view screenshot. Fig.14 As shown, 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, and then obtains and recognizes the view screenshot. If the 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.
[0284] In the method provided in Example 2, the TapTap service can monitor whether the view screenshot contains a QR code by registering a 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.
[0285] In the above-mentioned Embodiment 1 and Embodiment 2, two methods for identifying whether a QR code is displayed on the back screen of a folding screen device are introduced. In combination with the description of the above-mentioned embodiments, no matter which method is used, if the folding screen device still fails to detect the QR code when the maximum timing 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 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. In this way, the user can find that the QR code is not successfully displayed on the back screen without flipping the screen.
[0286] It should be noted that the above-mentioned embodiments 1 and 2 are described by taking the case where the QR code interface cannot be pulled up on the back screen when a TapTap operation is received as an example, which does not limit the present application. Figure 3D Introduction: 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. Please refer to the specific description of the above embodiment, which will not be repeated here.
[0287] The present 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 interface of the payment application on the main screen, such as authorizing the payment application to open the payment code, confirming the opening of the QR code interface, or entering the unlock password of the payment application.
[0288] For example, payment application 1 is used as the default application to display the QR code on the back screen, and the QR code function is not enabled on payment application 1. When the user triggers the folding screen device to pull up the payment code of payment application 1 by double-clicking on the back screen, if the folding screen device detects that the QR code function of payment application 1 is not enabled in advance, it can display the following on the main screen: Fig.15The interface for enabling the payment code function is shown. The interface may include a control for enabling the QR code function, such as a "turn on now" control. The user can click the "turn on now" control. The folding screen device starts the QR code function of the payment application 1, and updates the interface for enabling the payment code function on the main screen to the payment and collection interface. Among them, the payment and collection interface includes a QR code and a barcode, as well as options such as receiving money, installments, and transfers. Then, the user can flip the main screen and turn the main screen toward the scanning device. After the payment is successful, the folding screen device updates the payment and collection interface on the main screen to an interface of successful payment. If the user triggers the exit of the payment application, the main screen may return to the e-book interface or display the desktop, etc.
[0289] It should be understood that the interfaces of payment applications designed by different application developers are different, and the content exposed from the cutout area after being covered by the mask may also be different. The folding screen device can adjust the position of the cutout area in the interface for payment applications designed by different application developers so that the QR code can leak out of the cutout area.
[0290] 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.
[0291] The embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored; 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 a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. 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, data center, etc. that can be integrated with one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium or a semiconductor medium (e.g., a solid state drive (SSD)), etc.
[0292] An embodiment of the present application further provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes the methods in the above embodiments.
[0293] The embodiment of the present application also provides a chip, which is coupled to a memory, and the chip is used to read and execute a computer program or instruction 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 (field programmable gate array, FPGA), programmable logic devices (programmable logic device, PLD), 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.
[0294] 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.
[0295] 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.
[0296] In the several embodiments provided in the present 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 only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, 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.
[0297] The units described as separate components may or may not be physically separated, and the 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 different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0298] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0299] 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, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0300] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope 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.
Citation Information
Cited By
Two-dimensional code display method, electronic device, chip and storage medium
EP4671960A1
Two-dimensional code display method, electronic device, chip and storage medium
WO2025039511A1