Data sharing method, device, electronic device and storage medium in split-screen mode

By acquiring information about changes in the orientation of the device's sensors, data sharing in split-screen mode is automatically enabled, solving the problem of cumbersome data sharing in existing technologies and achieving convenient data transmission.

CN113900615BActive Publication Date: 2024-11-26DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111093572.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-17
Publication Date
2024-11-26
Estimated Expiration
2041-09-17

AI Technical Summary

Technical Problem

In split-screen mode, the data sharing process in existing technologies is cumbersome, requiring users to manually drag and drop files, which is inconvenient.

Method used

By acquiring sensor orientation change information of the device in split-screen mode, the rotation or tilt direction of the device is determined using gravity sensors and gyroscopes, and data is automatically shared.

Benefits of technology

It enables a convenient data sharing process in split-screen mode, reducing user operation steps and improving data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113900615B_ABST
    Figure CN113900615B_ABST
Patent Text Reader

Abstract

The present invention provides a data sharing method, device, electronic device and storage medium in a split-screen mode, the method comprising: obtaining the relative position of a first activity and a second activity on a device screen when the device is in the split-screen mode, wherein the first activity and the second activity belong to different applications, and data can be shared between the different applications in a drag-and-drop manner; obtaining direction change information of a device sensor; and sharing data between the first activity and the second activity according to the relative position and the direction change information. The technical solution of the present invention can realize data sharing more conveniently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data sharing method, device, electronic device and storage medium in a split-screen mode. Background Art

[0002] The Android system supports multi-window mode, or split-screen mode, which means that multiple windows can be displayed on the screen at the same time.

[0003] Two windows can be displayed side by side or one above the other. Figure 1 As shown, the window on the left half of the screen 110 is a window of the activity 121 of the first application, and the window on the right half is a window of the activity 122 of the second application. Figure 2 As shown, the window in the upper half of screen 210 is the window of activity 221 , and the window in the lower half is the window of activity 222 . Summary of the invention

[0004] The present invention provides a data sharing method, device, electronic device and non-transitory computer-readable storage medium in a split-screen mode to achieve more convenient data sharing.

[0005] In a first aspect, the present invention provides a method for sharing data in a split-screen mode, comprising: obtaining the relative positions of a first activity and a second activity on a device screen when the device is in the split-screen mode, wherein the first activity and the second activity belong to different applications; obtaining direction change information from a device sensor; and sharing data between the first activity and the second activity based on the relative positions and the direction change information.

[0006] According to a data sharing method in split-screen mode provided by the present invention, before obtaining the relative positions of the first activity and the second activity on the device screen when the device is in the split-screen mode, the method also includes: determining that the device is in split-screen mode according to the acquired split-screen mode judgment function.

[0007] According to a data sharing method in a split-screen mode provided by the present invention, before obtaining the relative positions of the first activity and the second activity on the device screen when the device is in the split-screen mode, the method also includes: determining the positions of the first activity and the second activity on the device screen; and determining the relative positions according to the positions of the first activity and the second activity on the device screen.

[0008] According to a data sharing method in a split-screen mode provided by the present invention, before sharing data between the first activity and the second activity based on the relative position and the direction change information, the method also includes: determining that data can be shared between different applications in a drag-and-drop manner.

[0009] According to a data sharing method in split-screen mode provided by the present invention, data is shared between the first activity and the second activity according to the relative position and the direction change information, including: determining the first activity corresponding to the direction change information as the data output party according to the relative position and the direction change information; and sending the shared data shared by the first activity to the second activity.

[0010] According to a data sharing method in a split-screen mode provided by the present invention, sending the shared data shared by the first activity to the second activity includes: sending the shared data to the second activity through communication between components of the activities.

[0011] According to a data sharing method in a split-screen mode provided by the present invention, the obtaining of direction change information of a device sensor includes: obtaining a rotation direction of the device obtained by a gravity sensor; and / or obtaining a tilt direction of the device obtained by a gyroscope.

