Call state monitoring method and device, and storage medium

By creating a listener for each SIM card to monitor its call status, the problem of ineffective SIM card call status monitoring in multi-screen collaboration is solved, enabling simple, fast, and accurate monitoring of SIM card call status and ensuring smooth collaborative calls.

CN116367214BActive Publication Date: 2026-01-16HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310092186.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2026-01-16
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

In multi-screen collaboration scenarios, if the first device has multiple SIM cards installed, the call status monitoring of the SIM cards may become invalid, affecting the collaborative call process.

Method used

The first device obtains the identifiers of all SIM cards, creates a corresponding listener for each SIM card, and monitors the call status of each SIM card to ensure timely monitoring regardless of which SIM card is used for operator calls.

Benefits of technology

It enables simple, fast, and accurate monitoring of the call status of all SIM cards in multi-screen collaboration scenarios, avoiding redundant processing and resource waste, and ensuring the smooth operation of collaborative calls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116367214B_ABST
    Figure CN116367214B_ABST
Patent Text Reader

Abstract

The application discloses a call state monitoring method and device, and a storage medium, and belongs to the technical field of terminals. If multi-screen cooperation is performed with a second device, the identity of each SIM card in all SIM cards installed by the device is acquired; a listener corresponding to each SIM card is created according to the identity of each SIM card in all SIM cards, and the listener corresponding to each SIM card is used for monitoring the call state of the corresponding SIM card, wherein the call state is used for indicating the transition from idle to call or the transition from call to idle; and the listener corresponding to each SIM card in all SIM cards is started to monitor the call state of all SIM cards. In the application, each listener can monitor the call state of the corresponding SIM card, thereby ensuring that the call of the operator can be monitored regardless of which SIM card is used. The business logic of the whole scheme is reasonable, and the monitoring process is simple, convenient and accurate.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application with application number 202111630631.8, application date December 28, 2021, and invention name "Call state monitoring method, device, equipment, storage medium", which is filed with the China Patent Office. TECHNICAL FIELD

[0002] The present application relates to the technical field of terminals, and in particular to a call state monitoring method, device, storage medium. BACKGROUND

[0003] With the rapid development of terminal technology, multi-screen collaboration technology has been widely applied. Multi-screen collaboration refers to mirroring the screen image of a first device (such as a mobile phone) on the interface of a second device (such as a tablet computer) after establishing a connection between the first device and the second device. In this case, the user can operate the screen image of the first device displayed in the interface of the second device to make the first device perform corresponding functions.

[0004] In the multi-screen collaboration scenario, if the first device makes an operator call, it can switch to the second device to collect and play the call voice, that is, it can make a collaborative call. Specifically, when the first device and the second device make a collaborative call, the microphone of the second device collects the call voice of the local user and sends it to the first device, and the first device sends the call voice to the remote call device; the remote call device sends the call voice of the remote user to the first device, and the first device sends the call voice to the second device, which is played by the loudspeaker of the second device.

[0005] If collaborative call needs to be implemented in the case of multi-screen collaboration between the first device and the second device, the first device needs to monitor the call state of the subscriber identity module (SIM) card installed by itself to determine whether to start an operator call. However, in the multi-screen collaboration scenario, if the first device is installed with multiple SIM cards, the call state monitoring of the SIM card will be invalid with a certain probability, which will affect the implementation of the collaborative call. SUMMARY

[0006] The present application provides a call state monitoring method, device, equipment, storage medium and program product, which can simply, quickly and accurately determine the call state of each SIM card in all SIM cards. The technical solution is as follows:

[0007] In a first aspect, a method for monitoring call status is provided. In the method, if a first device cooperates with a second device in multi-screen, the first device acquires an identifier of each SIM card installed in the first device. Then, the first device creates a listener corresponding to each SIM card according to the identifier of each SIM card, and the listener corresponding to each SIM card is used to monitor the call status of the corresponding SIM card. The first device starts the listeners corresponding to each SIM card to monitor the call status of all SIM cards.

[0008] Multi-screen cooperation refers to displaying the screen of the first device on the interface of the second device. That is, after the first device cooperates with the second device in multi-screen, the screen of the first device is displayed on the interface of the second device. In this case, the user can operate the screen of the first device displayed in the interface of the second device to make the first device perform corresponding functions.

[0009] The first device is a device capable of carrier call. One or more SIM cards can be installed in the first device, and the first device can use any one of the one or more SIM cards to make carrier call. The one or more SIM cards installed in the first device have identifiers. For any one of the SIM cards, the identifier of the SIM card is used to uniquely identify the SIM card.

[0010] The listener corresponding to each SIM card is created according to the identifier of the SIM card, and is used to monitor the call status of the corresponding SIM card. That is, for any one of the SIM cards installed in the first device, the first device can create a listener corresponding to the SIM card according to the identifier of the SIM card, and the listener corresponding to the SIM card is used to monitor the call status of the SIM card.

[0011] The call status is used to indicate the transition from idle to call, or the transition from call to idle. For a SIM card, if the SIM card is idle, it means that the SIM card is not used for carrier call; if the SIM card is in call, it means that the SIM card is being used for carrier call. In this case, if the first device starts carrier call using the SIM card, the call status of the SIM card will change from idle to call. Then, if the first device hangs up the carrier call made by the SIM card, the call status of the SIM card will change from call to idle.

[0012] The listener is a listening interface, which is used to receive a call state change event of the SIM card, and based on which the call state of the SIM card can be determined. For example, when a call state change occurs in a SIM card, that is, when the call state of the SIM card changes from idle to in-call or from in-call to idle, a call state change event is generated. At this time, the listener corresponding to the SIM card can receive the call state change event of the SIM card, and based on the call state change event, it can be determined whether the call state of the SIM card changes from idle to in-call or from in-call to idle.

[0013] In the present application, after the first device starts the listener corresponding to each SIM card in all SIM cards, the call state of each SIM card can be listened to by the corresponding listener. In this case, whether the first device is installed with one SIM card or multiple SIM cards, the call state of each SIM card is listened to by the corresponding listener. In this way, whether the first device uses the installed SIM card to make a carrier call, it can be timely listened to, and the first device can also execute corresponding business processing accordingly. The business logic of the whole scheme is reasonable, the listening process is simple, convenient and accurate, and redundant processing and resource waste are avoided.

[0014] The first device can have one or more card slots, each of which is used to install a SIM card, that is, each card slot is corresponding to the SIM card installed thereon. After a SIM card is installed into a card slot in the first device, the first device can use the SIM card to make a call or receive an incoming call, that is, the SIM card can be used to make a carrier call. In this case, the operation of the first device to obtain the identifier of each SIM card in all subscriber identification modules (SIM) cards installed in the first device can be that the first device obtains the identifier of each card slot in all card slots in the first device for installing a SIM card, and respectively obtains the identifier of the SIM card installed in each card slot according to the identifier of each card slot in all card slot identifiers.

[0015] As an example, the listener can be registered by a call management object. The call management object is used to manage the call state of the SIM card. For example, the call management object can be a phone service manager, which is a service class for managing the call state and network information. In this case, the operation of the first device to create the listener corresponding to each SIM card according to the identifier of each SIM card in all SIM cards can be that for each SIM card in all SIM cards, the first device creates a call management object corresponding to the SIM card according to the identifier of the SIM card, and then registers a listener as the listener corresponding to the SIM card through the call management object corresponding to the SIM card.

[0016] Since the call management object corresponding to the SIM card is created according to the identifier of the SIM card, the call management object corresponding to the SIM card is used to manage the call state of the SIM card. In this case, the listener registered by the call management object corresponding to the SIM card is also used to listen to the call state of the SIM card, that is, the listener registered by the call management object corresponding to the SIM card is also the listener corresponding to the SIM card.

