Data transmission method, electronic equipment and storage medium
By dragging and dropping screenshots or recording thumbnails on smart terminal devices, corresponding resource data transmission is achieved, and the problem of inconvenient resource data transmission in the existing technology is solved, convenient and fast data transmission is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411868205.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2043-11-14
AI Technical Summary
After screenshots and recordings of existing smart terminal devices, it is difficult to achieve convenient transmission between resource data.
By dragging and dropping the screenshot thumbnail or screen recording video thumbnail, the corresponding screenshot image or screen recording video can be transmitted. The specific steps include: displaying the thumbnail, creating a drag-able thumbnail in response to the user's long press, listening to the drag event, and leaving the user after dragging the thumbnail to the target area to complete the data transmission.
It realizes convenient transmission of resource data between services, simple and fast operation, and improves user experience.
Smart Images

Figure CN119766923A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202380018766.X, and the original application date is November 14, 2023. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present application relates to the field of intelligent terminal devices, and in particular to a data transmission method, an electronic device and a storage medium. Background Art
[0003] In modern life, smart terminals such as mobile phones have become an indispensable daily tool for people. In addition to basic communication functions, smart terminals such as mobile phones also provide many practical functions, such as screenshot and screen recording, making people's lives more convenient and intelligent. Summary of the invention
[0004] The present application provides a data transmission method, electronic device and storage medium. In this method, a user drags a screenshot thumbnail or a screen recording video thumbnail to transfer the screenshot image or screen recording video corresponding to the thumbnail to other services, thereby realizing convenient transmission of resource data between services.
[0005] In the first aspect, the present application provides a data transmission method. The method includes: the electronic device displays a first thumbnail corresponding to a screenshot image or a screen recording video at a first position in response to a first operation; the electronic device creates a second thumbnail at a first position in response to a second operation on the first thumbnail, and hides the first thumbnail, wherein the second thumbnail and the first thumbnail have the same image screen, and the second thumbnail is a draggable image; the electronic device moves in response to a third operation, the second thumbnail moves with the hand, the third operation acts on the second thumbnail, and the third operation is a drag operation that is continuous with the second operation; the electronic device drags the second thumbnail to the first area in response to the third operation and then releases the hand, transmits the screenshot image or screen recording video corresponding to the first thumbnail to the first business, and does not display the first thumbnail and the second thumbnail, wherein the first area is a hot zone corresponding to the first business.
[0006] Exemplarily, the first operation may be a screenshot operation or an operation to end screen recording. The screenshot operation may be, for example, tapping the screen with a knuckle, air gesture, clicking a shortcut switch, pressing a combination of keys, etc. The operation to end screen recording may be, for example, clicking a shortcut switch, pressing a combination of keys, air gesture, voice control, etc.
[0007] Exemplarily, the first position may be the lower left corner area of the display screen.
[0008] Exemplarily, the second operation may be a finger long press operation, and the third operation may be an operation of dragging the second thumbnail with the finger.
[0009] Exemplarily, the first thumbnail may be the thumbnail view image mentioned below, and the second thumbnail may be the draggable thumbnail image mentioned below.
[0010] In this way, users can drag and drop screenshot thumbnails or screen recording video thumbnails to pass the screenshot images or screen recording videos corresponding to the thumbnails to other services. The operation is simple and convenient, and realizes the rapid transmission of resource data between services.
[0011] According to the first aspect, the first service is a service that allows receiving screenshot images or screen recording videos.
[0012] The first service may receive resource data transmitted by dragging and dropping. For example, the first service may be the global collection service, note service, service registered in a designated application, etc. mentioned below.
[0013] According to the first aspect and any implementation method of the first aspect, the scheme also includes: the electronic device responds to the third operation by dragging the second thumbnail to the second area and then releasing the hand, moving the second thumbnail to the first position and not displaying the second thumbnail, and redisplaying the first thumbnail; wherein the second area is an area corresponding to a second business, and the second business is a business that does not allow receiving screenshot images or screen recording videos; or, the second area is a non-hot zone.
[0014] Exemplarily, the second area is a desktop icon area, or a desktop blank area.
[0015] In this way, when the user drags the thumbnail to a position where the resource data cannot be received and leaves the hand, the electronic device restores and displays the situation before the user drags the thumbnail. At this time, the user can also trigger the drag operation on the thumbnail again.
[0016] According to the first aspect and any one implementation method of the first aspect, the electronic device creates a second thumbnail at a first position, including: the electronic device resets the first thumbnail to the first position; the electronic device creates a DragShadowBuilder object with the first thumbnail as a parameter; wherein the second thumbnail is a DragShadow object generated by the DragShadowBuilder object; the electronic device creates a target data structure object, and the target data structure stores a uniform resource identifier of a screenshot image or a screen recording video; the electronic device uses the DragShadowBuilder object and the target data structure as calling parameters, and calls the target drag method to start the drag function for the DragShadow object.
[0017] Exemplarily, the target dragging method is the startDragAndDrop method.
[0018] According to the first aspect and any implementation manner of the first aspect, the target data structure object is a ClipData object.
[0019] According to the first aspect and any one of the implementation methods of the first aspect, the electronic device does not display the first thumbnail after dragging the second thumbnail to the first area and then releasing the hand, including: the electronic device monitors a first drag event for the second thumbnail, and the operation type of the first drag event is end of drag; the electronic device inquires that the screenshot image or the screen recording video has been transmitted and processed, and does not display the first thumbnail.
[0020] In this way, the electronic device monitors the user's dragging operation on the second thumbnail, and performs a corresponding response operation according to the type of the dragging operation. When the user's dragging operation type is the end of dragging, the electronic device operates whether the resource data corresponding to the thumbnail has been transmitted and processed. If the resource data has been transmitted and processed, the electronic device no longer displays the thumbnail, for example, destroys the thumbnail.
[0021] According to the first aspect and any one of the implementation methods of the first aspect, the electronic device drags the second thumbnail to the second area and then releases the hand to display the first thumbnail, including: the electronic device monitors a second drag event for the second thumbnail, and the operation type of the second drag event is end of drag; the electronic device detects that the screenshot image or the recorded video has not been transmitted and processed, and redisplays the first thumbnail.
[0022] When the user's drag operation type is drag end, the electronic device determines whether the resource data corresponding to the thumbnail has been transmitted and processed, and if the resource data has not been transmitted and processed, the electronic device redisplays the first thumbnail. At this time, the user can also trigger the drag operation on the thumbnail again.
[0023] According to the first aspect and any implementation of the first aspect, hiding the first thumbnail by the electronic device may include: the electronic device records the original size of the first thumbnail and resets the size of the first thumbnail to 0. Correspondingly, redisplaying the first thumbnail by the electronic device may include: the electronic device resets the size of the first thumbnail to the recorded original size. In this way, the electronic device can achieve the effect of hiding or redisplaying the thumbnail by adjusting the size of the thumbnail.
[0024] According to the first aspect and any implementation of the first aspect, the electronic device sets the first thumbnail to be fully transparent. Correspondingly, the electronic device redisplays the first thumbnail, which may include: the electronic device sets the first thumbnail to be opaque. In this way, the electronic device can achieve the effect of hiding or redisplaying the thumbnail by adjusting the transparency of the thumbnail.
[0025] According to the first aspect and any implementation of the first aspect, the electronic device sets the visibility of the first thumbnail to invisible. Correspondingly, the electronic device redisplays the first thumbnail, which may include: the electronic device sets the visibility of the first thumbnail to visible. In this way, the electronic device can achieve the effect of hiding or redisplaying the thumbnail by adjusting the visible attribute of the thumbnail.
[0026] According to the first aspect and any implementation manner of the first aspect, the method also includes: the electronic device generates a target frame at a first position in response to the second operation, and the target frame is used to indicate the starting dragging area of the second thumbnail; the electronic device drags the second thumbnail to the third area in response to the third operation, and hides the target frame; wherein, when the second thumbnail is located in the third area, there is no intersection between the second thumbnail and the target frame; the electronic device drags the second thumbnail to the fourth area in response to the third operation, and displays the target frame; wherein, when the second thumbnail is located in the fourth area, there is an intersection between the second thumbnail and the target frame.
[0027] Exemplarily, the target frame may be the frame view object mentioned below, such as Figure 4g , Figure 4h When the second thumbnail is dragged to a point where there is no intersection with the target frame, the target frame is not displayed; when the second thumbnail is dragged to a point where there is an intersection with the target frame, the target frame is displayed.
[0028] In this implementation, the target frame can be used to visually prompt the user, prompting the user to stop dragging the thumbnail in the frame area and release the thumbnail to cancel the thumbnail dragging operation.
[0029] According to the first aspect and any implementation manner of the first aspect, the method also includes: the electronic device drags the second thumbnail to the fourth area in response to the third operation and then releases the dragged image, moves the second thumbnail to the first position and does not display the second thumbnail, and redisplays the first thumbnail.
[0030] In this way, when the user drags the thumbnail to the intersection with the target image and then lets go, the electronic device restores the situation before the thumbnail is dragged. At this time, the user can also trigger the drag operation on the thumbnail again.
[0031] According to the first aspect and any one of the implementation methods of the first aspect, the electronic device drags the second thumbnail to the fourth area in response to a third operation and then releases the dragged image, and redisplays the first thumbnail, including: the electronic device monitors a third drag event on the second thumbnail, and the operation type of the third drag event is end of drag; the electronic device detects that the screenshot image or the recorded video has not been transmitted and processed, and redisplays the first thumbnail.
[0032] When the user's drag operation type is drag end, the electronic device determines whether the resource data corresponding to the thumbnail has been transmitted and processed, and if the resource data has not been transmitted and processed, the electronic device redisplays the first thumbnail. At this time, the user can also trigger the drag operation on the thumbnail again.
[0033] According to the first aspect and any implementation of the first aspect, the electronic device drags the second thumbnail to the third area in response to the third operation, hiding the target frame, including: the electronic device monitors the fourth drag event of the second thumbnail, and sets the target frame to be fully transparent; wherein the operation type of the fourth drag event is leaving the frame area. Correspondingly, the electronic device drags the second thumbnail to the fourth area and displays the target frame, including: monitors the fifth drag event of the second thumbnail, and sets the target frame to be non-fully transparent; wherein the operation type of the fifth drag event is entering the frame area.
[0034] When the user drag operation type is to leave the frame area, the electronic device sets the target frame to be fully transparent to hide the target frame; when the user drag operation type is to enter the frame area, the electronic device sets the target frame to be non-fully transparent to unhide the target frame.
[0035] According to the first aspect and any implementation manner of the first aspect, after displaying a first thumbnail corresponding to a screenshot image or a screen recording video at a first position, the method further includes: the electronic device starts a target timing for the first thumbnail; wherein the target timing is used to trigger non-display of the first thumbnail when the timing duration reaches a preset duration; the electronic device monitors a sixth drag event for the second thumbnail, and cancels the target timing for the first thumbnail; wherein the operation type of the sixth drag event is drag start.
[0036] This implementation takes into account the existing solution of automatic disappearance timing of thumbnails. When the user starts dragging, the automatic disappearance timing of the thumbnail is canceled to avoid the thumbnail being destroyed due to the end of the timing during the process of the user dragging the thumbnail.
[0037] According to the first aspect and any one implementation manner of the first aspect, after the electronic device redisplays the first thumbnail, the method further includes: the electronic device restarting the target timing for the first thumbnail.
[0038] In this implementation, if the user cancels the drag operation, or the user ends the drag operation but the resource data corresponding to the thumbnail has not been processed, so that the electronic device redisplays the corresponding thumbnail, the electronic device restarts the automatic disappearance timer for the thumbnail. Before the automatic disappearance timer ends, the user can also trigger the drag operation on the thumbnail again.
[0039] According to the first aspect and any implementation manner of the first aspect, after the electronic device creates a second thumbnail at the first position, the method further includes: the electronic device moves the second thumbnail from the first position to the second position according to the position of the second operation; wherein, when the second thumbnail is located at the second position, the position of the second operation is located in the central area of the second thumbnail.
[0040] In this way, no matter where the user presses to trigger the movement of the thumbnail, the electronic device can automatically adjust the position of the thumbnail so that the user's pressing position is located in the center area of the thumbnail, thereby improving the user's dragging experience.
[0041] In a second aspect, the present application provides an electronic device, the electronic device comprising a memory and a processor. The processor and the memory are coupled, and the memory stores program instructions. When the program instructions are executed by the processor, the electronic device executes the data transmission method of the first aspect and any one of the first aspects.
[0042] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0043] In a third aspect, the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0044] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
[0045] In a fourth aspect, the present application provides a computer program, comprising instructions for executing the data transmission method of the first aspect and any one of the first aspect.
[0046] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0047] In a fifth aspect, the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the data transmission method of the first aspect and any one of the first aspects to control the receiving pin to receive a signal and control the sending pin to send a signal.
[0048] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a schematic diagram of the hardware structure of an electronic device shown as an example;
[0050] Figure 2 A schematic diagram of the software structure of an electronic device is shown as an example;
[0051] Figure 3a to Figure 3e The following is a schematic diagram showing an exemplary application scenario of the screen recording function and the screen capture function of an electronic device;
[0052] Figure 4a to Figure 4b The figure is a schematic diagram of an exemplary data transmission scenario based on dragging of screen recording video thumbnails;
[0053] Figure 4c The figure is a schematic diagram of an exemplary data transmission scenario based on dragging of screen recording video thumbnails;
[0054] Figure 4d to Figure 4e The figure is a schematic diagram of an exemplary data transmission scenario based on dragging of screen recording video thumbnails;
[0055] Figure 4f This is a schematic diagram of a scenario in which a screen recording video thumbnail is dragged and reset as an example;
[0056] Figure 4g to Figure 4h This is a schematic diagram of dragging a screen recording video thumbnail for example;
[0057] Figure 5 The interactive flow chart of the exemplary method of data transmission based on dragging of screen recording video thumbnails is shown as follows;
[0058] Figure 6a A flowchart of the processing logic for initiating dragging of a thumbnail is shown as an example;
[0059] Figure 6b is a schematic diagram of a scenario in which the position of a draggable thumbnail image is automatically adjusted based on a user's pressing position;
[0060] Figure 6c FIG. 1 is a flowchart of processing logic for responding to a user dragging a draggable thumbnail image. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0062] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0063] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
[0064] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0065] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
[0066] Figure 1 1 shows a schematic diagram of the structure of the electronic device 100. It should be understood that Figure 1 The illustrated electronic device 100 is merely one example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have a different configuration of components. Figure 1 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0067] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[0068] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0069] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0070] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0071] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0072] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0073] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0074] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0075] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0076] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0077] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0078] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel.
[0079] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor. The camera 193 is used to capture static images or videos. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0080] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0081] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0082] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0083] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic 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 may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (universal flash storage, UFS), etc. Exemplarily, in an embodiment of the present application, the processor 110 can implement the data transmission method based on thumbnails in an embodiment of the present application by running the instructions stored in the internal memory 121.
[0084] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0085] The pressure sensor is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor can be arranged on the display screen 194. When a force acts on the pressure sensor, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity based on the pressure sensor. The electronic device 100 can also calculate the touch position based on the detection signal of the pressure sensor. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0086] A touch sensor is also called a "touch panel". The touch sensor can be arranged on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be arranged on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0087] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0088] Exemplarily, the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The present application embodiment takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
[0089] Figure 2 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0090] The layered architecture of the electronic device 100 divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.
[0091] The application layer can include a series of application packages.
[0092] like Figure 2 As shown, the application package may include a screenshot application, a screen recording application, a global favorite application, a gallery, a note application, etc. Exemplarily, the application package may also include call, calendar, map, navigation, music, video, short message, camera, WLAN, Bluetooth and other applications.
[0093] Among them, the screenshot / recording screen application can implement the thumbnail-based data transmission method in the embodiment of the present application, and the thumbnail can be a screenshot thumbnail or a screen recording video thumbnail. Exemplarily, in order to implement the thumbnail-based data transmission method in the embodiment of the present application, the screenshot / recording screen application may include a management module, a thumbnail view object, a long press listener (OnLongClickListener) object bound to the thumbnail view object, a frame view object, and a drag and drop listener (OnDragListener) object bound to the frame view object. Among them, the management module can be used to manage the life cycle of the thumbnail view object, the long press listener object, the frame view object, and the drag and drop listener object. The long press listener object is used to monitor the user's long press operation on the thumbnail view object, and the drag and drop listener object is used to monitor the user's drag operation, drag and drop operation, etc. on the draggable thumbnail image. In an optional implementation, the drag and drop listener object can also be bound to other view objects, which is not limited in this embodiment.
[0094] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0095] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0096] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, after the user takes a screenshot or ends screen recording, a thumbnail view object can be displayed in the display interface. In an embodiment of the present application, the view system can also be used to construct a draggable thumbnail image corresponding to the thumbnail view object, and to support the user's dragging operations, drag and drop operations, etc. on the draggable thumbnail image. Among them, the view system can also be used to implement the binding of the view object and the listener object, as well as to send the user's long press event of the thumbnail view object to the long press listener object, and send the user's drag event corresponding to the draggable thumbnail image to the drag and drop listener object, etc.
[0097] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0098] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0099] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0100] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0101] The notification manager allows applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, notification information is used to inform the completion of downloads, message reminders, etc. Notification information can also appear in the system top status bar in the form of icons or scroll bar text, such as notifications of applications running in the background, or in the form of dialog windows on the screen. Notification information can also be, for example, text information prompted in the status bar, a prompt sound, vibration of electronic equipment, flashing indicator lights, etc.
[0102] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0103] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0104] The application layer and the application framework layer run in a 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 functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0105] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0106] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0107] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0108] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0109] A 2D graphics engine is a drawing engine for 2D drawings.
[0110] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, Wi-Fi driver, sensor driver, etc.
[0111] Understandably, Figure 2 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, or combine some components, or split some components, or arrange the components differently.
[0112] It is understandable that, in order to implement the data transmission method in the embodiment of the present application, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.
[0113] In addition to basic communication functions, smart terminals such as mobile phones also provide many practical functions, such as screenshot function, screen recording (referred to as screen recording) function, etc. When a user performs a screenshot operation on a mobile phone, the screenshot application will generate a screenshot image thumbnail and display the screenshot image thumbnail on the mobile phone interface. Similarly, when a user performs a screen recording end operation on a mobile phone, the screen recording application will generate a screen recording video thumbnail and display the screen recording video thumbnail on the mobile phone interface. Figure 3a to Figure 3e Some application scenarios related to screenshot image thumbnails or screen recording video thumbnails are shown by way of example.
[0114] Figure 3a The schematic diagram of the scene in which the screen recording video thumbnail is generated and disappears is shown as an example. Figure 3a As shown in (1), illustratively, after the mobile phone starts screen recording, the user performs a click operation in the screen recording prompt control 301 to end the screen recording. Optionally, the user can use methods such as clicking a shortcut switch, pressing a combination of buttons, air gestures, voice control, etc. to end the screen recording, which is not limited in the embodiments of the present application. In response to the user's operation, the mobile phone ends the screen recording operation, saves the screen recording video, and generates a thumbnail 302 corresponding to the screen recording video, which is displayed on the mobile phone interface, such as Figure 3a After the screen recording video thumbnail 302 is displayed, the screen recording application starts to automatically disappear the screen recording video thumbnail 302 (the timer can be 3s, 5s, etc.). Before the automatic disappearance timer ends, if the user does not perform any operation on the screen recording video thumbnail 302, the mobile phone controls the screen recording video thumbnail 302 to automatically disappear in the mobile phone display interface, as shown in FIG. Figure 3a As shown in (3).
[0115] Figure 3b The schematic diagram of the scene in which the screenshot image thumbnail is generated and disappears is shown as an example. Figure 3b As shown in (1), illustratively, the user taps the mobile phone interface 311 with a knuckle to trigger the mobile phone to take a screenshot. Optionally, the user can also use air gestures, click a shortcut switch, press a combination of keys, etc. to trigger the screenshot operation, which is not limited in the present embodiment of the application. In response to the user's operation, the mobile phone captures an image corresponding to the current display interface, saves the screenshot image, and generates a thumbnail 312 corresponding to the screenshot image, which is displayed on the mobile phone interface, such as Figure 3b After the screenshot image thumbnail 312 is displayed, the screenshot application starts the automatic disappearance timer for the screenshot image thumbnail 312 (the timer duration can be 3s, 5s, etc.). Before the automatic disappearance timer ends, if the user does not perform any operation on the screenshot image thumbnail 312, the mobile phone controls the screenshot image thumbnail 312 to automatically disappear from the mobile phone display interface, as shown in FIG. Figure 3bAs shown in (3).
[0116] Figure 3c An exemplary scenario of operating a screenshot image thumbnail is shown. Taking the screenshot image thumbnail as an example, refer to Figure 3c As shown in (1), the user clicks on the screenshot image thumbnail 321. In response to the user operation, the mobile phone displays the screenshot image editing interface, such as Figure 3c In this editing interface, the user can edit, delete, and perform other operations on the screenshot image.
[0117] Take the screenshot image thumbnail as an example. Figure 3d Another scenario of operating a screenshot image thumbnail is shown as an example. Figure 3d As shown in (1), the user swipes up the screenshot image thumbnail 331. In response to the user operation, the mobile phone displays a prompt message "Share" 332 at the top of the screenshot image thumbnail 331. When the user continues to swipe up and releases the hand (or releases the hand), the mobile phone displays the screenshot image sharing interface, which can be referred to as Figure 3d In the sharing interface, the user can send the screenshot image 333 corresponding to the screenshot image thumbnail 331 to an application (such as TikTok, Pailitao, memo, email, etc.), and then the user can perform related operations on the screenshot image 333 through the application (such as sharing with friends, publishing to a platform, storing, printing, etc.).
[0118] Take the screenshot image thumbnail as an example. Figure 3e Another operation scenario for a screenshot image thumbnail is shown as an example. Figure 3e As shown in (1), the user slides down the screenshot image thumbnail 341. In response to the user operation, the mobile phone displays a prompt message "Scrolling screenshot" 342 at the bottom of the screenshot image thumbnail 341. When the user continues to slide down and releases the hand, if the current interface of the mobile phone supports scrolling down, the current interface of the mobile phone scrolls down and performs a scrolling screenshot operation to obtain a corresponding long screenshot image.
[0119] For the screen recording video thumbnail, the user can also edit, delete, etc. by clicking it, or share it by swiping up, etc., which will not be elaborated in the embodiments of the present application.
[0120] The embodiment of the present application provides a data transmission method based on long pressing and dragging thumbnails (screenshot image thumbnails or screen recording video thumbnails), which is simple and convenient to operate, thereby improving the user experience. Among them, the user long presses and drags the thumbnail to the target application (or target hot zone) and releases the hand. In response to the user operation, the target application can receive the image or video corresponding to the thumbnail, thereby realizing the flow of resource data between applications. It should be pointed out that the target application refers to an application that can respond to data drag and drop transfer operations, such as a global collection application, a note application, etc.
[0121] In this way, after the screen recording is completed or the screenshot is taken, when the relevant thumbnail (screen recording video thumbnail or screenshot image thumbnail) is displayed on the mobile phone interface, the user can quickly transfer the resource data corresponding to the thumbnail to other applications or services by dragging the thumbnail on this user interface.
[0122] In order to enable those skilled in the art to better understand the data transmission method in the embodiment of the present application, Figure 4a to Figure 4f Introduce the user operation method. Figure 4a to Figure 4f In the figure, the long press and drag of the thumbnail is explained by taking the screen recording video thumbnail as an example.
[0123] like Figure 4a As shown in (1), after the screen recording is completed, the screen recording video thumbnail 401 is displayed in the mobile phone interface. The user long presses the screen recording video thumbnail 401. In response to the user operation, the screen recording video thumbnail 402 floats up, and the floating screen recording video thumbnail 402 can be dragged by the user. Among them, the "floating" of the screen recording video thumbnail is the user's visual experience of the screen recording video thumbnail following the manual effect (not shown in the figure), just like the screen recording video thumbnail "floating out" in the desktop interface. The manual effect is used to prompt the user to drag the screen recording video thumbnail, that is, to prompt the screen recording video thumbnail to move with the user's finger. In order to further enhance the user experience, the manual effect can also include two parts of the dynamic effect. The first is to visually float the screen recording video thumbnail, and the second is to move the position of the screen recording video thumbnail so that the user's finger is located in the center area of the screen recording video thumbnail (please refer to the following about Figure 6b ).
[0124] The "floating" effect can be achieved in a variety of ways, for example, it can be to scale the screen recording video thumbnail 402, add a shadow to the screen recording video thumbnail 402, and adjust the border of the screen recording video thumbnail 402, or it can be a combination of the above or other methods. In order to distinguish it from the screen recording video thumbnail 401 that is originally displayed in the mobile phone interface and is not floating, in this embodiment, the screen recording video thumbnail that is floating and can be dragged by the user is called the screen recording video thumbnail 402, such as Figure 4a Compared with the screen recording video thumbnail 401, the screen recording video thumbnail 402 may have different sizes, borders, shadows, etc. (not shown in the figure). Figure 4a In (3) and (4), the user can drag the screen recording video thumbnail 402 anywhere in the mobile phone display interface.
[0125] It should be pointed out that the "floating screen recording video thumbnails" mentioned in other figures below can all refer to the relevant explanations in the previous paragraph and will not be repeated here.
[0126] In one implementation, when the target application is displayed in the form of a floating ball, it can respond to the operation of dragging and transferring data. The following example takes the case where a user drags a screen recording video thumbnail to the floating ball of a global favorite application to store the screen recording video corresponding to the screen recording video thumbnail to the global favorite application. It can be understood that the screen recording video corresponding to the screen recording video thumbnail is the screen recording video described by the screen recording video thumbnail.
[0127] Continue to refer to Figure 4b As shown in (1), when the user drags the screen recording video thumbnail 402, since the global favorite application can respond to the operation of data drag and drop, the floating ball icon of the global favorite application changes from the folded floating ball 403 (refer to Figure 4a (1)) becomes an expanded state floating ball 404. In order to provide operation prompts to the user, a prompt message "Drag here" is displayed in the expanded state floating ball 404. Figure 4b In (2), the user continues to drag the screen recording video thumbnail 402 to the floating ball of the global collection application. That is, the screen recording video thumbnail 402 is dragged to the hot zone corresponding to the floating ball of the global collection application. In response to the user's operation, the prompt message on the floating ball of the global collection application changes to "Raise your hand to collect", as shown in the expanded floating ball 405. After the user drags the screen recording video thumbnail 402 to the expanded floating ball 405, the user releases his hand (that is, the finger leaves the mobile phone display). In response to the user's hand-off operation, the screen recording video thumbnail 402 disappears in the interface (or cancels the display), and the mobile phone transmits the screen recording video corresponding to the screen recording video thumbnail 402 to the global collection application. The global collection application receives the screen recording video corresponding to the screen recording video thumbnail 402 and adds the screen recording video to the global collection application. The prompt message on the floating ball of the global collection application changes to "Collected successfully", which can be referred to Figure 4b The expanded floating ball 406 is displayed in the interface (3). At this point, the screen recording video corresponding to the screen recording video thumbnail 402 has completed data transmission. That is, the user drags the screen recording video thumbnail 402 to transfer the corresponding screen recording video to the global collection application. At this time, the floating ball of the global collection application can be restored to the folded state, which can be referred to Figure 4bIn the interface (4), a folded floating ball 407 is displayed. Since the screen recording video corresponding to the screen recording video thumbnail 402 has been collected in the global collection application, when the user clicks the application icon 408 of the global collection application to open the global collection application, the user can view the screen recording video corresponding to the screen recording video thumbnail 402 in the relevant interface of the global collection application.
[0128] Optionally, when the global collection application is not installed in the mobile phone, if the user drags the screen recording video thumbnail 402 to the hot zone range corresponding to the note application floating ball (or the hot zone range corresponding to the note application) and then releases the screen recording video, in response to the user operation, the screen recording video corresponding to the screen recording video thumbnail 402 is transferred to the note application, and the screen recording video thumbnail 402 disappears in the interface. In this way, when the user opens the note application, the user can view the screen recording video corresponding to the screen recording video thumbnail 402 in the relevant interface of the note application.
[0129] It should be pointed out that the screen recording video thumbnail 402 disappears in the interface, which can be understood as the mobile phone canceling the display of the screen recording video thumbnail 402.
[0130] In one implementation, when the target application is opened and displays its application interface (e.g., an editable interface), it can respond to the operation of dragging and dropping data. In the following, a user drags a screen recording video thumbnail to the editable interface of the note application to add the screen recording video corresponding to the screen recording video thumbnail to the note as an example.
[0131] like Figure 4c As shown in (1), after the screen recording is completed, the mobile phone interface displays a screen recording video thumbnail 411. Figure 4c As shown in (1), while the screen recording video thumbnail 411 is displayed, the mobile phone interface is the editable interface of the note application. The user can open the editable interface of the note application before the screen recording ends, or after the screen recording ends and before the screen recording video thumbnail 411 disappears. This embodiment does not limit this. Figure 4c As shown in (1), the user long presses the screen recording video thumbnail 411. In response to the user operation, the screen recording video thumbnail 412 floats up, and the floating screen recording video thumbnail 412 can be dragged by the user. In order to distinguish it from the non-floating screen recording video thumbnail 411 originally displayed in the mobile phone interface, in this embodiment, the screen recording video thumbnail that floats up and can be dragged by the user is called the screen recording video thumbnail 412, as shown in FIG. Figure 4c As shown in (2). Continue to refer to Figure 4cIn (2) and (3), the user can drag the screen recording video thumbnail 412 anywhere in the mobile phone display interface 413 (i.e., the editable interface of the note application). For example, the user can drag the screen recording video thumbnail 412 to the editable area of the editable interface of the note application and then release the screen recording video. In response to the user operation, the screen recording video thumbnail 412 disappears in the interface (or is canceled), and the mobile phone transmits the screen recording video corresponding to the screen recording video thumbnail 412 to the note application. The note application receives the screen recording video 414 corresponding to the screen recording video thumbnail 412, and adds the screen recording video 414 to the editable interface 415 of the note application, as shown in FIG. Figure 4c As shown in (4). At this point, the screen recording video corresponding to the screen recording video thumbnail 412 has completed data transfer. That is, the user drags the screen recording video thumbnail 412 to transfer the corresponding screen recording video to the note application. Figure 4c In (4), if the user clicks the switch control 416 of the screen recording video 414, then in response to the user operation, the note application can call a related video player to play the screen recording video 414.
[0132] In one implementation, the target application resides on the desktop and is triggered to start through related operations (such as drag operations). It assumes the function of a data transfer transfer station, and the target application can also respond to data drag and drop operations. The following example takes the case where a user drags a screen recording video thumbnail to a designated application, and the screen recording video corresponding to the screen recording video thumbnail is transferred to a video sharing application through the designated application. Among them, the designated application can be understood as a data transfer transfer station, which can pass the received data to the application or application service that has been registered in the designated application. It can be understood that the application or application service displayed in the designated application interface is the application or application service that has been registered in the designated application.
[0133] like Figure 4d As shown in (1), after the screen recording is completed, the screen recording video thumbnail 421 is displayed in the mobile phone interface. The user long presses the screen recording video thumbnail 421. In response to the user operation, the screen recording video thumbnail 422 floats up, and the floating screen recording video thumbnail 422 can be dragged by the user. In order to distinguish it from the non-floating screen recording video thumbnail 421 originally displayed in the mobile phone interface, in this embodiment, the screen recording video thumbnail that floats up and can be dragged by the user is called the screen recording video thumbnail 422, as shown in FIG. Figure 4dAs shown in (2). The user can drag the screen recording video thumbnail 422 anywhere in the mobile phone display interface. For example, the user drags resource data (such as image data, video data, file data, text data, etc.) to a hot zone at a preset position on the mobile phone desktop (for example, a hot zone set in the right edge area of the desktop, or a hot zone set in the left edge area of the desktop), which can trigger the opening of a specified application. For example, Figure 4d As shown in (3), the user drags the screen recording video thumbnail 422 to the hot zone on the right edge of the mobile phone desktop. In response to the user operation, the specified application is opened, and the mobile phone displays the interface of the specified application. Figure 4d The interface shown in (4) in the figure. At this time, the user can drag the recorded video thumbnail 422 to any business icon displayed in the specified application interface. Among them, the business icon can be the same as the application icon of the application to which the business belongs, or it can be different from the application icon of the application to which the business belongs, and this embodiment does not limit this. If a video sharing application registers its multiple services in a specified application, the business icons corresponding to each business can be displayed separately in the interface of the specified application. For example, if the "Share with Friends" service and the "Publish to XX Platform" service of a video sharing application are both registered in the specified application, the business icon 1 corresponding to the "Share with Friends" service and the business icon 2 corresponding to the "Publish to XX Platform" service are displayed in the interface of the specified application. Among them, the icon images of business icon 1 and business icon 2 can be the same or different, and this embodiment does not limit this.
[0134] Continue to refer to Figure 4e As shown in (1), the user drags the screen recording video thumbnail 422 to the specified application interface. For a better visual experience, the size of the screen recording video thumbnail 422 can be reduced so that the screen recording video thumbnail can be fully displayed in the interface of the specified application, as shown in the screen recording video thumbnail 423. Figure 4eAs shown in (2), the user drags the screen recording video thumbnail 423 to the service icon corresponding to the "Share with Friends" service of a certain video sharing application. That is, the screen recording video thumbnail 423 is dragged by the user to the hot zone range of the "Share with Friends" service icon. Exemplarily, in response to the user operation, the "Share with Friends" service icon becomes larger to prompt the user that the application service for receiving video data has been selected. After the user drags the screen recording video thumbnail 423 to the "Share with Friends" service icon in the specified application interface, the user releases the screen recording video. In response to the user's release operation, the screen recording video thumbnail 423 disappears in the interface (or cancels the display), and the mobile phone sends the screen recording video corresponding to the screen recording video thumbnail 423 to the specified application. The specified application receives the screen recording video corresponding to the screen recording video thumbnail 423 and passes the screen recording video to the "Share with Friends" service in a certain video sharing application. At this point, the screen recording video corresponding to the screen recording video thumbnail 423 completes data transmission. That is, the user drags the screen recording video thumbnail 423 to transfer the corresponding screen recording video to the "Share with Friends" service in a certain video sharing application. For example, after the user lets go of the screen recording video thumbnail 423, the mobile phone interface can jump to the "Share with Friends" service interface in the video sharing application. Figure 4e As shown in (3). Continue to refer to Figure 4e In (3), in the "Share with Friends" service interface in the video sharing application, a screen recording video corresponding to the screen recording video thumbnail 423 is displayed. The user can play the screen recording video in this interface, or share the screen recording video with one or more selected friends.
[0135] For example, when the user drags the screen recording video thumbnail 423 to other business icons (such as the global favorite application icon) in the specified application and releases the hand, the screen recording video thumbnail 423 disappears in the interface (or cancels the display), and the mobile phone can also pop up prompts such as "Favorite Success" or "Transfer Success" to prompt the user that the video data transmission has been completed and exit the interface of the specified application. That is, when the user completes the screen recording video thumbnail dragging operation and releases the hand, the change in the mobile phone interface is related to the recipient of the screen recording video data, which is not limited in this embodiment.
[0136] To summarize, when a user drags a screen recording video thumbnail or a screenshot image thumbnail, if there is a target application that can respond to the data drag and drop operation, the user can release the hand at the relevant interface of the target application, and the screen recording video thumbnail or the screenshot image thumbnail will disappear in the interface, thereby realizing the transfer of the video data or image data corresponding to the thumbnail to the target application.
[0137] It should be noted that when the screen recording video thumbnail or the screenshot image thumbnail is being dragged, no thumbnail is displayed at the position where the screen recording video thumbnail or the screenshot image thumbnail was originally displayed in the mobile phone display interface. Figure 4d-4e Taking the scenario shown in the figure as an example, when the screen recording video thumbnail 422 is dragged, as shown in FIG. Figure 4d As shown in (3), no thumbnail is displayed in the position area 423 where the screen recording video thumbnail 421 (or the screen recording video thumbnail 422) is initially displayed. Figure 4a-4b The screen recording video thumbnail dragging scene shown, and Figure 4c The same is true for the screen recording video thumbnail dragging scenario shown, which will not be repeated here.
[0138] It should be pointed out that when the user starts to drag the screen recording video thumbnail or the screenshot image thumbnail, the screen recording application cancels the automatic disappearance timer for the dragged screen recording video thumbnail, or the screenshot application cancels the automatic disappearance timer for the screenshot image thumbnail to avoid the screen recording video thumbnail or the screenshot image thumbnail being destroyed during the dragging process.
[0139] It should also be pointed out that when the user drags a recorded video thumbnail or a screenshot image thumbnail, if the target application can respond to the data drag and drop operation, but the data drag and drop operation cannot be normally affected due to issues such as permissions, then when the user lets go of the relevant interface of the target application, in response to the user's hand-off operation, the mobile phone can pop up a relevant prompt box to guide the user to solve the permission problem, and continue to perform the operation of transferring the resource data corresponding to the thumbnail after the permission problem is solved. If the permission problem is not solved or the user refuses to solve it, it indicates that the resource data corresponding to the thumbnail cannot be successfully transferred. At this time, the mobile phone will reset the display of the corresponding thumbnail. Among them, the relevant explanations about the reset display of the thumbnail can be referred to below.
[0140] When the user drags the screen recording video thumbnail or the screenshot image thumbnail, if the target application cannot respond to the data drag and transfer operation, when the user releases the hand at the relevant interface of the target application, in response to the user's hand release operation, the screen recording video thumbnail is reset and displayed. When the target application can respond to the data drag and transfer operation, if the user releases the hand at a non-hot area of the target application, the screen recording video thumbnail will also be reset and displayed in response to the user's hand release operation. In other words, if the user drags the screen recording video thumbnail to any non-hot area and releases the hand, the screen recording video thumbnail is reset and displayed in response to the user's hand release operation.
[0141] Figure 4f The schematic diagram of the scene of dragging and resetting the display of the screen recording video thumbnail is shown as an example. Figure 4fAs shown in (1), after the screen recording is completed, a screen recording video thumbnail 431 is displayed in the lower left corner of the mobile phone interface. The user long presses the screen recording video thumbnail 431. In response to the user operation, the screen recording video thumbnail floats up, and the floating screen recording video thumbnail can be dragged by the user. In order to distinguish it from the non-floating screen recording video thumbnail 431 originally displayed in the mobile phone interface, in this embodiment, the screen recording video thumbnail that floats up and can be dragged by the user is called the screen recording video thumbnail 432, as shown in FIG. Figure 4f As shown in (2). Continue to refer to Figure 4f In (3), the user drags the screen recording video thumbnail 432 onto the music application icon and releases the screen recording application. Since the music application cannot respond to the data drag and drop operation, the screen recording application responds to the user's release operation and restores the screen recording video thumbnail. When restoring the screen recording video thumbnail, the screen recording video thumbnail 432 that floats and supports dragging is moved back to the initial position and disappears, and the screen recording video thumbnail 431 that does not float and cannot be directly dragged is redisplayed. For details, refer to Figure 4f As shown in (4). It is understandable that Figure 4f The screen recording video thumbnail shown in (4) is the same as Figure 4f The screen recording video thumbnails shown in (1) are the same.
[0142] It should be noted that after the screen recording video thumbnail or the screenshot image thumbnail is reset and displayed, the screen recording application will restart the automatic disappearance timer for the screen recording video thumbnail, or the screenshot application will restart the automatic disappearance timer for the screenshot image thumbnail.
[0143] As an optional implementation, after the user starts dragging the screen recording video thumbnail or the screenshot image thumbnail, the mobile phone displays a frame (or wireframe, etc.) at the original display position of the thumbnail. The frame can be used to indicate the starting dragging area of the thumbnail image, and can visually prompt the user to stop dragging the thumbnail in the frame area and release the hand to cancel the thumbnail dragging operation. Among them, the shape of the frame can be the same as the shape of the thumbnail, or it can be different from the shape of the thumbnail, which is not limited in this embodiment. The size of the frame can be the same as the size of the thumbnail, or it can be different from the size of the thumbnail (for example, the size of the frame is smaller than the size of the thumbnail), which is not limited in this embodiment.
[0144] If the user drags the screen recording video thumbnail (or screenshot image thumbnail) into the frame area and releases the hand to cancel the thumbnail dragging operation, the screen recording application (or screenshot application) will respond to the user operation and reset the display of the screen recording video thumbnail (or screenshot image thumbnail). After the screen recording video thumbnail (or screenshot image thumbnail) is reset, the screen recording application (or screenshot application) restarts the automatic disappearance timer for the screen recording video thumbnail (or screenshot image thumbnail). Before the automatic disappearance timer ends (that is, before the thumbnail disappears), the user can also trigger the draggable function of the thumbnail again by long pressing.
[0145] like Figure 4g As shown in (1), after the screen recording is completed, a screen recording video thumbnail 441 is displayed in the lower left corner of the mobile phone interface. The user long presses the screen recording video thumbnail 441. In response to the user operation, the screen recording video thumbnail floats up, and the floating screen recording video thumbnail can be dragged by the user. In order to distinguish it from the non-floating screen recording video thumbnail 441 originally displayed in the mobile phone interface, in this embodiment, the screen recording video thumbnail that floats up and can be dragged by the user is called screen recording video thumbnail 442, as shown in FIG. Figure 4g As shown in (2). Continue to refer to Figure 4g In (3), the user starts to drag the screen recording video thumbnail 442. In response to the user's dragging operation, the mobile phone displays a frame 443 at the original position of the screen recording video thumbnail 442. Among them, the shape of the frame 443 can be the same as the shape of the screen recording video thumbnail 442, both of which are rectangular. The shape of the frame 443 can also be the same as the shape of the screen recording video thumbnail 442. For example, the shape of the frame 443 is a square, a circle, etc., which is not limited in this embodiment. The size of the frame 443 can be the same as the size of the screen recording video thumbnail 442, or it can be different from the size of the screen recording video thumbnail 442 (for example, the size of the frame 443 is slightly smaller than the size of the screen recording video thumbnail 442). This is not limited in this embodiment. Among them, the frame 443 can be used to prompt the user to stop dragging the thumbnail in the frame area and let go to cancel the thumbnail dragging operation. Continue to refer to Figure 4g In (4), the user continues to drag the screen recording video thumbnail 442 away from the original position. If the screen recording video thumbnail 442 and the picture frame 443 no longer have an intersection, the mobile phone cancels the display of the picture frame 443. Figure 4h, the user drags the screen recording video thumbnail 442 in the direction of the original position of the screen recording video thumbnail 442. If the screen recording video thumbnail 442 and the picture frame 443 intersect, the mobile phone will redisplay the picture frame 443, thereby prompting the user to stop dragging the screen recording video thumbnail 442 in the picture frame 443 area and release the hand to cancel the thumbnail dragging operation. If the user stops dragging the screen recording video thumbnail 442 in the picture frame 443 area and releases the hand, then in response to the user's operation, the mobile phone will reset the display of the screen recording video thumbnail 442, which can be referred to Figure 4g As shown in (1).
[0146] In order to enable electronic devices to realize the above-mentioned data transmission function based on long pressing and dragging of thumbnails, Figure 5 The schematic diagram of the module interaction process of the electronic device is shown as an example. Figure 5 As shown, the data transmission method provided in the embodiment of the present application may include the following steps:
[0147] S501, in response to the user's screenshot operation or the operation of ending screen recording, the management module in the screenshot application (or screen recording application) generates a thumbnail view object corresponding to the screenshot image (or screen recording video), and starts an automatic disappearance timer for the thumbnail view object.
[0148] For example, the screenshot operation may be a double-click on the screen, a click on a shortcut switch, or a combination of buttons. In response to the user's screenshot operation, the screenshot application stores the screenshot image in the gallery application and generates a thumbnail view object corresponding to the screenshot image. The thumbnail view object is displayed on the current display interface of the electronic device, for example, at the lower left corner of the current display interface of the electronic device. Figure 3b As shown in (2).
[0149] Exemplarily, the operation of ending screen recording may be an operation of clicking a screen recording prompt control (such as Figure 3a As shown in (1), it can also be an operation of clicking a shortcut switch, pressing a combination button, etc. In response to the user's operation of ending screen recording, the screen recording application stores the screen recording video in the gallery application and generates a thumbnail view object corresponding to the screen recording video. The thumbnail view object is displayed on the current display interface of the electronic device, for example, at the lower left corner of the current display interface of the electronic device, which can be referred to as Figure 3a As shown in (2).
[0150] In the following process, the thumbnail view object can refer to a screenshot image thumbnail view object or a screen recording video thumbnail view object. After any type of thumbnail view object is displayed on the current display interface of the electronic device, the management module of the corresponding application starts an automatic disappearance timer for the thumbnail view object. Before the automatic disappearance timer ends, if the user does not perform any operation on the thumbnail view object, the management module destroys the thumbnail view object, and the thumbnail view object automatically disappears from the electronic device display interface. For details, refer to Figure 3a Medium (3) or Figure 3b As shown in (3).
[0151] S502: The management module constructs a long press listener object and binds the long press listener object to the thumbnail view object.
[0152] After generating the thumbnail view object, the management module constructs a long click listener (On LongClickListener) object for the thumbnail view object, and can bind the OnLongClickListener object to the thumbnail view object through the setOnLongClickListener(@NullableOnLongClickListe ner l) method.
[0153] S503, in response to the user's long press operation on the thumbnail view object, the view system sends a long press event to the long press listener object and calls the long press drag method in the long press listener object.
[0154] When the user long presses the thumbnail view object (for example, you can refer to Figure 4a In response to the user's operation, the view system sends a long click event to the OnLongClickListener object bound to the thumbnail view object, and calls the onLongClick(View v) method in the OnLongClickListener object to execute the thumbnail's start-drag logic.
[0155] In the embodiment of the present application, the processing logic of thumbnail dragging is defined in the onLongClick(View v) method in the OnLongClickListener object. Figure 6a As shown, the processing logic of thumbnail dragging is as follows: resetting thumbnail view object, creating draggable thumbnail image, thumbnail dragging, hiding thumbnail view object. The detailed explanation of these processing logics can refer to the following related steps S504-S509, which will not be repeated here.
[0156] S504: Long press the listener object to reset the thumbnail view object.
[0157] Considering that the user may move the thumbnail view object during a long press, such as sliding up or down (see Figure 3d , Figure 3e Therefore, in order to be compatible with the swipe-up sharing scenario for thumbnails and the swipe-down long image scenario, this embodiment needs to first reset the thumbnail view object before starting to drag the thumbnail, so that the position of the subsequently created draggable thumbnail image will not be offset.
[0158] Among them, long pressing the listener object to reset the thumbnail view object is to restore the thumbnail view object to the initial position. It can be understood that the initial position is the position where the thumbnail view object is initially displayed after the screen recording application or the screenshot application generates the thumbnail view object.
[0159] Exemplarily, the long press listener object can call the updateView Layout method provided by the window manager (WindowManager) to reset the layout of the thumbnail view object to restore the thumbnail view object to its initial position.
[0160] As an optional implementation, S504 can also be adjusted to: long press the listener object to send an instruction message for instructing to reset the thumbnail view object to the management module, and the management module resets the thumbnail view object according to the instruction message. The management module can call the updateViewLayout method provided by the window manager (WindowManager) to reset the layout of the thumbnail view object to restore the thumbnail view object to its initial position.
[0161] S505 , the long press listener object creates a DragShadowBuilder object with the thumbnail image as a parameter.
[0162] Since the thumbnail view object is not an image that supports the standard drag function of the Android system, in order to implement the thumbnail drag scenario described above, it is necessary to create a thumbnail image that supports the standard drag function of the Android system (referred to as a draggable thumbnail image). In order not to affect the user's visual experience, the draggable thumbnail image needs to use the image screen corresponding to the thumbnail view object as a parameter, so that there is no difference in the user's visual effect between the draggable thumbnail image and the thumbnail view object.
[0163] In this embodiment, the long press listener object creates a DragShadowBuilder object defined by the view system to generate a draggable thumbnail image through the view system, and the creation parameter of the DragShadowBuilder object is the thumbnail image. The DragShadowBuilder object can be used to generate a DragShadow object, and the type of the DragShadow object is a standard draggable image in the Android system, which can move with the user's finger.
[0164] In this embodiment, the DragShadow object generated by the DragShadowBuilder object is a draggable thumbnail image corresponding to the thumbnail view object. The DragShadow object can be understood as a projection of the thumbnail view object. The image screen of the DragShadow object and the thumbnail view object are the same, and the visual effects of the two are the same.
[0165] It should be noted that the initial display position of the draggable thumbnail image can be the position where the thumbnail view object is reset to, that is, the initial layout position of the DragShadow object and the thumbnail view object are consistent. Therefore, the user's visual experience is to drag the original thumbnail (that is, the thumbnail view object).
[0166] S506 , long press the listener object to create a data structure object that supports dragging and dropping, and fill in the URI (Uniform Resource Identifier) of the resource corresponding to the thumbnail view object.
[0167] Among them, the data structure object is used to store the data to be transmitted. In the embodiment of the present application, the data structure object is used to store the URI of the resource corresponding to the thumbnail view object. When the thumbnail view object is a screenshot image thumbnail view object, the resource corresponding to the thumbnail view object is the screenshot image; when the thumbnail view object is a screen recording video thumbnail view object, the resource corresponding to the thumbnail view object is the screen recording video.
[0168] Exemplarily, the data structure object may be a ClipData object.
[0169] S507 , long-press the listener object to call the startDragAndDrop method to start dragging the draggable thumbnail image.
[0170] In an embodiment of the present application, a dragging method that carries data is used for dragging a draggable thumbnail image. The data carried by the draggable image can be transmitted across processes. In an embodiment of the present application, it specifically refers to that the resources (i.e., screenshot image data or screen recording video data) carried by the draggable thumbnail image can be transmitted across processes.
[0171] Exemplarily, by long pressing the listener object, the startDragAndDrop method provided by the view system can be called to start dragging the draggable thumbnail image, wherein the calling parameters of the startDragAndDrop method are the DragShadowBuilder object and the ClipData object.
[0172] At this point, the screenshot / screen recording application has completed the preparation work corresponding to the thumbnail image dragging function, and the subsequent implementation of the thumbnail image dragging function is completed by the view system.
[0173] S508: The view system executes the startDragAndDrop method to start the drag function for the draggable thumbnail image, and returns the call result to the long press listener object.
[0174] When the long press listener object is called, the view system executes the startDragAndDrop method to start the dragging function that supports carrying data for the draggable thumbnail image. In the process of executing the startDragAndDrop method, the view system uses the DragShadowBuilder object to generate a DragShadow object, that is, to generate a draggable thumbnail image. After the view system executes the startDragAndDrop method, the user can drag the draggable thumbnail image and transfer resource data by dragging. For example, you can refer to Figure 4a-4b shown.
[0175] Exemplarily, the calling result may be used to indicate whether the startDragAndDrop method is executed successfully, or whether the startDragAndDrop method is called successfully.
[0176] After the view system executes the startDragAndDrop method, the draggable thumbnail image following hand effect is displayed, that is, the thumbnail image floats up as described above. Figure 4a , Figure 4b The screen recording video thumbnail 402 shown in is the draggable thumbnail image mentioned in this process, and the screen recording video thumbnail 401 is the thumbnail view object mentioned in this process. Figure 4cThe screen recording video thumbnail 412 shown in is the draggable thumbnail image mentioned in this process, and the screen recording video thumbnail 411 is the thumbnail view object mentioned in this process. The same is true for other figures, which will not be repeated here.
[0177] S509, long press the listener object to hide the thumbnail view object.
[0178] In the application embodiment, when the user drags the thumbnail image, the thumbnail image is no longer displayed at the initial position where the thumbnail image is displayed. Therefore, after creating the draggable thumbnail image, the thumbnail view object can be hidden by long pressing the listener object, and the thumbnail view object is no longer displayed during the process of the draggable thumbnail image being dragged by the user.
[0179] Optionally, the long press listener object can hide the thumbnail view object by setting the transparency. For example, the long press listener object can set the transparency of the thumbnail view object to 0 through the function setAlpha(0), that is, the thumbnail view object is set to a fully transparent state.
[0180] Optionally, the long press listener object can hide the thumbnail view object by setting visibility. For example, the long press listener object can set the visibility of the thumbnail view object to invisible through the function setVisibility(View.GONE).
[0181] Optionally, the long press listener object can hide the thumbnail view object by adjusting the size of the thumbnail view object. For example, the long press listener object can call the updateViewLayout method provided by the window manager (WindowManager) to set the length and width of the thumbnail view object to 0 to make the thumbnail view object invisible. Before the long press listener object adjusts the size of the thumbnail view object, the original size of the thumbnail view object needs to be recorded so that the size of the thumbnail view object can be restored later.
[0182] As an optional implementation, S509 can also be adjusted to: long press the listener object to send instruction information for instructing to hide the thumbnail view object to the management module, and the management module hides the thumbnail view object according to the instruction information. The management module can hide the thumbnail view object by setting transparency, by setting visibility, or by adjusting the size of the thumbnail view object.
[0183] This embodiment does not limit the timing sequence of S508 and S509.
[0184] It should be noted that since the draggable thumbnail image is the DragShadow object corresponding to the thumbnail view object, the initial display position of the draggable thumbnail image is the same as the initial position of the thumbnail view object after it is reset. After the thumbnail view object is hidden, if the draggable thumbnail image is moved or dragged by the user, no thumbnail image will be displayed at the initial display position.
[0185] As an optional implementation, after the view system generates and displays the draggable thumbnail image, the view system may adjust the display position of the draggable thumbnail image according to the user's pressed position so that the user's pressed position may be located in the center area of the draggable thumbnail image. For example, the display position of the draggable thumbnail image may be adjusted so that the user's pressed position is the center point of the draggable thumbnail image.
[0186] like Figure 6b As shown in (1), after the screen recording is completed, the screen recording video thumbnail 601 (i.e., the thumbnail view object) is displayed in the mobile phone interface. The user long presses the screen recording video thumbnail 601. In response to the user operation, the view system generates a draggable screen recording video thumbnail 602 at the same position as the screen recording video thumbnail 601, and the screen recording video thumbnail 602 floats up to prompt the user to drag the screen recording video thumbnail 602. Figure 6b As shown in (2), since the user's pressed position is not located in the center area of the screen recording video thumbnail 602, the user's visual experience of dragging the screen recording video thumbnail 602 is not good. At this time, the viewing system can automatically adjust the display position of the screen recording video thumbnail 602 according to the user's pressed position, so that the user's pressed position can be located in the center area of the screen recording video thumbnail 602, such as Figure 6b As shown in (3). Figure 6b Middle (2) to Figure 6b The position adjustment process of the screen recording video thumbnail 602 shown in (3) can be displayed in the form of a position movement animation to avoid the position of the screen recording video thumbnail 602 moving instantly and affecting the user's visual experience. Figure 6b As shown in (3), since the screen recording video thumbnail 601 has been hidden, no thumbnail image is displayed at the initial display position of the screen recording video thumbnail 602. At the same time, since the screen recording video thumbnail 602 and the frame 603 have an intersection, the frame 603 is shown in an opaque form.
[0187] contrast Figure 6b Zhong (2) and Figure 6bAs can be seen in (3), compared with the user dragging the screen recording video thumbnail 602 at the edge, the user dragging the screen recording video thumbnail 602 at the center area provides a better operating experience.
[0188] S510: Long press the listener object to send thumbnail dragging permission indication information to the management module.
[0189] The thumbnail dragging permission indication information may be used to indicate that the dragging function of the draggable thumbnail image has been started, and the user may perform a dragging operation on the draggable thumbnail image.
[0190] S511, the management module generates a frame view object.
[0191] After the dragging function of the draggable thumbnail image is started, the management module creates a frame view object corresponding to the thumbnail image at the initial position of the thumbnail view object. Figure 4g As shown in frame 443 of (3).
[0192] The shape of the frame view object can be the same as the thumbnail shape, or different from the thumbnail shape, which is not limited in this embodiment. The size of the frame view object can be the same as the thumbnail size, or different from the thumbnail size (for example, the size of the frame is smaller than the thumbnail size), which is not limited in this embodiment.
[0193] In this embodiment, the frame view object can be used to visually prompt the user, prompting the user to stop dragging the thumbnail in the frame area and release the thumbnail to cancel the thumbnail dragging operation.
[0194] Optionally, the management module may also pre-generate a frame view object when generating a thumbnail view object. This embodiment does not limit the timing of generating the frame view object.
[0195] As an optional implementation, the size of the frame view object is always the same as that of the thumbnail view object. When the management module hides the thumbnail view object by adjusting the size of the thumbnail view object, the management module also adjusts the size of the frame view object accordingly to hide the frame view object.
[0196] So, if Figure 4d , Figure 4e The startup hot zone of the specified application shown is set in the left edge area of the desktop, so hiding the frame view object will not affect the startup of the specified application.
[0197] S512, the management module constructs a drag-and-drop listener object, and binds the drag-and-drop listener object to the frame view object.
[0198] The drag and drop listener (OnDragListener) object, which may also be called a drag (or drag) listener object, is used to monitor the user's dragging action (or drag action) on the draggable thumbnail image.
[0199] In this embodiment, the management module constructs an OnDragListener object, and can bind the OnDragListener object to the frame view object through the setOnDragListener(OnDragListener l) method. In this way, the frame view object can not only play the role of visual prompts, but also perceive drag events at the technical level.
[0200] Optionally, the OnDragListener object constructed by the management module may also be bound to other view objects, which is not limited in this embodiment.
[0201] S513, in response to the user's dragging operation on the draggable thumbnail image, the view system distributes the drag event to the drag and drop listener object and calls the action response method in the drag and drop listener object.
[0202] When the user drags the draggable thumbnail image (e.g., Figure 4a (3), (4), Figure 4b In (1) and (2)), in response to user operations, the view system distributes drag events to the OnDragListener object and calls the action response (onDrag(View, DragEvent)) method in the OnDragListener object to respond to the user's drag / drop operation.
[0203] In the embodiment of the present application, the processing logic for responding to the user dragging the draggable thumbnail image is defined in the (onDrag(View, DragEvent)) method in the OnDragListener object. Figure 6c As shown, the processing logic for responding to the user dragging / dropping the draggable thumbnail image is: obtain the operation type of the user operation, and respond to the user operation according to the operation type. Among them, when the operation type indicates that the drag action starts, cancel the automatic disappearance timer for the thumbnail view object; when the operation type indicates that the user releases the hand and the drag action ends, continue to determine whether the resource data carried by the draggable thumbnail image has been processed. If the resource data has been processed, destroy the thumbnail view object, otherwise cancel the hiding of the thumbnail view object and restart the automatic disappearance timer of the thumbnail view object.
[0204] When the management module does not adjust the size of the frame view object, when the operation type indicates that the draggable thumbnail image has an intersection with the frame view object, that is, when the thumbnail image is dragged into the area corresponding to the frame view object, the frame view object is set to opaque; when the operation type indicates that the draggable thumbnail image leaves the area corresponding to the frame view object and has no intersection with the frame view object, the frame view object is set to transparent.
[0205] For a detailed explanation of these processing logics, please refer to the following related steps S515-S523, which will not be repeated here.
[0206] The embodiment of the present application does not limit the timing sequence of S513 and S514 - S520 .
[0207] S514, in response to the user's dragging operation on the draggable thumbnail image, the view system implements a drag / drop function that carries resource data for the draggable thumbnail image.
[0208] Among them, when the user drags the draggable thumbnail image, the view system can implement the dragging function of carrying resource data for the draggable thumbnail image, that is, realize the technical effect that the image can be dragged and the data can be transferred.
[0209] When the user drags the draggable thumbnail image without releasing it, the view system implements the effect that the draggable thumbnail image follows the movement of the user's finger based on the Android system drag and drop framework. When the user releases the hand to end the dragging operation, the view system determines whether the resource data carried by the draggable thumbnail image can be processed, that is, whether it can be passed to the target application based on the Android system drag and drop framework. If the target application at the point where the user releases the hand can respond to the drag data transmission, the view system passes the resource data carried by the draggable thumbnail image to the target application based on the Android system drag and drop framework. At this time, the resource data carried by the draggable thumbnail image is processed, otherwise the resource data carried by the draggable thumbnail image is not processed.
[0210] Among them, the Android system drag and drop framework is a native technology of the Android system. An application can implement a drag and drop function that carries resource data by calling and accessing the Android system drag and drop framework.
[0211] After passing the resource data carried by the draggable thumbnail image to the target application, the view system can destroy the draggable thumbnail image. When the user releases the drag operation to end, if the resource data carried by the draggable thumbnail image has not been processed, the view system can destroy it after resetting the draggable thumbnail image (i.e., restoring the draggable thumbnail image to its initial position). Optionally, when the user releases the drag operation to end, if the resource data carried by the draggable thumbnail image has not been processed, the view system can also directly destroy the draggable thumbnail image.
[0212] It is understandable that after the user releases the thumbnail, the drag operation ends, and the view system can destroy the DragShadowBuilder object and ClipData object. When the user long presses the thumbnail view object again, the long press listener object can recreate the DragShadowBuilder object and ClipData object based on the thumbnail view object as the calling parameters of the startDragAndDrop method provided by the view system.
[0213] S515: The drag-and-drop listener object obtains that the operation type of the drag event is drag start, and executes S516.
[0214] When the drag and drop listener object executes the action response method, it first obtains the operation type of the drag event, that is, obtains the user's operation type, and performs the corresponding operation based on the obtained operation type and the preset logic.
[0215] Exemplarily, when the operation type is defined by the view system, the drag and drop listener object can use the dragEvent.getAction() method to obtain the operation type of the user operation.
[0216] For example, the operation type "DragEvent.ACTION_DRAG_STARTED" indicates that the drag action has started. When the drag and drop listener object receives a drag event with the operation type "DragEvent.ACTION_DRAG_STARTED", it is determined that the user's dragging of the draggable thumbnail image has started.
[0217] S516, the drag and drop listener object cancels the automatic disappearance timing of the thumbnail view object.
[0218] In order to prevent the thumbnail view object from automatically disappearing when the user drags the draggable thumbnail image, when the user starts to drag the draggable thumbnail image, the automatic disappearance timing of the thumbnail view object is first canceled.
[0219] Among them, the drag and drop listener object can directly cancel the automatic disappearance timer for the thumbnail view object, or send an indication message to the management module to instruct the management module to cancel the automatic disappearance timer for the thumbnail view object. The management module cancels the automatic disappearance timer for the thumbnail view object according to the indication message. This embodiment does not limit this.
[0220] S517 , the drag-and-drop listener object obtains that the operation type of the drag event is entering the frame or leaving the frame, and executes S518 .
[0221] S518, drag and drop the listener object to adjust the transparency of the frame view object.
[0222] Among them, the operation type of the drag event obtained by the drag and drop listener object is entering the frame, that is, the dragged thumbnail image and the area corresponding to the frame view object have an intersection, and the drag and drop listener object sets the frame view object to non-transparent (such as opaque or semi-transparent, etc.). The operation type of the drag event obtained by the drag and drop listener object is leaving the frame, that is, the dragged thumbnail image and the area corresponding to the frame view object do not intersect, and the drag and drop listener object sets the frame view object to be fully transparent.
[0223] For example, the operation type "DragEvent.ACTION_DRAG_ENTERED" indicates that the thumbnail image can be dragged into the area corresponding to the frame view object and has an intersection with the frame view object. The operation type "DragEvent.ACTION_DRAG_EXITED" indicates that the thumbnail image can be dragged to leave the frame view object and has no intersection with the frame view object.
[0224] When the drag and drop listener object receives a drag event with the operation type "DragEvent.ACTION_DRAG_ENTERED", the drag and drop listener object sets the frame view object to non-transparent (such as opaque or semi-transparent) to display the frame view object. Figure 4g As shown in (3). For example, the drag and drop listener object can set the frame view object to be opaque through the function setAlpha(1), so that the frame view object is displayed to achieve the purpose of prompting the user.
[0225] When the drag and drop listener object receives a drag event with the operation type "DragEvent.ACTION_DRAG_EXITED", the drag and drop listener object sets the frame view object to be fully transparent. Figure 4hAs shown in (4) in the figure, for example, the drag and drop listener object can set the frame view object to be fully transparent through the function setAlpha(0), thereby achieving the effect of hiding the frame view object.
[0226] As an optional implementation, S518 can also be adjusted as follows: the drag and drop listener object sends an indication message to the management module for indicating the adjustment of the transparency of the frame view object, and the management module adjusts the transparency of the frame view object according to the indication message. Wherein, when the drag and drop listener object receives a drag event with an operation type of "DragEvent.ACTION_DRAG_ENTER ED", the drag and drop listener object sends an indication message to the management module for indicating that the transparency of the frame view object is set to non-transparent, and the management module sets the frame view object to non-transparent according to the indication message. When the drag and drop listener object receives a drag event with an operation type of "DragEvent.ACTION_DRAG_EXITED", the drag and drop listener object sends an indication message to the management module for indicating that the transparency of the frame view object is set to fully transparent, and the management module sets the frame view object to fully transparent according to the indication message.
[0227] It should be noted that if the size of the frame view object is adjusted, for example, the length and width of the frame view object are adjusted to 0, then S517 - S518 may not be executed.
[0228] S519: The drag-and-drop listener object obtains that the operation type of the drag event is a release operation, and executes S520.
[0229] For example, the operation type "DragEvent.ACTION_DRAG_ENDED" indicates that the user has released the dragging operation and the dragging operation has ended. When the drag and drop listener object receives a drag event with the operation type "DragEvent.ACTION_DRAG_ENDED", it is determined that the user's dragging operation on the draggable thumbnail image has ended.
[0230] S520, the drag and drop listener object queries whether the resource data carried by the draggable thumbnail image has been processed, if so, execute S521, if not, execute S522.
[0231] Exemplarily, the drag and drop listener object may use the dragEvent.getResult() method to query whether the resource data carried by the draggable thumbnail image has been processed.
[0232] Among them, the resource data carried by the draggable thumbnail image has been processed, which can be understood as the screenshot image or screen recording video corresponding to the thumbnail view object has been transmitted to the target application or service.
[0233] Situations in which the resource data carried by the draggable thumbnail image is not processed may include the user dragging the draggable thumbnail image into a non-hot zone and then releasing the image, or the user dragging the draggable thumbnail image into a hot zone of a target application, but the target application is unable to respond to the data drag transfer operation.
[0234] S521, the drag and drop listener object destroys the thumbnail view object.
[0235] When the user stops dragging the draggable thumbnail image, if the drag and drop listener object finds that the data carried by the draggable thumbnail image has been processed, that is, the resource data is passed to the target application, the drag and drop listener object destroys the thumbnail view object and the process ends.
[0236] As an optional implementation, S521 may be adjusted as follows: the drag-and-drop listener object sends instruction information for instructing the management module to destroy the thumbnail view object, and the management module destroys the thumbnail view object according to the instruction information.
[0237] S522, drag and drop the listener object to unhide the thumbnail view object, and restart the automatic disappearance timer for the thumbnail view object.
[0238] When the user stops dragging the draggable thumbnail image, if the drag and drop listener object queries that the data carried by the draggable thumbnail image has not been processed, that is, the resource data has not been passed to the target application, the drag and drop listener object triggers the display of the thumbnail view object again and restarts the automatic disappearance timer for the thumbnail view object.
[0239] When the long press listener object hides the thumbnail view object by setting the transparency, the drag and drop listener object also unhides the thumbnail view object by setting the transparency. For example, the drag and drop listener object can set the transparency of the thumbnail view object to 1 through the function setAlpha(1), that is, the thumbnail view object is set to an opaque state.
[0240] When the long press listener object hides the thumbnail view object by setting visibility, the drag and drop listener object also unhides the thumbnail view object by setting visibility. For example, the drag and drop listener object can set the visibility of the thumbnail view object to visible through the function setVisibility(View.VISIBLE).
[0241] When the long press listener object hides the thumbnail view object by setting the size of the thumbnail view object, the drag and drop listener object also unhides the thumbnail view object by resetting the size of the thumbnail view object. For example, the drag and drop listener object can obtain the original size of the thumbnail view object recorded by the long press listener object, and call the updateViewLayout method provided by the window manager (WindowManager) to reset the size of the thumbnail view object to the original size.
[0242] As an optional implementation, S520 can be adjusted as follows: dragging and dropping the listener object to send an indication message to the management module, where the indication message is used to indicate to unhide the thumbnail view object and restart the automatic disappearance timer for the thumbnail view object. The management module unhides the thumbnail view object according to the indication message and restarts the automatic disappearance timer for the thumbnail view object.
[0243] Among them, when the long press listener object hides the thumbnail view object by setting transparency, the management module also unhides the thumbnail view object by setting transparency. When the long press listener object hides the thumbnail view object by setting visibility, the management module also unhides the thumbnail view object by setting visibility. When the long press listener object hides the thumbnail view object by setting the size of the thumbnail view object, the management module also unhides the thumbnail view object by resetting the size of the thumbnail view object.
[0244] In this case, since the thumbnail view object has not been destroyed, before the automatic disappearance timer of the thumbnail view object ends, the user can also trigger the data transmission process provided by the embodiment of the present application through a long press operation again. For details, see S503 to S522 above, which will not be repeated here.
[0245] In the solution provided in the embodiment of the present application, the user can transfer data of the screenshot image or screen recording video corresponding to the thumbnail image by dragging the screenshot image thumbnail image or the screen recording video thumbnail image, which is convenient to operate and improves the user experience.
[0246] In addition, the embodiment of the present application also takes into account the existing solution of automatic disappearance timing of thumbnails, and restarts the automatic disappearance timing of thumbnails after the thumbnail drag is canceled. Moreover, the embodiment of the present application achieves the effect of "the original thumbnail is dragged" visually by hiding the thumbnail view object, which is obviously different from the visual experience of the user clearly perceiving that it is a drag projection.
[0247] This embodiment further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the data transmission method in the above-mentioned embodiment.
[0248] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the data transmission method in the above-mentioned embodiment.
[0249] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the chip executes the data transmission method in the above-mentioned method embodiments.
[0250] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.
[0251] Through the description of the above implementation methods, technical personnel in the relevant field can 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.
[0252] 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.
[0253] 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.
[0254] 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.
[0255] Any content of each embodiment of the present application, as well as any content of the same embodiment, can be freely combined. Any combination of the above content is within the scope of the present application.
[0256] 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.
[0257] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0258] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner, or can be implemented by a processor executing a software instruction. The software instruction can be composed of corresponding software modules, and the software module can be stored in a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (Read Only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable ROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disk (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.
[0259] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0260] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A data transmission method, characterized in that: Applied to electronic equipment, the method comprises: After starting the screen recording application, displaying a first interface, the first interface including: first content of a first application and second content of the screen recording application, the second content being suspended and displayed on the first content, and the second content including a first control; In response to a first operation on the first control, a first video is generated and a second interface is displayed, wherein the second interface includes: the first content of the first application and a first thumbnail of the first video, the first thumbnail prompts that the first video can be played, and the first thumbnail is displayed in suspension on the first content, wherein the first content of the first application continues to be displayed by the electronic device; In response to a second operation on the first thumbnail, displaying a first motion effect, where the first motion effect is used to prompt that the first thumbnail can be dragged; In a case where the screen of the electronic device includes a first hot zone of a second application, in response to a third operation of dragging the first thumbnail to the first hot zone, prompt information displayed in a second control at the edge of the screen changes, and after receiving the third operation, in response to a hand-off operation, the first video is sent to the second application; wherein the prompt information is used to prompt that the first video can be saved to the second application, and the third operation is a drag operation coherent with the second operation; In a case where the screen of the electronic device includes a second hot zone of a third application, a third interface is displayed in response to a fourth operation of dragging the first thumbnail to the second hot zone, and after receiving the fourth operation, when the first thumbnail continues to be dragged to the first icon by the fourth operation, the first video is sent to the second application in response to a hand-off operation; wherein the third application is different from the second application, and the third interface includes: the reduced first content, the first icon of the second application, and the second icon of the fourth application, the second application is different from the fourth application, the first icon, the second icon and the second hot zone are all located on the same side of the screen of the electronic device, the second hot zone is different from the first hot zone, and the fourth operation is a drag operation that is continuous with the second operation.
2. The method according to claim 1, characterized in that The area where the second hot zone is located at least includes the right edge area of the screen or the left edge area of the screen.
3. The method according to claim 1, characterized in that The second operation is a long press operation.
4. The method according to claim 1, characterized in that: After the first motion effect is displayed, the border of the first thumbnail is changed from a first border to a second border, and the first border is different from the second border.
5. The method according to claim 1, characterized in that The first thumbnail in the second interface is displayed in the lower left corner of the screen.
6. The method according to claim 1, characterized in that The second content includes controls for screen recording, the controls for screen recording include the first controls, and the controls for screen recording also include a third control, and the third control is used to control whether to record through a microphone during the screen recording process.
7. The method according to claim 1, characterized in that In the case where the second interface includes a second hot zone of the third application, the method further includes: After the first thumbnail is dragged to the second hot zone, an icon of the first service and an icon of the second service are displayed, and both the first service and the second service correspond to a fifth application; When the first thumbnail continues to be dragged by the sixth operation to the icon of the first service or the icon of the second service, the first video is sent in response to a release operation, wherein the sixth operation is a drag operation continuous with the second operation.
8. The method according to claim 7, characterized in that The fifth application is a video sharing application.
9. The method according to claim 7, characterized in that: When the first thumbnail is continued to be dragged onto the icon of the first service, in response to the release operation, a fourth interface is displayed, where the fourth interface includes a plurality of objects in the fifth application; In response to a selection operation on a first object among the multiple objects, the first video is sent to the first object through the fifth application.
10. The method according to claim 9, characterized in that The method further comprises: In response to a selection operation on a first object among the multiple objects, after the first video is sent to the first object through the fifth application, prompt information is displayed to indicate that the first video has been successfully shared.
11. The method according to claim 7, characterized in that When the first thumbnail is continued to be dragged onto the icon of the second service, in response to the release operation, the first video is published by the fifth application.
12. The method according to any one of claims 1 to 6, characterized in that: After sending the first video to the second application, the method further includes: In response to the screenshot operation, generating a screenshot image and displaying a fifth interface, the fifth interface including a second thumbnail of the screenshot image; In response to a fifth operation on the second thumbnail, the second thumbnail moves following the fifth operation; Among them, in the process of the second thumbnail moving following the fifth operation, when the second thumbnail intersects with the initial position, the mark used to indicate the initial position is displayed; when the second thumbnail does not intersect with the initial position, the mark used to indicate the initial position is not displayed, and the initial position is the display position of the second thumbnail in the fifth interface.
13. The method according to claim 12, characterized in that In response to a fifth operation on the second thumbnail, after the second thumbnail moves following the fifth operation, the method further includes: After the second thumbnail is dragged to the first position by the fifth operation, the second thumbnail is displayed at the initial position in response to a release operation, and the first position does not fall into the first hot zone and does not fall into the second hot zone.
14. The method according to claim 1, characterized in that The first motion effect is a motion effect indicating that the first thumbnail is floating.
15. The method according to claim 1, characterized in that The method also includes: in response to a second operation on the first thumbnail, displaying a second animation effect, wherein the second animation effect is used to move the first thumbnail so that the finger performing the second operation is located at a specified position on the first thumbnail.
16. The method according to claim 1, characterized in that The first application is a desktop application.
17. The method according to claim 1, characterized in that The second application is an application for collecting data.
18. An electronic device, characterized in that: include: Memory and processor; The processor is coupled to the memory; The memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the data transmission method as described in any one of claims 1 to 17.
19. A computer-readable storage medium comprising a computer program, characterized in that: When the computer program is executed on an electronic device, the electronic device executes the data transmission method as described in any one of claims 1 to 17.
Citation Information
Patent Citations
Dragging and screen capturing method for digital video and playing device capable of performing video dragging and screen capturing
CN102799422A
Screen shot sharing method and device
CN106598462A
Screenshot picture sharing method and mobile terminal
CN106681623A
Processing method for content and mobile terminal
CN106844067A
Information sharing method, intelligent terminal and storage medium
CN108228053A