[0012] In a second aspect, the present invention provides a data sharing device in split-screen mode, comprising: a first acquisition unit, used to acquire the relative positions of a first activity and a second activity on the device screen when the device is in the split-screen mode, wherein the first activity and the second activity belong to different applications; a second acquisition unit, used to acquire direction change information of a device sensor; and a sharing unit, used to share data between the first activity and the second activity based on the relative position and the direction change information.

[0013] According to a data sharing device in split-screen mode provided by the present invention, the device also includes a determination unit, which is used to determine whether the device is in split-screen mode according to an acquired split-screen mode determination function.

[0014] According to a data sharing device in split-screen mode provided by the present invention, the determination unit is also used to: determine the positions of the first activity and the second activity on the device screen; and determine the relative positions according to the positions of the first activity and the second activity on the device screen.

[0015] According to a data sharing device in a split-screen mode provided by the present invention, the determining unit is further used to: determine that data can be shared between the different applications in a drag-and-drop manner.

[0016] According to a data sharing device in a split-screen mode provided by the present invention, the sharing unit is also used to: determine a first activity as a data output party corresponding to the direction change information according to the relative position and the direction change information; and send the shared data shared by the first activity to the second activity.

[0017] According to a data sharing device in a split-screen mode provided by the present invention, the sharing unit is further used to: send the shared data to the second activity through inter-activity component communication.

[0018] According to a data sharing device in a split-screen mode provided by the present invention, the second acquisition unit is further used to: acquire the rotation direction of the device obtained by a gravity sensor; and / or acquire the tilt direction of the device obtained by a gyroscope.

[0019] In a third aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the data sharing method in the split-screen mode as described above are implemented.

[0020] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the data sharing method in the split-screen mode as described in any one of the above.

[0021] The data sharing method, device, electronic device and non-transitory computer-readable storage medium in split-screen mode provided by the present invention obtain the direction change information of the device through the sensor of the device, and share data between different activities in the split-screen mode based on the direction change information, making the data sharing process more convenient. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 It is one of the schematic diagrams of the display content of the screen in the split-screen mode in the related art;

[0024] Figure 2 This is the second schematic diagram of the display content of the screen in the split-screen mode in the related art;

[0025] Figure 3 It is a flowchart of a data sharing method in a split-screen mode provided by the present invention;

[0026] Figure 4 is a schematic diagram of data sharing in the split-screen mode provided by the present invention;

[0027] Figure 5It is a structural schematic diagram of a data sharing device in a split-screen mode provided by the present invention;

[0028] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] In the related art, data can generally be shared between different activities on a shared screen in split-screen mode by dragging and dropping. In this method, the operator first needs to click on the file to be shared in one activity, and then drag the file to another activity and release it. The operation process of sharing data is relatively cumbersome.

[0031] To solve this problem, embodiments of the present invention provide a method, device, electronic device, and non-transitory computer-readable storage medium for sharing data in a split-screen mode.

[0032] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0033] like Figure 3 The flowchart of the data sharing method in the split screen mode of the embodiment of the present invention is shown. The method provided by the embodiment of the present invention can be executed by any electronic device with computer processing capability, such as mobile terminal devices such as mobile phones, tablets, and notebooks.

[0034] In the following embodiments, the Android operating system includes the Android OS released by Google, AOSP, and various derivative systems based on AOSP, such as MIUI, EMUI, One UI, etc.

[0035] Take an electronic device running the Android operating system as an example, Figure 3 As shown, the data sharing method in the split-screen mode includes:

[0036] Step 302: Obtain relative positions of a first activity and a second activity on a device screen when the device is in a split-screen mode, wherein the first activity and the second activity belong to different applications.

[0037] Specifically, a device is generally an electronic device that is a mobile terminal, such as a mobile phone, a tablet computer, etc. An activity is a component that can include a user interface. It can be simply understood as one page corresponding to one activity, which is mainly used to interact with users. Different activities in the same application can share data without manual operation.

[0038] The first activity and the second activity in the embodiment of the present invention belong to different applications. The different applications can share data by dragging and dropping, that is, they have a communication protocol and interface for data sharing. On this basis, the technical solution of the present invention proposes a more convenient data sharing method.

[0039] Step 304: Acquire direction change information of the device sensor.