[0017] In this case, if only one SIM card is installed in the first device, only the listener corresponding to the SIM card is registered, and when the call state of the SIM card changes, the event notification will be received in the corresponding listener. If multiple SIM cards are installed in the first device, the corresponding listeners are registered for the multiple SIM cards respectively, and when the call state of each SIM card changes, the event notification will be received in the corresponding listener.

[0018] As an example, in the scenario of multi-screen collaboration, the first device can automatically perform collaborative call when performing operator call by default, that is, automatically switch the call voice to the second device that collaborates with the first device when performing operator call by default. Alternatively, the user can manually enable the collaborative call function in the first device, such as the user can open the switch for switching the call voice to the second device from the notification bar of the first device or the second device to enable the collaborative call function, thereby instructing the first device to automatically perform collaborative call when performing operator call.

[0019] In this case, for any one of all the SIM cards installed in the first device, the SIM card can be referred to as a target SIM card. If the first device listens to the call state of the target SIM card changing from idle to in-call through the listener corresponding to the target SIM card, it indicates that the first device starts to perform operator call using the target SIM card, and the first device can perform collaborative call to perform collection and playing of operator call voice by the second device that collaborates with the first device during the process of performing operator call using the target SIM card. After that, if the first device listens to the call state of the target SIM card changing from in-call to idle through the listener corresponding to the target SIM card, it indicates that the first device has hung up the operator call performed by the target SIM card, and the first device can end the collaborative call to stop the second device from collecting and playing the operator call voice. In this way, the start and end of the collaborative call can be flexibly and accurately realized.

[0020] The first device performs the collaborative call in the process of the operator call using the target SIM card, which refers to switching the call voice of the operator call using the target SIM card of the first device to the second device, and collecting and playing the call voice by the second device. Specifically, when the first device and the second device perform the collaborative call, the microphone of the second device collects the call voice of the local user and sends it to the first device, and the first device sends the call voice to the remote call device; the remote call device sends the call voice of the remote user to the first device, and the first device sends the call voice to the second device, and the loudspeaker of the second device plays the call voice.

[0021] After that, if the first device hangs up the operator call by the target SIM card, it means that the first device has no need for collaborative call, and then the first device can end the collaborative call. In this case, the collection and playing of the operator call voice return to the original state, i.e., switching back to the first device.

[0022] In the second aspect, a call state monitoring device is provided, which has the function of implementing the behaviors of the call state monitoring method in the first aspect. The call state monitoring device includes at least one module for implementing the call state monitoring method provided in the first aspect.

[0023] In the third aspect, a call state monitoring device is provided, which includes a processor and a memory in its structure. The memory is used to store programs supporting the call state monitoring device to execute the call state monitoring method provided in the first aspect, and to store data involved in the call state monitoring method in the first aspect. The processor is configured to execute the programs stored in the memory. The call state monitoring device can also include a communication bus for establishing a connection between the processor and the memory.

[0024] In the fourth aspect, a computer readable storage medium is provided, which stores instructions that, when executed on a computer, cause the computer to execute the call state monitoring method in the first aspect.

[0025] In the fifth aspect, a computer program product containing instructions is provided, which, when executed on a computer, causes the computer to execute the call state monitoring method in the first aspect.

[0026] The technical effects obtained by the second aspect, the third aspect, the fourth aspect and the fifth aspect are similar to the technical effects obtained by the corresponding technical means in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0027] Figure 1 is a structural schematic diagram of a terminal provided by an embodiment of the present application;

[0028] Figure 2 is a block diagram of a software system of a terminal provided by an embodiment of the present application;

[0029] Figure 3 is an interface schematic diagram of a tablet computer provided by an embodiment of the present application;

[0030] Figure 4 is an interface schematic diagram of a mobile phone provided by an embodiment of the present application;

[0031] Figure 5 is another interface schematic diagram of a tablet computer provided by an embodiment of the present application;

[0032] Figure 6 is another interface schematic diagram of a mobile phone provided by an embodiment of the present application;

[0033] Figure 7 is an interface schematic diagram in a multi-screen cooperation scenario provided by an embodiment of the present application;

[0034] Figure 8 is another interface schematic diagram in a multi-screen cooperation scenario provided by an embodiment of the present application;

[0035] Figure 9 is a schematic diagram of a multi-screen cooperation system provided by an embodiment of the present application;

[0036] Figure 10 is a flowchart of a call state monitoring method provided by an embodiment of the present application;

[0037] Figure 11 is a schematic diagram of a call state monitoring method provided by the related art;

[0038] Figure 12 is a schematic diagram of a call state monitoring method provided by an embodiment of the present application;

[0039] Figure 13 is a structural schematic diagram of a call state monitoring apparatus provided by an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0041] It should be understood that the "multiple" mentioned in the present application refers to two or more than two. In the description of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; "and / or" herein only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, in order to clearly describe the technical solutions of the present application, the same items or similar items with basically the same function and role are distinguished by using "first", "second", etc. The skilled in the art can understand that "first", "second", etc. do not limit the quantity and execution order, and "first", "second", etc. also do not necessarily mean different.

[0042] Before explaining the call state monitoring method provided by the embodiments of the present application in detail, the terminal involved in the embodiments of the present application is first explained.

[0043] Figure 1 is a structural schematic diagram of a terminal provided by the embodiments of the present application. Referring to Figure 1 , the terminal 100 can 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 loudspeaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a SIM card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0044] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal 100. In other embodiments of the present application, the terminal 100 can include more or fewer components than the illustration, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0045] The processor 110 can include one or more processing units, such as: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (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. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0046] The controller can be the nerve center and command center of the terminal 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0047] The memory in the processor 110 can also be configured to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. Avoid repeated access and reduce the waiting time of the processor 110, thereby improving the efficiency of the system.

[0048] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive the charging input of the wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive the wireless charging input through the wireless charging coil of the terminal 100. The charging management module 140 charges the battery 142 while also supplying power to the terminal 100 through the power management module 141.

[0049] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 can also be configured to monitor parameters such as the battery capacity, the number of battery cycles, the state of health of the battery (leakage, impedance), and the like. In some embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can be disposed in the same device.

[0050] The wireless communication function of the terminal 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, and the like.

[0051] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, and the like, applied to the terminal 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and perform filtering, amplification, and the like on the received electromagnetic waves, and transmit the processed signals to the modem processor for demodulation. The mobile communication module 150 can also amplify signals modulated by the modem processor, and radiate the signals as electromagnetic waves through the antenna 1. In some embodiments, at least part of the function modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the function modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be disposed in the same device.

[0052] The wireless communication module 160 can provide solutions for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 can also receive signals to be transmitted from the processor 110, frequency-modulate them, amplify them, and radiate them as electromagnetic waves via the antenna 2.

[0053] The terminal 100 can implement a display function through a GPU, a display screen 194, an application processor, etc. The GPU is a microprocessor for image processing, 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 can include one or more GPUs that execute program instructions to generate or change display information.

[0054] The terminal 100 can implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, etc.

[0055] 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 terminal 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, music, video, etc. files are saved in the external memory card.

[0056] The internal memory 121 can be used to store computer executable program codes including instructions. The processor 110 performs various functional applications and data processing of the terminal 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. The data storage area can store data (such as audio data, a phone book, etc.) created by the terminal 100 during use, and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.

[0057] The terminal 100 can realize audio functions such as music playing, recording, etc. through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc.

[0058] The audio module 170 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or part of the functions of the audio module 170 can be disposed in the processor 110.

[0059] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or pulled out of the SIM card interface 195 to realize contact and separation with the terminal 100. The terminal 100 can support one or N SIM card interfaces, N being an integer greater than 1. The SIM card interface 195 can support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can simultaneously insert multiple cards. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external storage cards. The terminal 100 interacts with the network through the SIM card to realize functions such as calling and data communication. In some embodiments, the terminal 100 adopts an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal 100 and cannot be separated from the terminal 100.

[0060] Next, the software system of the terminal 100 is described.

[0061] The software system of the terminal 100 can employ a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. Embodiments of the present application take an Android system with a layered architecture as an example to exemplarily illustrate the software system of the terminal 100.

[0062] Figure 2 is a block diagram of a software system of a terminal 100 provided by an embodiment of the present application. Referring to Figure 2 , the layered architecture divides software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Android runtime and a system layer, and a kernel layer.

[0063] The application layer can include a series of application packages. As shown in Figure 2 , the application packages can include multi-screen collaboration, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, short message, and the like. The multi-screen collaboration application is used to start the multi-screen collaboration function.

[0064] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The application framework layer includes some pre-defined functions. As shown in Figure 2As shown, the application framework layer can include a distributed mobile sensing development platform (DMSDP), a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc. The window manager is used to manage window programs. The DMSDP is used to listen to the call state of the SIM card when multi-screen cooperation is performed, and to realize cooperative calls accordingly. The window manager can acquire the size of the display screen, judge whether there is a status bar, lock the screen, intercept the screen, etc. The content provider is used to store and acquire data, and to enable the data to be accessed by application programs, which can include videos, images, audios, dialed and received calls, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as a control for displaying text, a control for displaying pictures, etc. The view system can be used to build the display interface of an application program, which can be composed of one or more views, such as a view for displaying a short message notification icon, a view for displaying text, and a view for displaying pictures. The phone manager is used to provide the communication function of the terminal 100, such as the management of the call state (including connection, disconnection, etc.). The resource manager provides various resources for application programs, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables application programs to display notification information in the status bar, which can be used to convey messages of the notification type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloading, message reminders, etc. The notification manager can also be a notification in the form of a chart or a scroll bar text in the top status bar of the system, such as a notification of an application program running in the background. The notification manager can also be a notification in the form of a dialog window on the screen, such as a text information prompt in the status bar, a prompt sound, an electronic device vibration, a flashing indicator light, etc.

[0065] The Android Runtime includes a core library and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core library contains two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java file of the application layer and the application framework layer into a binary file. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.

[0066] The system library can include a plurality of functional modules, such as a surface manager, media libraries, a three-dimensional graphics processing library (such as OpenGL ES), a 2D graphics engine (such as SGL), and the like. The surface manager is used to manage a display subsystem and provides a plurality of applications with a fusion of 2D and 3D layers. The media libraries support playback and recording of a plurality of commonly used audio, video formats, and still image files, and the like. The media libraries can support a plurality of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, and the like. The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing, and the like. The 2D graphics engine is a drawing engine for 2D drawing.

[0067] The kernel layer is a layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.

[0068] The application scenarios related to the embodiments of the present application are described below.

[0069] In the case of multi-screen cooperation between a mobile phone and a tablet computer, if the mobile phone makes an operator call, the mobile phone can be switched to the tablet computer to collect and play call voice, that is, cooperative call can be made. If cooperative call needs to be implemented in the case of multi-screen cooperation between the mobile phone and the tablet computer, the mobile phone needs to monitor the call state of the SIM card installed in the mobile phone to determine whether the mobile phone starts an operator call. When the mobile phone monitors that the call state of the SIM card changes from idle to in-call, it is determined that the mobile phone starts an operator call, and then the mobile phone can be switched to the tablet computer to collect and play call voice.

[0070] However, at present, when monitoring the call state, the call state of the SIM card in the main card slot is monitored by default. This results in that in the case of inserting two SIM cards in the mobile phone, when the mobile phone makes an operator call using the SIM card in the secondary card slot, the mobile phone cannot monitor the started operator call, and cannot be switched to the tablet computer to collect and play call voice. In this case, when the mobile phone makes an operator call using the SIM card in the secondary card slot, the expected call voice is on the tablet computer side, but the actual call voice is still on the mobile phone side, and cooperative call fails.

[0071] Therefore, the embodiments of the present application provide a call state monitoring method, which can simply, quickly, accurately and efficiently monitor the call states of all SIM cards installed in the mobile phone in the case of multi-screen cooperation between the mobile phone and the tablet computer.

[0072] The following describes several possible connection modes of multi-screen cooperation by taking multi-screen cooperation between a mobile phone and a tablet computer as an example.

[0073] 1. Establish a connection via Bluetooth.

[0074] For example, if a user wants to work collaboratively with their phone and tablet, they can first turn on Bluetooth on both the phone and tablet. Then, the user can manually enable the multi-screen collaboration function on their phone. For instance, the user can find the "Multi-screen Collaboration" switch in the phone's interface through "Settings" - "More Connections" - "Multi-screen Collaboration" and turn it on to enable the phone's multi-screen collaboration function.

[0075] See Figure 3 The diagram shown is a schematic of the tablet computer interface, as follows: Figure 3 As shown in Figure (a), the user swipes down from the tablet's status bar to access a notification panel, which includes a "Multi-screen Collaboration" option 31. When the user taps the "Multi-screen Collaboration" option 31, the tablet responds by displaying a first prompt window. This first prompt window includes instructions on how to perform the multi-screen collaboration. For example, as shown in Figure (a),... Figure 3 As shown in Figure (b), the first operation prompt includes "1. Turn on your phone's Bluetooth and bring it close to the device. Once the device is detected, click 'Connect'".

[0076] 2. After connecting, you can operate your phone on your tablet and share data between the devices. The system will then display a prompt stating, "..." Users can then perform the corresponding operations based on the initial prompts, such as bringing their phone close to the tablet.

[0077] In one example, see Figure 4 The diagram shown illustrates the phone's interface. As the phone approaches the tablet, a second prompt window appears when the phone detects the tablet. Figure 4 As shown in Figure (a), the second prompt window includes the prompt "Establish collaborative connection with the discovered device?", as well as "Connect" option 41 and "Cancel" option 42. When the user clicks "Connect" option 41, it indicates that the user confirms the establishment of a collaborative connection. The phone responds to the user's trigger operation on "Connect" option 41 and establishes a collaborative connection with the tablet via Bluetooth. When the user clicks "Cancel" option 42, it indicates that the user does not want to establish a collaborative connection. The phone responds to the user's trigger operation on "Cancel" option 42 and does not perform the operation of establishing a collaborative connection. In another example, when the phone is near the tablet, it may not display the second prompt window when it discovers the tablet, but instead automatically establish a collaborative connection with the tablet via Bluetooth.

[0078] As an example but not limitation, in the process that the phone establishes the collaborative connection with the tablet through Bluetooth, in order to display the progress of establishing the collaborative connection, the phone can also display a third prompt window for indicating that the connection is being established, for example, a third prompt window as shown in (b) of FIG. 10 can be displayed. Optionally, the third prompt window includes a "cancel" option, so that the user can cancel the connection at any time if needed. Figure 4

[0079] 2. Establish the connection by scanning the code.

[0080] As an example, the user can find the button of "scan code to connect" in the interface of the tablet through the path of "my phone" - "connect immediately" - "scan code to connect", the user clicks the button, and the tablet displays a two-dimensional code for establishing the collaborative connection in response to the triggering operation of the user on the button, for example, a two-dimensional code as shown in (a) of FIG. 11 can be displayed. Optionally, the tablet can also display second operation prompt information for prompting the user how to operate to realize the multi-screen collaboration, for example, as shown in (b) of FIG. 11, the second operation prompt information can be "use the browser of the phone to scan the code to connect". Figure 5 Figure 5

[0081] In an example, referring to the interface diagram of the phone as shown in (a) of FIG. 12, the user can enter the interface in which the "scan code" option is displayed in the browser (or intelligent vision) of the phone, for example, the user can enter the interface of the browser as shown in (a) of FIG. 12, in which the "scan code" option 61 is displayed. The user can click the "scan code" option 61, and the phone starts the camera in response to the triggering operation of the user on the "scan code" option 61, and displays the scan code interface as shown in (b) of FIG. 12, so that the user can perform the scan code operation by aiming the camera at the two-dimensional code displayed by the tablet. Figure 6 Figure 6 Figure 6