[0040] Specifically, the device sensor may be a gravity acceleration sensor or a gyroscope, wherein both the gravity acceleration sensor and the gyroscope may be sensors using MEMS (Micro Electro Mechanical Systems) technology. The gravity acceleration sensor may be referred to as a gravity sensor for short. Based on the gravity sensor and the gyroscope, the rotation direction, tilt direction, and acceleration of the rotation direction and tilt direction of the device may be obtained. The direction change information is information describing the situation of the device direction change.

[0041] Step 306 : Share data between the first activity and the second activity based on the relative position and direction change information.

[0042] Specifically, the relative positions of the first activity and the second activity on the interface may be that the first activity is above or below the second activity, or that the first activity is on the left or right of the second activity. The direction change of the device may be that the device rotates or tilts from left to right, or that the device rotates or tilts from top to bottom.

[0043] For example, it may be specified that when a first activity is above a second activity, if the direction change information collected by the device sensor is that the device is rotating from top to bottom, an instruction may be generated to share the data of the first activity with the second activity.

[0044] In an embodiment of the present invention, when the device is in split-screen mode and there are windows of a first activity and a second activity on the screen of the device, information about changes in the device orientation can be obtained through the device sensor, so that when the user rotates or tilts the device, a corresponding data sharing instruction is generated, making the data sharing process more convenient.

[0045] In the embodiment of the present invention, the screen of the device is shared by two activities, and data can be shared between the two activities by rotating or tilting the device. When there are three or more activities on the screen of the device, data can also be shared between activities with communication protocols and interfaces for data sharing by rotating or tilting the device.

[0046] Before step 302, it is necessary to determine whether the device is in split-screen mode according to the acquired split-screen mode judgment function, determine the positions of the first activity and the second activity on the device screen, and determine the relative positions according to the positions of the first activity and the second activity on the device screen.

[0047] Specifically, the Android system in the embodiment of the present invention allows the mobile terminal to run two windows simultaneously, which can be arranged up and down in the vertical mode or left and right in the horizontal mode.

[0048] Multi-window mode does not change the activity lifecycle. In multi-window mode, only the activity that the user has most recently interacted with is active at a given time. That activity is considered the top-level activity. All other activities are visible but paused. However, these paused but visible activities have higher priority in the system than invisible activities. If the user interacts with one of the paused activities, that activity is resumed and the previous top-level activity is paused.

[0049] When the user displays your app in multi-window mode, when the user resizes your app, or when the user restores your app to full-screen mode, the system notifies your activity of a configuration change. This change has essentially the same activity lifecycle impact as when the system notifies your app that the device switches from portrait mode to landscape mode, but the device changes dimensions instead of just swapping dimensions.

[0050] If the user resizes the window, and enlarges it in any dimension, the system will adjust the activity to match the user's actions, and publish runtime changes as needed.

[0051] Whether your app's activities support multi-window display and how they are displayed can be configured. For example, you can set properties in the manifest file to control size and layout. You can set properties for an activity that apply to all activities in other task stacks. For example, if the activity's android.resizeableActivity is set to true, all activities in the task stack can be resized.

[0052] In addition, if the value of the property Android.resizeableActivity = ["true"|"false"] is true, the activity can be started in split-screen and free mode. If the value of this property is false, the activity does not support multi-window mode. If no value is set for this property, the value of this property defaults to true, which means that multi-window mode is supported by default.

[0053] On some Android systems, when a user opens an app in multi-window mode, the system will force the app to resize. The system will display a dialog box to inform the user that the app may behave abnormally. The system will not resize directional apps, and if the user tries to open a directional app in multi-window mode, the app will be displayed in full screen.

[0054] When launching an activity, the user can hint to the system that the new activity should be displayed next to the current activity if possible. To do this, use the flag Intent.FLAG_ACTIVITY_TO_ADJACENT.

[0055] If the device is in split-screen mode, the system attempts to create the new activity next to the activity that launched the system so that the two activities share the screen.

[0056] If the device is in freeform mode, when launching a new activity, the user can call ActivityOptions.setLaunchBounds() to specify the size and position of the new activity. If the device is not in multi-window mode, this method has no effect.