[0082] In an example, after the phone successfully scans the code, the phone sends a request for establishing the collaborative connection to the tablet. After receiving the request sent by the phone, the tablet can display a fourth prompt window, the fourth prompt window includes prompt information for prompting the user whether to agree to establish the collaborative connection, for example, the prompt information can include the prompt content of "xx device requests to establish the collaborative connection with this end, do you agree to establish the collaborative connection?", and "agree" option and "reject" option. When the user clicks the "agree" option, it means that the user allows the phone to establish the collaborative connection with the tablet, and the tablet establishes the collaborative connection with the phone in response to the triggering operation of the user on the "agree" option. When the user clicks the "reject" option, it means that the user does not allow the phone to establish the collaborative connection with the tablet, and the tablet notifies the phone that the establishment of the collaborative connection fails in response to the triggering operation of the user on the "reject" option. ​​​​​​

[0083] It should be noted that the above is only an example of opening the two-dimensional code by the user in the tablet computer through the path of "My Phone"-"Connect Immediately"-"Scan Code to Connect". Alternatively, the two-dimensional code can also be opened through other paths. For example, as shown in (b) of FIG. 1, in addition to the first operation prompt information, the first prompt window also includes the prompt content of "Can't find the local machine? You can also scan the code to connect", wherein the four words "scan code to connect" are triggerable. The user can click the "scan code to connect" content in the first prompt window, and the tablet computer displays the two-dimensional code as shown in (c) of FIG. 1 in response to the trigger operation of the user on the "scan code to connect" content. In this way, the user can scan the two-dimensional code displayed by the tablet computer through the mobile phone, thereby establishing a collaborative connection in the form of scanning the code. Figure 3 Figure 5

[0084] 3. Establish a connection through a tap-to-tap manner.

[0085] The user can turn on the NFC and multi-screen collaboration function in the mobile phone and the tablet computer. Then, the user touches the NFC area on the back of the mobile phone (usually located around the camera on the back of the mobile phone) to the NFC area of the tablet computer (usually located in the lower right corner area of the tablet computer), and the mobile phone and the tablet computer establish a collaborative connection through NFC in response to the touch operation of the user. Alternatively, before establishing a collaborative connection through NFC, the tablet computer and the mobile phone can also prompt the user whether to agree to establish a collaborative connection, and after the user agrees to establish a collaborative connection, the mobile phone and the tablet computer perform the operation of establishing a collaborative connection. In one example, when the mobile phone and the tablet computer successfully establish a collaborative connection, the mobile phone can also remind the user through vibration or ringing.

[0086] It should be noted that the above several possible connection methods are examples of being achieved through a wireless connection manner. In another embodiment, it can also be achieved through a wired connection manner, such as through a Type-C to high-definition multimedia interface (HDMI) connection line, and the present application embodiment does not limit this.

[0087] After the mobile phone and the tablet computer successfully establish a collaborative connection, the tablet computer mirrors the screen picture of the mobile phone as shown in (a) of FIG. 2. In this way, the user can operate the screen picture of the mobile phone displayed by the tablet computer according to the needs, so that the mobile phone performs the corresponding function. In one example, the mobile phone and the tablet computer synchronously display as shown in (b) of FIG. 2. Figure 7 Figure 7 ​​​The main interface of the phone is shown. If the user wants to make a call, the user can click the icon for making a call in the main interface of the phone displayed by the tablet computer to open the dialing interface of the phone. At this time, the phone and the tablet computer synchronously display the dialing interface of the phone. Then the user can make a dialing operation in the dialing interface of the phone displayed by the tablet computer to make a call in the phone.

[0088] After the call is made in the phone, if the phone starts to make a carrier call, as shown in Figure 8 , the phone and the tablet computer synchronously display the call interface of the phone. During the carrier call of the phone, the switching to the tablet computer for collecting and playing the call voice can be selected, that is, the collaborative call can be made. Specifically, during the collaborative call of the phone and the tablet computer, the microphone of the tablet computer collects the call voice of the local user and sends the call voice to the phone, and the phone sends the call voice to the remote call device; the remote call device sends the call voice of the remote user to the phone, and the phone sends the call voice to the tablet computer, and the loudspeaker of the tablet computer plays the call voice.

[0089] For example, after the phone and the tablet computer are in the multi-screen collaboration, if the phone starts to make a carrier call, as shown in Figure 8 , after the user pulls down the notification bar of the tablet computer in the tablet computer, the notification bar of the tablet computer can display the prompt content of "collaborated to the phone", and the notification bar can further include a switch for switching the call voice to the tablet computer. The user can operate the switch according to the requirement to indicate whether to switch the call voice to the tablet computer, that is, whether to make the collaborative call. Alternatively, the user can also pull down the notification bar of the phone in the phone, and the notification bar of the phone can display the prompt content of "collaborated to the tablet computer", and the notification bar can further include a switch for switching the call voice to the tablet computer. The user can operate the switch according to the requirement to indicate whether to make the collaborative call. If during the carrier call of the phone, the user indicates to switch the call voice to the tablet computer, that is, to make the collaborative call, by operating the switch for switching the call voice to the tablet computer in the tablet computer or the phone, the collection and playing of the call voice of the carrier call of the phone being made are executed on the tablet computer side. If during the carrier call of the phone, the user indicates not to switch the call voice to the tablet computer, that is, not to make the collaborative call, by operating the switch for switching the call voice to the tablet computer in the tablet computer or the phone, the collection and playing of the call voice of the carrier call of the phone being made are still executed on the phone side.

[0090] It is worth noting that in some embodiments, in the scenario of multi-screen cooperation, the phone can also automatically perform the cooperative call by default when the operator call is performed. That is, after the phone cooperates with the tablet, if the phone starts to perform the operator call, the cooperative call can be automatically performed without user operation, that is, the collection and playing of the call voice are automatically switched to the tablet to perform. In this case, if the user does not want to perform the cooperative call, the user can operate the switch for switching the call voice to the tablet on the tablet or the phone to indicate that the call voice is not switched to the tablet, that is, to indicate that the cooperative call is closed, and the call voice is switched back to the phone. At this time, the collection and playing of the call voice of the operator call being performed by the phone are switched back to the phone to continue to perform.

[0091] As can be known from the above description, if it is needed to perform the cooperative call in the case that the phone cooperates with the tablet, the phone needs to listen to the call state of the SIM card installed in the phone to determine whether the phone starts to perform the operator call. When the phone listens to the call state of the SIM card being switched from idle to in-call, it can be determined that the phone starts to perform the operator call, and the phone can be switched to the tablet to perform the collection and playing of the call voice, that is, to perform the cooperative call. Therefore, the embodiment of the present application provides a call state listening method, which can simply, quickly and accurately listen to the call state of all SIM cards installed in the phone in the case that the phone cooperates with the tablet.

[0092] The call state listening method provided by the embodiment of the present application is applied to a multi-screen cooperation system, and the multi-screen cooperation system is described below.

[0093] Figure 9 is a schematic diagram of a multi-screen cooperation system provided by the embodiment of the present application. Referring to Figure 9 , the multi-screen cooperation system can include a first device 901 and a second device 902. The first device 901 and the second device 902 can communicate through wired connection or wireless connection.

[0094] The first device 901 and the second device 902 can both be terminals, which can be the terminal described in the above Figures 1-2 embodiment. For example, the terminal can be a phone, a tablet, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a television, and the like, and the embodiment of the present application does not limit the terminal.

[0095] The first device 901 and the second device 902 can perform multi-screen cooperation. After the first device 901 and the second device 902 perform multi-screen cooperation, the screen picture of the first device 901 can be displayed on the interface of the second device 902.

[0096] The first device 901 and the second device 902 can be terminals of different types or terminals of the same type, and the embodiments of the present application do not limit this. For example, both can be terminals such as mobile phones or tablet computers.

[0097] In a possible implementation, the screen size of the first device 901 is smaller than the screen size of the second device 902, so that when the small screen and the large screen perform multi-screen cooperation, the screen picture of the small screen is displayed as a window on the interface of the large screen, and the user can operate the screen picture of the small screen in the interface of the large screen, thereby improving the operation experience of the user. For example, the first device 901 is a mobile phone, and the second device 902 is a tablet computer or a television. Or, the first device 901 is a tablet computer, and the second device 902 is a television. Of course, the screen size of the first device 901 can also be larger than the screen size of the second device 902. For example, the first device 901 is a tablet computer, and the second device 902 is a mobile phone.

[0098] In the case where the first device 901 and the second device 902 perform multi-screen cooperation, the first device 901 needs to monitor the call state of the SIM card installed in the first device 901, to determine whether the first device 901 starts to perform an operator call, and thereby determine whether to switch to the second device 902 to collect and play the call voice, that is, whether to perform collaborative call. The call state monitoring method provided in the embodiments of the present application is applied to the scenario where the first device 901 and the second device 902 perform multi-screen cooperation. In this case, the first device 901 can simply, quickly and accurately monitor the call state of all SIM cards installed in the first device 901 by executing the call state monitoring method provided in the embodiments of the present application while performing multi-screen cooperation with the second device 902.

[0099] The call state monitoring method provided in the embodiments of the present application is explained and described in detail below.

[0100] Figure 10 is a flowchart of a call state monitoring method provided in the embodiments of the present application, and the method is applied to a first device. The first device and a second device can perform multi-screen cooperation, and the multi-screen cooperation means that the screen picture of the first device is displayed on the interface of the second device. Referring to Figure 10 , the method comprises the following steps.

[0101] Step 1001: If the first device and the second device perform multi-screen cooperation, the first device obtains the identity of each SIM card in all SIMs installed in the first device.

[0102] After the first device and the second device perform the multi-screen cooperation, the screen picture of the first device is displayed on the interface of the second device. In this case, the user can operate the screen picture of the first device displayed in the interface of the second device to make the first device perform corresponding functions. The first device and the second device can perform the multi-screen cooperation in various possible manners, for example, the multi-screen cooperation can be performed through Bluetooth, code scanning, and bumping, which have been described in detail above, and thus the embodiments of the present application will not be described herein again.

[0103] The first device is a device capable of performing carrier call. One or more SIM cards can be installed in the first device, and the first device can perform carrier call by using any one of the one or more SIM cards. For example, in the case where the first device is installed with only one SIM card, the first device can directly perform carrier call by using the SIM card, for example, the first device can make a call by using the SIM card or receive an incoming call by using the SIM card. In the case where the first device is installed with multiple SIM cards, the first device can perform carrier call by using one of the multiple SIM cards, for example, the first device can make a call by using the SIM card or receive an incoming call by using the SIM card.

[0104] In the case where the first device and the second device perform the multi-screen cooperation, the user can directly perform operation in the first device to make the first device start performing carrier call, or the user can perform operation in the second device to make the first device start performing carrier call.

[0105] Hereinafter, several possible operation manners are described by taking the case where the user makes a call in the first device to start performing carrier call as an example.

[0106] In the first possible operation manner, if the user wants to make a call in the first device, the user can directly perform operation in the first device to achieve the purpose.

[0107] For example, the user can click the icon of making a call in the main interface of the first device to open the dialing interface of the first device, and then the user can perform dialing operation in the dialing interface of the first device to make a call in the first device to start performing carrier call. In the case where the first device is installed with only one SIM card, the user can directly perform dialing operation in the dialing interface of the first device, so as to make a call in the first device by using the SIM card. In the case where the first device is installed with multiple SIM cards, the user can first select one of the SIM cards in the dialing interface of the first device, and then perform dialing operation in the dialing interface of the first device, so as to make a call in the first device by using the selected SIM card.

[0108] In a second possible operation mode, if the user wants to make a call in the first device, the user can perform an operation on the second device in multi-screen cooperation with the first device to achieve the operation.

[0109] For example, after the first device and the second device are in multi-screen cooperation, the first device and the second device synchronously display the home interface of the first device, the user can click the icon of making a call in the home interface of the first device displayed by the second device to open the dialing interface of the first device, at this time, the first device and the second device synchronously display the dialing interface of the first device, and then the user can perform a dialing operation in the dialing interface of the first device displayed by the second device to make a call in the first device to start the carrier call. In the case that the first device is installed with only one SIM card, the user can directly perform a dialing operation in the dialing interface of the first device displayed by the second device, so as to make a call in the first device using the SIM card. In the case that the first device is installed with multiple SIM cards, the user can first select a SIM card in the dialing interface of the first device displayed by the second device, and then perform a dialing operation in the dialing interface of the first device displayed by the second device, so as to make a call in the first device using the selected SIM card.

[0110] In a third possible operation mode, if the user wants to make a call in the first device, the user can perform an operation on both the first device and the second device in multi-screen cooperation with the first device to achieve the operation.

[0111] For example, after the first device and the second device are in multi-screen cooperation, the first device and the second device synchronously display the home interface of the first device, the user can click the icon of making a call in the home interface of the first device displayed by the second device to open the dialing interface of the first device, at this time, the first device and the second device synchronously display the dialing interface of the first device, and then the user can perform a dialing operation in the dialing interface of the first device to make a call in the first device to start the carrier call. In the case that the first device is installed with only one SIM card, the user can directly perform a dialing operation in the dialing interface of the first device, so as to make a call in the first device using the SIM card. In the case that the first device is installed with multiple SIM cards, the user can first select a SIM card in the dialing interface of the first device, and then perform a dialing operation in the dialing interface of the first device, so as to make a call in the first device using the selected SIM card.

[0112] For example, after the first device and the second device perform multi-screen cooperation, the first device and the second device synchronously display the main interface of the first device, and the user can click the icon of dialing a phone in the main interface of the first device to open the dialing interface of the first device. At this time, the first device and the second device synchronously display the dialing interface of the first device, and then the user can perform dialing operation in the dialing interface of the first device displayed by the second device to dial a phone in the first device to start the carrier call. In the case where the first device is installed with only one SIM card, the user can directly perform dialing operation in the dialing interface of the first device displayed by the second device, so as to dial a phone in the first device by using the SIM card. In the case where the first device is installed with multiple SIM cards, the user can first select a SIM card in the dialing interface of the first device displayed by the second device, and then perform dialing operation in the dialing interface of the first device displayed by the second device, so as to dial a phone in the first device by using the selected SIM card.

[0113] The following describes several possible operation modes by taking the case of answering an incoming phone in the first device to start the carrier call as an example.

[0114] The first possible operation mode is that when the first device has an incoming phone, if the user wants to answer the incoming phone in the first device, the user can perform operation in the first device to achieve the purpose.

[0115] For example, when the first device has an incoming phone, the first device displays the incoming call interface, and the user can click the answer button in the incoming call interface of the first device to answer the incoming phone in the first device to start the carrier call. In the case where the first device is installed with only one SIM card, the incoming phone in the first device is the phone incoming to the SIM card, so as to answer the phone in the first device by using the SIM card. In the case where the first device is installed with multiple SIM cards, the incoming phone in the first device is the phone incoming to one of the multiple SIM cards, so as to answer the phone in the first device by using the SIM card.

[0116] The second possible operation mode is that when the first device has an incoming phone, if the user wants to answer the incoming phone in the first device, the user can perform operation in the second device performing multi-screen cooperation with the first device to achieve the purpose.