[0057] If you start an activity in a task stack, it replaces the activity on the screen and inherits all of its multi-window properties. If you want to start a new activity in a separate window in multi-window mode, you must start this activity in a new task stack.

[0058] There are many ways to switch to multi-window mode. For example, in the overview interface of recent tasks, users can long press the title of an application that supports multi-window mode and drag it to the top of the screen. At this time, the application will switch to multi-window mode, and the overview interface of other tasks will continue to be displayed at the bottom of the screen. In addition, if the current application can support multi-window mode, long press the window button on the navigation bar to switch the current application to multi-window mode, and the overview interface of other tasks will be displayed at the bottom of the screen; users can drag the dividing line between the two windows to make it larger or smaller.

[0059] The multi-window mode supports drag and drop. The main purpose is to transfer data or other types of information between windows. For developers, if the application needs to support multi-window mode, the interface display layout of this part should be designed and tested in detail to match different aspect ratios.

[0060] If the user opens the Overview screen and long-presses the activity title, they can drag the activity to the highlighted area of ​​the screen to put the activity into multi-window mode.

[0061] If the user long presses the Overview button, the current activity on the device will enter multi-window mode and the Overview screen will open, where the user can select another activity to share the screen.

[0062] In multi-window mode, users can set layout attributes in multi-window mode in the activity tag. Among them, setting android:defaultWidth can set the default width in multi-window mode, setting android:defaultHeight can set the default height in multi-window mode, and setting android:gravity can set the initial position in multi-window mode. By setting android:minimalHeight and android:minimalWidth, you can set the minimum height and minimum width in multi-window mode. If the user moves the dividing line in split-screen mode so that the activity size is lower than the specified minimum value, the system will crop the activity to the size requested by the user.

[0063] The following new methods are added to the Activity class to support multi-window display: one method is Activity.isInMultiWindowMode(), which can determine whether it is in multi-window mode, and the other method is Activity.onMultiWindowModeChanged(), which will be called back when entering or exiting multi-window mode.

[0064] In addition, before step 302, it is also necessary to ensure that data can be shared between different applications in a drag-and-drop manner.

[0065] The essence of two applications sharing data is that one application starts the interface through which the other application can receive data. For example, when application APP1, as the initiator of data sharing, sends data to application APP2, application APP1, as the initiator, does not need to make additional settings. Application APP2, as the receiver, needs to modify the corresponding data of APP2 in the View.java file of the framework layer of the Android system. Specifically, by reflecting the package name and class name of application APP2, its intent (communication between components) information is intercepted and modified. Application APP2 uses the modified intent information to start the interface according to the startActivity function, and can accept the data shared by application APP1. Among them, the step of modifying the intent information can be executed after application APP1 initiates data sharing.

[0066] The startup of an application mainly depends on the ActivityManager service, which is one of the many services provided by the system. As the main content provided by the framework, the service plays an important role in connecting the upper and lower levels: on the one hand, it provides the application with an agreed function call interface; on the other hand, the application does not need to worry about how to implement the service. The framework will be responsible for interacting with the underlying driver layer to achieve the purpose.

[0067] Intent is mainly used to solve the communication between the components of Android applications. Intent is responsible for describing the action, data involved in the action, and additional data of an operation in the application. Android is responsible for finding the corresponding component based on the description of this Intent, passing the Intent to the called component, and completing the call of the component.

[0068] For example, in a contact maintenance application, when we are on a contact list screen, assuming the corresponding activity is listActivity, after clicking on a contact, we hope to be able to jump out of the contact's detailed information screen, assuming the corresponding activity is detailActivity. ListActivity is a subclass inherited from Activity, this ListActivity can be used to display a list of data, and its data source can be bound to an array or a database cursor.

[0069] To achieve this goal, listActivity needs to construct an Intent, which is used to tell the system that we want to perform a "view" action, and the corresponding viewing object of this action is "a certain contact". Then startActivity is called and the constructed Intent is passed in. The system will find an activity in ManiFest that meets the requirements of this Intent based on the description in this Intent. The system will call the found activity, which is the detail Activity, and finally pass it into the Intent. DetailActivity will perform the corresponding operation based on the description in this Intent.