[0117] For example, after the first device cooperates with the second device, if the first device has an incoming call, the first device and the second device will synchronously display the incoming call interface of the first device, and the user can click the answer button in the incoming call interface of the first device displayed on the second device to answer the incoming call in the first device to start the carrier call. In the case that the first device has only one SIM card, the incoming call in the first device is the call to the SIM card, and thus the call is answered in the first device using the SIM card. In the case that the first device has multiple SIM cards, the incoming call in the first device is the call to one of the multiple SIM cards, and thus the call is answered in the first device using the SIM card.

[0118] The one or more SIM cards installed in the first device have an identifier (which can be referred to as subID). For any SIM card, the identifier of the SIM card is used to uniquely identify the SIM card.

[0119] The first device can have one or more card slots, and each card slot is used to install a SIM card, that is, each card slot corresponds to the SIM card installed thereon. After a SIM card is installed into a card slot in the first device, the first device can use the SIM card to make a call or answer an incoming call, that is, the first device can use the SIM card to make a carrier call.

[0120] In this case, the operation of the first device obtaining the identifier of each SIM card of all the SIM cards installed in the first device can be that the first device obtains the identifier of each card slot of all the card slots in the first device for installing a SIM card, and then obtains the identifier of the SIM card installed in each card slot according to the identifier of each card slot.

[0121] The one or more card slots in the first device have an identifier. For any card slot, the identifier of the card slot is used to uniquely identify the card slot. The first device stores the identifier of each card slot in all the card slots in advance.

[0122] As an example, the first device can store a correspondence between the card slot identifier and the SIM card identifier, and the correspondence includes the identifier of each card slot of all the card slots in the first device. For any card slot of all the card slots in the first device, if a SIM card is inserted into the card slot, the first device can store the identifier of the SIM card as the SIM card identifier corresponding to the identifier of the card slot in the correspondence. If the SIM card is removed from the card slot, the first device can delete the SIM card identifier corresponding to the identifier of the card slot in the correspondence, and at this time, the identifier of the card slot has no corresponding SIM card identifier in the correspondence.

[0123] For example, the correspondence between the card slot identifier and the SIM card identifier can be as shown in Table 1. In the correspondence shown in Table 1, the card slot identifier 1 corresponds to the SIM card identifier 1, and the card slot identifier 2 has no corresponding SIM card identifier. According to the correspondence shown in Table 1, it can be known that the card slot identified by the card slot identifier 1 is installed with the SIM card identified by the SIM card identifier 1, and the card slot identified by the card slot identifier 2 is currently not installed with a SIM card.

[0124] Table 1

[0125] Card slot identification SIM card identification Card slot identification 1 SIM card identification 1 Card slot identification 2

[0126] In the embodiments of the present application, only Table 1 is taken as an example to describe the correspondence between the card slot identifier and the SIM card identifier, and Table 1 does not limit the embodiments of the present application.

[0127] In this case, the operation of the first device obtaining the identifier of the SIM card installed in each card slot according to the identifier of each card slot in all card slot identifiers can be that: for the identifier of each card slot in all card slots in the first device, the first device can obtain the corresponding SIM card identifier from the correspondence between the card slot identifier and the SIM card identifier according to the identifier of the card slot, and the obtained SIM card identifier is the identifier of the SIM card installed in the card slot. If the first device does not obtain the corresponding SIM card identifier from the correspondence between the card slot identifier and the SIM card identifier according to the identifier of the card slot, it indicates that the card slot is currently not installed with a SIM card.

[0128] For example, the first device has two card slots, one card slot is identified by the card slot identifier 1, and the other card slot is identified by the card slot identifier 2. The first device obtains the corresponding SIM card identifier as the SIM card identifier 1 from the correspondence between the card slot identifier and the SIM card identifier shown in Table 1 according to the card slot identifier 1, and the obtained SIM card identifier 1 is the identifier of the SIM card installed in the card slot identified by the card slot identifier 1. Moreover, the second device does not obtain the corresponding SIM identifier from the correspondence between the card slot identifier and the SIM card identifier shown in Table 1 according to the card slot identifier 2, and it can be determined that the card slot identified by the card slot identifier 2 is currently not installed with a SIM card. In this way, the first device obtains the identifier of all SIM cards installed by the first device (i.e., the identifier of the SIM card installed in the card slot identified by the card slot identifier 1) as the SIM card identifier 1.

[0129] As an example, the identification of the SIM card installed in any one card slot can be generated according to the number of SIM cards that have been installed in this card slot. For example, after a SIM card is inserted into a card slot, if this SIM card is the i-th SIM card installed in this card slot, i.e., before this SIM card is installed in this card slot, i-1 SIM cards have been installed in this card slot, the first device can set the identification of this SIM card as i. Here, i is a positive integer.

[0130] That is, the identification of the SIM card installed in this card slot is incremental. For example, for the first SIM card inserted into this card slot, the identification of this first SIM card can be 1. If after this first SIM card is removed, another SIM card is inserted into this card slot, the currently inserted SIM card is the second SIM card inserted into this card slot, and the identification of this second SIM card can be 2. If after this second SIM card is removed, a SIM card is inserted into this card slot, the currently inserted SIM card is the third SIM card inserted into this card slot, and the identification of this third SIM card can be 3.

[0131] Step 1002: The first device creates a listener corresponding to each SIM card according to the identification of each SIM card in all SIM cards.

[0132] The listener corresponding to each SIM card is used to listen to the call state of the corresponding SIM card. That is, for any one SIM card in all SIM cards installed by the first device, the first device can create a listener corresponding to this SIM card according to the identification of this SIM card, and the listener corresponding to this SIM card is used to listen to the call state of this SIM card.

[0133] The call state is used to indicate the transition from idle to offhook, or the transition from offhook to idle. For a SIM card, if this SIM card is idle, it means that this SIM card is not used for operator call; if this SIM card is offhook, it means that this SIM card is used for operator call. In this case, if the first device starts to make an operator call using this SIM card, the call state of this SIM card will change from idle to offhook. After that, if the first device hangs up the operator call made by this SIM card, the call state of this SIM card will change from offhook to idle.

[0134] The listener (also referred to as a listener object) is a listening interface for receiving a call state change event of a SIM card, based on which the call state of the SIM card can be determined. For example, when a call state change occurs in a SIM card, i.e., when the call state of the SIM card changes from idle to in-call or from in-call to idle, a call state change event is generated. At this time, the listener corresponding to the SIM card can receive the call state change event of the SIM card, and based on the call state change event, it can be determined whether the call state of the SIM card changes from idle to in-call or from in-call to idle.

[0135] As an example, the listener can be registered by a call management object. The call management object is used to manage the call state of the SIM card. For example, the call management object can be a TelephonyManager, which is a service class for managing the call state and network information.

[0136] In this case, the operation of the first device for creating the listener corresponding to each SIM card according to the identifier of each SIM card among all the SIM cards can be as follows: for each SIM card among all the SIM cards installed in the first device, the first device creates a call management object corresponding to the SIM card according to the identifier of the SIM card. Then, the first device registers a listener as the listener corresponding to the SIM card through the call management object corresponding to the SIM card.

[0137] Since the call management object corresponding to the SIM card is created according to the identifier of the SIM card, the call management object corresponding to the SIM card is used to manage the call state of the SIM card. In this case, the listener registered by the call management object corresponding to the SIM card is also used to listen to the call state of the SIM card, i.e., the listener registered by the call management object corresponding to the SIM card is also the listener corresponding to the SIM card.

[0138] In this case, if the first device has only one SIM card installed therein, only the listener corresponding to the SIM card is registered, and when the call state of the SIM card changes, an event notification is received in the corresponding listener. If the first device has a plurality of SIM cards installed therein, the listeners corresponding to the plurality of SIM cards are registered, respectively, and when the call state of each SIM card changes, an event notification is received in the corresponding listener.

[0139] Step 1003: The first device starts the listeners corresponding to each SIM card among all the SIM cards to listen to the call states of all the SIM cards, respectively.