[0070] Intent messages are a mechanism for delayed runtime binding between components in the same or different applications. An Intent object is a passive data structure that holds an abstract description of an action to be performed, or in the case of broadcasts, something that has occurred and is being announced. There are separate mechanisms for delivering intents for the following three components:

[0071] Activity: An intent object passed to Context.startActivity() or Activity.startActivityForRestult() to start an activity or make an existing activity do new things.

[0072] Service: An intent object is passed to Context.startService() to initialize a service or pass a new command to a running service. Similarly, an intent can be passed to Context.bindService() to establish a connection between the calling component and the target service.

[0073] Broadcast Receiver: An intent object passed to any broadcast method, such as ConnectionsendBroadcast(), ConnectionsendOrderedBroadcast(), Context.sendStickyBroadcast(), etc., will be delivered to all interested broadcast receivers.

[0074] In each case, the Android system looks for an appropriate activity, service, or broadcast receiver to respond to the intent and initializes them if necessary. There is no overlap between these messaging systems, that is, broadcast intents are delivered only to broadcast receivers, not to activities or services, and vice versa.

[0075] An Intent object is a bundle of information that contains information about the components that are interested in the intent, such as the action to be performed and the data to be acted on, and information that the Android system is interested in, such as the category information for handling the intent component and instructions on how to start the target activity.

[0076] In the embodiment of the present invention, the window change and the change of the screen direction can be determined according to the WindowManager (window manager), the information of the two applications can be obtained according to the ActivityManagerService (activity management service), and the sharing can be specifically implemented.

[0077] Window Manager is an interface class, inherited from View Manager interface, and its implementation class is WindowManagerImpl. If we want to add and delete windows, we can use WindowManager. The specific work is handled by WMS (WindowMangerService). WindowManager and WMS communicate across processes through Binder. As a system service, WMS has many APIs that are not exposed to WindowManager, which is similar to the relationship between ActivityManager and AMS.

[0078] Among them, ActivityManagerService is an Android system service, which is the server of activity management, used to manage various behaviors of activities, control the life cycle of activities, dispatch message events, low memory management, etc.

[0079] There are two important methods in the source code class View.java: one is getLocationOnScreen(): get the absolute coordinates of the view component in the entire screen. Note that this value is calculated from the top of the screen, which includes the height of the notification bar. The other is to get the absolute coordinates of the component view in the current window, getLeft, getTop, getBottom, getRight, this group is to get the coordinates relative to its parent window. According to these two important methods, the positions of the first and second activities in the screen can be obtained, and further the relative positions between the first and second activities can be obtained.

[0080] In step 304, the rotation direction of the device obtained by the gravity sensor may be obtained. The tilt direction of the device obtained by the gyroscope may also be obtained to share data according to the change in the direction of the device.

[0081] Currently, most gyroscopes in mobile phones are MEMS gyroscopes, in which the micromechanical structure is a vibrating part, and the angular velocity is obtained by measuring the Coriolis acceleration generated by rotation.

[0082] The gravity acceleration sensor can also be a MEMS structure, which includes a vibration structure. Since the external acceleration will affect the vibration characteristics of the vibration structure, the acceleration is measured. The gravity sensor and direction sensor in the mobile phone can also be derived sensors based on the data obtained from the accelerometer, gyroscope, and magnetic sensor.

[0083] In step 306, a first activity corresponding to the direction change information and serving as a data outputter may be determined according to the relative position and the direction change information, and then the shared data shared by the first activity may be sent to the second activity.

[0084] Specifically, in step 306, the shared data may be sent to the second activity via intent.

[0085] When the phone screen is in split-screen mode, when sharing data between two activities, the user needs to first select the data to be shared, for example, click on a file, and then shake or rotate the phone to share the data. It can be considered that before sharing data between two activities, the file to be shared should be determined first, and then the phone should be rotated or tilted. When sharing data, the file to be shared in the first activity is obtained and sent to the second activity through intent, and the data sharing task can be completed.

[0086] like Figure 4 As shown, after a file 1211 of activity 121 is selected, the device can be swung in the direction of arrow A to share the file 1211 from activity 121 to activity 122. File 1211 can be a text document or a picture. In one embodiment, file 1211 is a picture, and correspondingly, activity 121 can be a picture library of the device, and activity 122 can be an application for recognizing images, or an application for editing or displaying pictures.

[0087] In one embodiment, according to the direction change information obtained in step 304, when the device is in the left-right split screen mode, in step 306, the following operations may be performed:

[0088] In the case of rotation, rotating from left to right means dragging the selected content of the left activity to the right activity, and rotating from right to left means dragging the selected content of the right activity to the left activity.

[0089] In the case of tilting, tilting from left to right means dragging the selected content of the left activity to the right activity, and tilting from right to left means dragging the selected content of the right activity to the left activity.

[0090] In another embodiment, according to the direction change information obtained in step 304, when the device is in the top-bottom split screen mode, in step 306, the following operations may be performed:

[0091] In the case of rotation, rotating from top to bottom means dragging the selected content of the upper activity to the lower activity, and rotating from bottom to top means dragging the selected content of the lower activity to the upper activity.

[0092] In the case of tilting, tilting from top to bottom means dragging the selected content of the upper activity to the lower activity, and tilting from bottom to top means dragging the selected content of the lower activity to the upper activity.

[0093] The data sharing method in the split-screen mode of the embodiment of the present invention obtains the direction change information of the device through the sensor of the device, and shares the data between different activities in the split-screen mode according to the direction change information, making the data sharing process more convenient.

[0094] The data sharing device in the split-screen mode provided by the present invention is described below. The data sharing device in the split-screen mode described below and the data sharing method in the split-screen mode described above can correspond to each other.

[0095] like Figure 5 As shown, the data sharing device in the split-screen mode provided by the embodiment of the present invention includes:

[0096] The first acquisition unit 502 may be configured to acquire relative positions of a first activity and a second activity on a device screen when the device is in a split-screen mode, wherein the first activity and the second activity belong to different applications.

[0097] The second acquisition unit 504 may be used to acquire direction change information of a device sensor.

[0098] The sharing unit 506 may be used to share data between the first activity and the second activity according to the relative position and direction change information.

[0099] In an embodiment of the present invention, when the device is in split-screen mode and there are two active windows on the screen of the device, the information on the change in device orientation obtained by the device sensor can generate corresponding data sharing instructions when the user shakes or rotates the device, thereby making data sharing more convenient.

[0100] In an embodiment of the present invention, the apparatus may further include a determination unit configured to determine whether the device is in the split-screen mode according to the acquired split-screen mode determination function.

[0101] In the embodiment of the present invention, the determining unit may also be used to: determine the positions of the first activity and the second activity on the device screen; and determine the relative positions according to the positions of the first activity and the second activity on the device screen.

[0102] In the embodiment of the present invention, the determining unit may also be used to: determine whether data can be shared between different application programs in a drag-and-drop manner.

[0103] In the embodiment of the present invention, the sharing unit may also be used to: determine a first activity corresponding to the direction change information as a data outputter according to the relative position and direction change information; and send the shared data shared by the first activity to the second activity.

[0104] In the embodiment of the present invention, the sharing unit may also be used to send the shared data to the second activity through intent.

[0105] Intent is mainly used to solve the communication between the components of Android applications. Intent is responsible for describing the action, data involved in the action, and additional data of an operation in the application. Android is responsible for finding the corresponding component based on the description of this Intent, passing the Intent to the called component, and completing the call of the component. Therefore, Intent plays the role of a media intermediary here, specifically providing relevant information for components to call each other, and realizing the decoupling between the caller and the callee.

[0106] When the phone screen is in split-screen mode, when sharing data between two activities, the user needs to first select the data to be shared, for example, click on a file, and then shake or rotate the phone to share the data. It can be considered that before sharing data between two activities, the file to be shared should be determined first, and then the phone should be rotated or tilted. When sharing data, the file to be shared in the first activity is obtained and sent to the second activity through intent, and the data sharing task can be completed.

[0107] In the embodiment of the present invention, the second acquisition unit may also be used to: acquire the rotation direction of the device obtained by the gravity sensor; and / or acquire the tilt direction of the device obtained by the gyroscope.