[0140] After the first device starts the listener corresponding to each SIM card in all SIM cards, the call state of each SIM card can be monitored by the corresponding listener. In this case, whether the first device is installed with one SIM card or multiple SIM cards, the call state of each SIM card is monitored by the corresponding listener. In this way, no matter which SIM card the first device uses to make a carrier call, it can be monitored in time, and the first device can accordingly perform corresponding business processing.

[0141] As an example, in the scenario of multi-screen cooperation, the first device can automatically make a cooperative call when making a carrier call, i.e., automatically switch the call voice to the second device that cooperates with the first device when making a carrier call. Alternatively, the user can manually start the cooperative call function in the first device, such as opening a switch for switching the call voice to the second device from the notification bar of the first device or the second device to start the cooperative call function, thereby instructing the first device to automatically make a cooperative call when making a carrier call.

[0142] In this case, for any one of the SIM cards installed in the first device, the SIM card can be referred to as a target SIM card. If the first device monitors the call state of the target SIM card to change from idle to in-call through the listener corresponding to the target SIM card, it means that the first device starts to make a carrier call using the target SIM card. Therefore, the first device can make a cooperative call when making a carrier call using the target SIM card, so that the second device that cooperates with the first device can make a carrier call voice collection and play. After that, if the first device monitors the call state of the target SIM card to change from in-call to idle through the listener corresponding to the target SIM card, it means that the first device has hung up the carrier call made by the target SIM card. Therefore, the first device can end the cooperative call to stop the second device from collecting and playing the carrier call voice.

[0143] The first device makes a cooperative call when making a carrier call using the target SIM card, which means that the carrier call voice made by the first device using the target SIM card is switched to the second device, and the second device collects and plays the call voice. Specifically, when the first device and the second device make a cooperative call, the microphone of the second device collects the call voice of the local user and sends it to the first device, and the first device sends the call voice to the remote call device. The remote call device sends the call voice of the remote user to the first device, and the first device sends the call voice to the second device, which is played by the loudspeaker of the second device.

[0144] After that, if the first device hangs up the operator call made by the target SIM card, indicating that the first device has no need for collaborative call, the first device can end the collaborative call. In this case, the collection and playing of the operator call voice return to the original state, i.e., switching back to the first device to perform.

[0145] For ease of understanding, the following takes the first device as a mobile phone and the second device as a tablet computer as an example to illustrate the above call state monitoring method in combination with Figure 11 and Figure 12 .

[0146] Currently, a mobile phone is generally in a dual-card dual standby mode, i.e., the mobile phone has two card slots and can install two SIM cards. However, the traditional call state monitoring method is for a single-card mobile phone, i.e., the traditional call state monitoring method can only monitor the call state of one SIM card. Thus, when the traditional call state monitoring method is applied to a dual-card mobile phone, the call state of the SIM card in the main card slot is monitored by default, and the call state of the SIM card in the secondary card slot cannot be monitored. To solve this problem, the related art adjusts the traditional call state monitoring method. The following illustrates the call state monitoring method in the related art in combination with Figure 11 .

[0147] Figure 11 is a schematic diagram of a call state monitoring method provided by the related art. Referring to Figure 11 , the call state monitoring method can include the following steps A1-A6.

[0148] Step A1: The mobile phone performs multi-screen collaboration with the tablet computer.

[0149] Step A2: The mobile phone registers a listener and starts, and the listener monitors the call state of the SIM card in the main card slot of the mobile phone by default.

[0150] Step A3: If the mobile phone monitors that the call state (i.e., the call state of the SIM card in the main card slot) is changed from idle to in call through the listener, the mobile phone performs collaborative call to switch the call voice to the tablet computer.

[0151] Step A4: If the mobile phone monitors that the call state is changed from in call to idle through the listener, the mobile phone performs step A5.

[0152] Step A5: The mobile phone traverses to obtain the call state of the SIM card in each card slot (i.e., the main card slot and the secondary card slot) in the mobile phone, i.e., the call state of all SIM cards in the mobile phone.

[0153] Step A6: judging whether there is a SIM card in the phone in a call. If all the SIM cards in the phone are idle, ending the collaborative call; if there is a SIM card in the phone in a call, continuing to maintain the collaborative call.

[0154] That is, in the traditional call state monitoring manner, if the phone listens to the call state through the listener and finds that the call state is changed from in-call to idle, the collaborative call is directly ended. This results in that the collaborative call can only be implemented when the phone uses the SIM card in the main card slot to make the operator call, so as to switch the call voice to the tablet computer. However, the collaborative call cannot be implemented when the phone uses the SIM card in the secondary card slot to make the operator call, that is, the call voice switching fails.

[0155] The related technology adjusts the traditional call state monitoring manner. Specifically, when the phone listens to the call state through the listener and finds that the call state is changed from in-call to idle, the call state of the SIM card in each card slot in the phone is reacquired. If there is any SIM card in a call, the collaborative call is continued. In this way, the collaborative call can be successfully implemented whether the phone uses the SIM card in the main card slot or the secondary card slot to make the operator call.

[0156] However, the call state monitoring manner in the related technology has the following problems: 1. Unreasonable business logic: designed to avoid the problems in the traditional call state monitoring manner, only to quickly solve the problem, the business logic is unreasonable. 2. Resource waste: no matter how many SIM cards are in the phone, the call state of the SIM card in each card slot in the phone is reacquired when the call state is changed from in-call to idle, which causes redundant processing and resource waste.

[0157] Therefore, in view of the above problems in the dual-card scenario and the unreasonable related technical solutions, the embodiments of the present application reorganize the business process of call voice switching and propose an optimization scheme. The call state monitoring method provided by the embodiments of the present application will be described below in combination with Figure 12

[0158] Figure 12 is a schematic diagram of a call state monitoring method provided by an embodiment of the present application. Referring to Figure 12 , the call state monitoring method can include the following steps B1-B5.

[0159] Step B1: the phone and the tablet computer perform multi-screen collaboration.

[0160] The phone and the tablet computer can perform multi-screen collaboration in a variety of possible ways, such as through Bluetooth, scanning a code, and bumping, and the like. These ways have been described in detail above, and the embodiments of the present application will not be described again. ​

[0161] Step B2: The mobile phone traverses to obtain the identification of the SIM card in each card slot in all card slots in the mobile phone (i.e. the main card slot and the auxiliary card slot).

[0162] The operation of the mobile phone traversing to obtain the identification of the SIM card in each card slot in all card slots in the mobile phone is the same as the operation of the first device obtaining the identification of the SIM card in each card slot in all card slots in the first device in step 1001, and the embodiments of the present application will not be described here.

[0163] Step B3: The mobile phone registers a corresponding listener for each SIM card according to the identification of each SIM card, and starts each SIM card. The listener corresponding to each SIM card is used to listen to the call state of the corresponding SIM card.

[0164] The operation of the mobile phone registering a corresponding listener for each SIM card according to the identification of each SIM card is the same as the operation of the first device creating a corresponding listener for each SIM card according to the identification of each SIM card in all SIM cards in step 1002, and the embodiments of the present application will not be described here.

[0165] The operation of the mobile phone starting each SIM card to register a corresponding listener is the same as the operation of the first device starting the listener corresponding to each SIM card in all SIM cards in step 1003, and the embodiments of the present application will not be described here.

[0166] That is, in the case that the mobile phone has a main card slot and an auxiliary card slot, the mobile phone registers a listener corresponding to the SIM card in the main card slot according to the identification of the SIM card in the main card slot, and the listener corresponding to the SIM card in the main card slot is used to listen to the call state of the SIM card in the main card slot. And the mobile phone registers a listener corresponding to the SIM card in the auxiliary card slot according to the identification of the SIM card in the auxiliary card slot, and the listener corresponding to the SIM card in the auxiliary card slot is used to listen to the call state of the SIM card in the auxiliary card slot.

[0167] Step B4: If the mobile phone listens to the call state changing from idle to in-call through any one listener, the cooperative call is performed to switch the call voice to the tablet computer.

[0168] When the mobile phone starts to make a carrier call using any one SIM card (such as making a call or receiving an incoming call using the SIM card), the call state of the SIM card will change from idle to in-call, and this change of call state will be listened to by the listener corresponding to the SIM card. In this case, the cooperative call can be performed to collect and play the call voice by the tablet computer during the carrier call of the mobile phone.

[0169] Step B5: If the mobile phone listens to the call state changing from in-call to idle through any one listener, the cooperative call is ended.

[0170] When a mobile phone ends a carrier call that is in progress on a particular SIM card (e.g., when hanging up a call made on that SIM card), the call status of that SIM card will change from "in call" to "idle," and this change in call status will be detected by the listener associated with that SIM card. At this point, the collaborative call can be terminated. After the collaborative call ends, the recording and playback of the call audio will return to their original state, meaning the process will switch back to the mobile phone.

[0171] In the call status monitoring method provided in this application embodiment, a corresponding listener is registered for each SIM card according to the identifier of each SIM card in the mobile phone. Each listener can monitor the call status of its corresponding SIM card. Thus, the mobile phone can monitor the call status of the SIM card in the main SIM slot through the listener corresponding to the SIM card in the main SIM slot, and the call status of the SIM card in the secondary SIM slot through the listener corresponding to the SIM card in the secondary SIM slot. This ensures that regardless of whether the mobile phone uses the SIM card in the main SIM slot or the secondary SIM slot for operator calls, the call status can be monitored, thereby successfully achieving collaborative calling. The entire solution has reasonable business logic, a simple, convenient, and accurate monitoring process, and avoids redundant processing and resource waste.

[0172] Figure 13 This is a schematic diagram of a call monitoring device provided in an embodiment of this application. The device can be implemented as part or all of a computer device by software, hardware, or a combination of both. The computer device can be... Figures 1-2 The terminal described in the embodiment. See also Figure 13 The device includes: an acquisition module 1301, a creation module 1302, and a listening module 1303.

[0173] The acquisition module 1301 is used to acquire the identifier of each SIM card among all the SIM cards installed in itself if it is performing multi-screen collaboration with the second device. Multi-screen collaboration refers to displaying its own screen on the interface of the second device.

[0174] Create module 1302, which is used to create a listener for each SIM card according to the identifier of each SIM card in all SIM cards. The listener for each SIM card is used to monitor the call status of the corresponding SIM card. The call status is used to indicate the transition from idle to call, or the transition from call to idle.

[0175] The monitoring module 1303 is used to activate the monitoring device corresponding to each SIM card in all SIM cards, so as to monitor the call status of each SIM card separately.

[0176] Optionally, the acquisition module 1301 is used for:

[0177] obtain an identity of each of all card slots for installing SIM cards;

[0178] obtain an identity of a SIM card installed in each of all card slots according to the identity of each of all card slots.

[0179] Optionally, the creating module 1302 is configured to:

[0180] For each of all SIM cards, create a call management object corresponding to the SIM card according to the identity of the SIM card, the call management object corresponding to the SIM card being configured to manage a call state of the SIM card.

[0181] Register a listener as a listener corresponding to the SIM card through the call management object corresponding to the SIM card.

[0182] Optionally, the apparatus further comprises:

[0183] The cooperative call module is configured to, if the call state of the target SIM card is switched from idle to in-call through the listener corresponding to the target SIM card, perform a cooperative call in a process of performing an operator call using the target SIM card, so as to collect and play an operator call voice by the second device, the target SIM card being any one of all SIM cards.

[0184] Optionally, the apparatus further comprises:

[0185] The ending module is configured to, if the call state of the target SIM card is switched from in-call to idle through the listener corresponding to the target SIM card, end the cooperative call, so as to stop the collection and playing of the operator call voice by the second device.

[0186] In the embodiments of the present application, the identities of all SIM cards installed by the device are obtained when the multi-screen cooperation is performed, and the listeners corresponding to the SIM cards are registered and started according to the identities of the SIM cards respectively. In this way, each listener can listen to the call state of the SIM card corresponding to the listener, so that the call state of any SIM card can be listened to when the operator call is performed using the SIM card. The business logic of the whole scheme is reasonable, the listening process is simple, convenient and accurate, and redundant processing and resource waste are avoided.

[0187] It should be noted that: the call state listening apparatus provided in the above embodiments is only taken as an example for illustrating the division of the functional modules, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the above described functions.

[0188] The function units and modules in the above embodiments can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit. In addition, the specific names of the function units and modules are only for the purpose of mutual distinction, and do not limit the protection scope of the embodiments of the present application.

[0189] The call state monitoring device and the call state monitoring method provided by the above embodiments belong to the same concept. The specific working process of the units and modules in the above embodiments and the technical effects brought by the units and modules can be referred to the method embodiment part, and will not be described here.

[0190] In the above embodiments, all or part can be realized by software, hardware, firmware or any combination thereof. When realized by software, all or part can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the flow or function described in the embodiments of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, such as the computer instructions can be transferred from one website site, computer, server or data center to another website site, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as digital versatile disc (Digital Versatile Disc, DVD)) or semiconductor media (such as solid state disk (Solid State Disk, SSD)) and the like.

[0191] The above is an optional embodiment provided by the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the technical scope disclosed by the present application shall be included in the protection scope of the present application.

Claims

1. A call state monitoring method applied to a first device comprising a plurality of SIM cards, characterized in that, The method comprises: The first device and the second device perform multi-screen cooperation through a wired connection or a wireless connection, the first device creates a corresponding listener for each SIM card in the plurality of SIM cards, and the listener of each SIM card is used to listen to the call state of the corresponding SIM card, and the call state is used to indicate the transition from idle to in-call or the transition from in-call to idle; The first device starts the listener corresponding to each SIM card in the plurality of SIM cards to listen to the call state of each SIM card in the plurality of SIM cards.

2. The method of claim 1, wherein, Before the first device creates a corresponding listener for each SIM card in the plurality of SIM cards, the first device obtains the identifier of each SIM card installed in the first device.

3. The method of claim 2, wherein, The first device obtains the identifier of each card slot in the plurality of card slots for installing a SIM card in the first device; The first device obtains the identifier of the SIM card installed in each card slot according to the identifier of each card slot in the plurality of card slots. The first device creates a corresponding listener for each SIM card in the plurality of SIM cards, including: the first device creates a corresponding listener for the identifier of each SIM card in the plurality of SIM cards.

4. The method of claim 2, wherein, The first device creates a corresponding listener for each SIM card in the plurality of SIM cards, including:

5. The method of claim 4, wherein, For each SIM card in the plurality of SIM cards, the first device creates a call management object corresponding to the SIM card according to the identifier of the SIM card, and the call management object corresponding to the SIM card is used to manage the call state of the SIM card; The first device registers a listener as the listener corresponding to each SIM card through the call management object corresponding to the SIM card. After the first device starts the listener corresponding to each SIM card in the plurality of SIM cards to listen to the call state of each SIM card in the plurality of SIM cards, the method further comprises:

6. The method of claim 1, wherein, If the first device listens to the call state of the target SIM card from idle to in-call through the listener corresponding to the target SIM card, the first device performs cooperative call in the process of using the target SIM card for operator call to collect and play the voice of the operator call by the second device, and the target SIM card is any one of the plurality of SIM cards. After the first device performs cooperative call in the process of using the target SIM card for operator call, the method further comprises:

7. The method of claim 6, wherein, If the first device listens to the call state of the target SIM card from in-call to idle through the listener corresponding to the target SIM card, the first device ends the cooperative call to stop the second device from collecting and playing the voice of the operator call. ​ 8. A computer device, comprising: The computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program, when executed by the processor, implements the method according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Automatic redial method and device

    CN103002423A

  • Communication method and device for dual SIM, dual standby and single-pass terminal

    WO2017054572A1