[0108] It can be understood that the data sharing device in the split-screen mode can implement the various steps of the data sharing method in the split-screen mode provided in the aforementioned embodiments. The relevant explanations on the data sharing method in the split-screen mode are applicable to the data sharing device in the split-screen mode and will not be repeated here.

[0109] The data sharing device in the split-screen mode of the embodiment of the present invention obtains the direction change information of the device through the sensor of the device, and shares the data between different activities in the split-screen mode according to the direction change information, making the data sharing process more convenient.

[0110] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the data sharing method in the split-screen mode, the method comprising: obtaining an Android routing table corresponding to the data to be processed in the Android system; obtaining an Android virtual network card of the link used by the data to be processed according to the Android routing table; sending the data to be processed through the Linux physical network card corresponding to the Android virtual network card, wherein the Android virtual network card is linked to the corresponding Linux physical network card and has the same Internet Protocol IP address.

[0111] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0112] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the data sharing method in the split-screen mode provided by the above methods, and the method includes: obtaining an Android routing table corresponding to the data to be processed in the Android system; obtaining an Android virtual network card of the link used by the data to be processed according to the Android routing table; and sending the data to be processed through the Linux physical network card corresponding to the Android virtual network card, wherein the Android virtual network card is linked to the corresponding Linux physical network card and has the same Internet Protocol IP address.

[0113] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the data sharing method in the split-screen mode provided above, the method comprising: obtaining an Android routing table corresponding to the data to be processed in the Android system; obtaining an Android virtual network card of the link used by the data to be processed according to the Android routing table; and sending the data to be processed through a Linux physical network card corresponding to the Android virtual network card, wherein the Android virtual network card is linked to the corresponding Linux physical network card and has the same Internet Protocol IP address.

[0114] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data sharing method in split-screen mode, characterized in that: include: Obtaining relative positions of a first activity and a second activity on a device screen when the device is in split-screen mode, wherein the first activity and the second activity belong to different applications; Get the direction change information of the device sensor; Data is shared between the first activity and the second activity according to the relative position and the direction change information; the process includes: before data sharing, determining the files to be shared; when sharing data, obtaining the files to be shared from the first activity and sending them to the second activity to complete the data sharing; the direction change information includes rotation direction information or tilt direction information.

2. The method according to claim 1, characterized in that Before obtaining the relative positions of the first activity and the second activity on the device screen when the device is in the split-screen mode, the method further includes: It is determined that the device is in split-screen mode according to the acquired split-screen mode determination function.

3. The method according to claim 1, characterized in that Before obtaining the relative positions of the first activity and the second activity on the device screen when the device is in the split-screen mode, the method further includes: determining where the first activity and the second activity are located on a screen of the device; The relative position is determined based on positions of the first activity and the second activity on the screen of the device.

4. The method according to claim 1, characterized in that: Before sharing data between the first activity and the second activity according to the relative position and the direction change information, the method further includes: It is determined that data can be shared between the different applications in a drag-and-drop manner.

5. The method according to claim 1, characterized in that: Sharing data between the first activity and the second activity according to the relative position and the direction change information includes: Determine, according to the relative position and the direction change information, a first activity as a data outputter corresponding to the direction change information; The shared data shared by the first activity is sent to the second activity.

6. The method according to claim 5, characterized in that The sending the shared data shared by the first activity to the second activity includes: The shared data is sent to the second activity through inter-activity component communication.

7. The method according to claim 1, characterized in that The obtaining of direction change information of a device sensor includes: Obtaining the rotation direction of the device obtained by a gravity sensor; and / or, Get the tilt direction of the device obtained by the gyroscope.

8. A data sharing device in split-screen mode, characterized in that: include: A first acquisition unit, configured to acquire relative positions of a first activity and a second activity on a device screen when the device is in a split-screen mode, wherein the first activity and the second activity belong to different applications; A second acquisition unit, used to acquire direction change information of a device sensor; A sharing unit is used to share data between the first activity and the second activity according to the relative position and the direction change information; it includes: before sharing the data, determining the files to be shared, when sharing the data, obtaining the files to be shared of the first activity and sending them to the second activity to complete the data sharing, and the direction change information includes rotation direction information or tilt direction information.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.