CN113949772A - Method and device for simulating incoming call - Google Patents
Method and device for simulating incoming call Download PDFInfo
- Publication number
- CN113949772A CN113949772A CN202111517777.1A CN202111517777A CN113949772A CN 113949772 A CN113949772 A CN 113949772A CN 202111517777 A CN202111517777 A CN 202111517777A CN 113949772 A CN113949772 A CN 113949772A
- Authority
- CN
- China
- Prior art keywords
- incoming call
- interface
- call
- audio
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M3/00—Automatic or semi-automatic exchanges
- H04M3/22—Arrangements for supervision, monitoring or testing
- H04M3/26—Arrangements for supervision, monitoring or testing with means for applying test signals or for measuring
- H04M3/28—Automatic routine testing ; Fault testing; Installation testing; Test methods, test equipment or test arrangements therefor
- H04M3/32—Automatic routine testing ; Fault testing; Installation testing; Test methods, test equipment or test arrangements therefor for lines between exchanges
- H04M3/323—Automatic routine testing ; Fault testing; Installation testing; Test methods, test equipment or test arrangements therefor for lines between exchanges for the arrangements providing the connection (test connection, test call, call simulation)
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the application provides a method and a device for simulating incoming calls, which are applied to electronic equipment, wherein the electronic equipment runs an operating system, and the operating system comprises: the incoming call simulation method comprises the following steps of: the method comprises the steps of obtaining a telephone number of a simulated incoming call through a simulated incoming call interface, responding to a first operation of the simulated incoming call interface, generating incoming call data according to the telephone number and preset parameters, transmitting the incoming call data to an incoming call module, triggering the incoming call module to display an incoming call reminding interface according to the incoming call data, and sending a reminding signal. Because the incoming call data are generated, the incoming call data are used for triggering the incoming call module of the operating system to display the incoming call reminding interface consistent with the real incoming call and send out the reminding signal consistent with the real incoming call, the native incoming call experience of the operating system can be provided under the scene of simulating the incoming call.
Description
Technical Field
The present application relates to the field of electronic information, and in particular, to a method and an apparatus for simulating an incoming call.
Background
The simulated incoming call means that the effect of the incoming call is simulated on the electronic equipment under the condition that the electronic equipment does not have the incoming call. Such as a display interface simulating incoming calls, a ringing pattern, a vibration pattern, etc.
Disclosure of Invention
The application provides a method and a device for simulating an incoming call, and aims to realize the function of simulating the incoming call of electronic equipment.
In order to achieve the above object, the present application provides the following technical solutions:
a first aspect of the present application provides a method for simulating an incoming call, which is applied to an electronic device, where the electronic device runs an operating system, and the operating system includes: the method comprises the following steps that an incoming call reminding interface used for displaying a real incoming call and an incoming call module used for sending out a reminding signal of the real incoming call are used, and the method comprises the following steps: the method comprises the steps of obtaining a telephone number of a simulated incoming call through a simulated incoming call interface, responding to a first operation (such as clicking a confirmed incoming call control shown in figure 6 a) of the simulated incoming call interface, generating incoming call data according to the telephone number and a preset parameter, transmitting the incoming call data to an incoming call module, triggering the incoming call module to display an incoming call reminding interface according to the incoming call data, and sending an (incoming call) reminding signal. Because the incoming call data are generated, the incoming call data are used for triggering the incoming call module of the operating system to display the incoming call reminding interface consistent with the real incoming call and send the incoming call reminding signal consistent with the real incoming call, the native incoming call experience of the operating system can be provided under the scene of simulating the incoming call.
Optionally, the operating system further includes a media player. After the transmitting the incoming call data to the incoming call module, the method further includes: responding to answering operation of the incoming call reminding interface, acquiring conversation audio frequency pre-stored in the electronic equipment through the incoming call module, transmitting the conversation audio frequency to the media player, and triggering the media player to play the conversation audio frequency. Therefore, on the basis of displaying the incoming call reminding interface and the incoming call reminding signal, the method can respond to answering operation and play conversation audio, so that the consistency with real incoming calls can be further improved.
Optionally, the call audio is recorded through the simulated incoming call interface, so that the convenience and flexibility are high, or the call audio is the recording of the real incoming call, so that the experience consistent with the real incoming call can be further enhanced.
Optionally, the incoming call data includes: an identification of the call audio. The obtaining of the conversation audio pre-stored in the electronic device through the incoming call module includes: and triggering the incoming call module to acquire the pre-stored call audio from the electronic equipment according to the identification, and receiving the call audio transmitted by the incoming call module, thereby laying a foundation for playing the call audio.
Optionally, the obtaining, by the incoming call module, a call audio pre-stored in the electronic device in response to the answering operation of the incoming call reminding interface includes: and receiving an incoming call message transmitted by the incoming call module in response to the answering operation, triggering the incoming call module to acquire a conversation audio frequency prestored in the electronic equipment after determining that no media is played, and receiving the conversation audio frequency transmitted by the incoming call module, thereby laying a foundation for playing the conversation audio frequency.
Optionally, the method further includes: and responding to the hang-up operation of the call interface, and informing the media player to stop playing the call audio so as to further keep consistency with the real incoming call.
Optionally, the simulated incoming call interface includes: at least one of a setting control of the telephone number simulating the incoming call and a setting control of the time simulating the incoming call enables a user to flexibly set the telephone number and the time simulating the incoming call.
Optionally, the obtaining of the telephone number of the simulated incoming call through the simulated incoming call interface includes: selecting a contact phone number from the electronic equipment through a contact selection control; or, the control is selected through the attribution to acquire the telephone number of the appointed attribution; or, the telephone number with the specified mark type is acquired through the mark type selection control. Therefore, the simulated incoming call interface can provide a plurality of selection channels of the incoming call number, so that a wider telephone number selection range is provided for a user.
Optionally, the generating incoming call data according to the phone number and the pre-configured parameter includes: and converting the telephone number into a first parameter, generating a telephone account identifier, and registering the pre-configured parameter as the telephone account parameter with the telephone account identifier. The incoming call parameters are generated according to the requirements of the incoming call module, and a foundation is laid for presenting native simulated incoming call experience.
Optionally, the operating system is an android system. The incoming call module comprises: the method comprises the steps of a telephone account number PhoneAccount of an application program framework layer, a telephone management TelecomManager, a connection service ConnectionService and a calling user interface application program and a telephone application program of an application program layer, so that the native experience of simulating incoming calls under the android system is realized.
A second aspect of the application provides an electronic device comprising a memory and at least one processor; the memory is used for storing an application program, and the processor is used for running the application program so as to realize the method for simulating the incoming call provided by the first aspect of the application.
A third aspect of the present application provides a computer-readable storage medium having a program stored thereon, the program, when executed by a computer device, implementing the method for simulating an incoming call provided by the first aspect of the present application.
Drawings
FIGS. 1 a-1 b are exemplary diagrams of a simulated incoming call reminder interface as disclosed in embodiments of the present application;
FIGS. 2 a-2 b are exemplary diagrams of a call interface simulating an incoming call according to an embodiment of the present disclosure;
FIG. 3 is an exemplary diagram of a call information display interface simulating an incoming call as disclosed in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an operating system operating in an electronic device according to an embodiment of the present disclosure;
FIGS. 6a and 6b are exemplary diagrams of a simulated incoming call setup interface disclosed in an embodiment of the present application;
fig. 7 is a flowchart of setting simulated incoming call information in a simulated incoming call method disclosed in an embodiment of the present application;
fig. 8 is a flowchart of a method for simulating incoming calls according to an embodiment of the present disclosure.
Detailed Description
The method and the device for simulating the incoming call can provide the effect of simulating the incoming call consistent with the effect of the real incoming call, namely the simulated incoming call has the original experience of the real incoming call.
Consistent with the effects of a real incoming call include, but are not limited to: the ring tone is consistent with the vibration mode, the display interface is consistent, the operation provided for the user and the response mode to the operation are consistent, and the record of the incoming call information is consistent.
Specifically, the correspondence between the ring tone and the vibration pattern includes, but is not limited to: the type, volume, intensity and pattern of the vibration (such as ring-tone accompanying pattern) of the ring tone are consistent with the actual incoming call.
Display interface consistency includes, but is not limited to:
1. and the incoming call reminding interfaces are consistent.
In some implementations, different incoming call alert interfaces are displayed depending on the mode in which the electronic device is located. For example, the mobile phone is in a screen-locked state, and an example of the incoming call reminder interface is shown in fig. 1a and is a full screen interface. For another example, the mobile phone is in a full screen call reminding interface as shown in fig. 1a, and after the user switches to the desktop or an interface of other services, the call reminding interface is minimized to a "capsule" shape at the top of the desktop as shown in fig. 1 b.
2. The call interfaces are consistent.
The call interface after the incoming call is connected may be displayed as a full screen interface, and the interface includes various controls in the real incoming call interface, taking fig. 2a as an example. After the user switches from the full screen interface of the call to the desktop or other service interface, the call interface may be displayed in a "capsule" form as shown in fig. 2 b. Unlike fig. 1b, the "capsule" shown in fig. 2b displays the talk-time length.
3. The interfaces after the call is finished and refused are consistent.
In some implementation manners, for different call interfaces, the call ending interfaces may also be different accordingly, for example, the call interface shown in fig. 2a is switched to a desktop or a screen locking interface, an interface of other services, and other interfaces before the call after the call is ended. After the call is ended, only the "capsule" is not displayed, and other display contents are not changed in the call interface shown in fig. 2 b.
In other implementation manners, after the user rejects the incoming call on the incoming call reminding interface, the rejected interfaces may be different for different incoming call reminding interfaces. For example, the incoming call reminding interface shown in fig. 1a is switched to an interface before an incoming call, such as a desktop, an interface of other services, or a screen locking interface, after the incoming call is rejected. The incoming call reminding interface shown in fig. 1b is that only the "capsule" is not displayed after the incoming call is rejected, and other display contents are not changed.
The operations provided for the user and the response modes to the operations are consistent, including but not limited to: in the process of call reminding or call, the user may perform an operation under the actual call situation, for example, in the call reminding interface, the full-screen call reminding interface shown in fig. 1a is drawn up, and the interface shown in fig. 1b is switched to. For another example, during the incoming call reminding process, the user can press the power key to obtain the mute effect.
Still alternatively, in the call interface shown in fig. 2a, the user may click any control to call out the corresponding interface, for example, click the first control from the left in fig. 2a to call out the dial, or trigger the corresponding function, for example, click the first control from the right to trigger the recording.
The record consistency of the incoming call information includes but is not limited to: for the connected incoming call, the call information such as the number, the call time, the number attribution and the like is recorded after the call is hung up. For the refused incoming call, information such as missed identification, telephone number, incoming call time and the like is recorded, and taking fig. 3 as an example, the information of the first row in the "all calls" list is the incoming call information, including contact and call time. The second row of information is call refusal information, which comprises a telephone number and call time.
In order to achieve the native experience of the simulated incoming call, the embodiment of the application provides a method and a device for simulating an incoming call, which are applied to electronic equipment.
In some embodiments, the electronic device may be a cell phone (as shown in fig. 4), a tablet, a desktop, a laptop, a notebook, an Ultra-mobile Personal Computer (UMPC), a handheld Computer, a netbook, a Personal Digital Assistant (PDA), a wearable electronic device, a smart watch, or the like.
As shown in fig. 4, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the present embodiment does not constitute a specific limitation to the electronic device. In other embodiments, an electronic device may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
It should be understood that the interface connection relationship between the modules illustrated in this embodiment is only an exemplary illustration, and does not constitute a limitation on the structure of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in an electronic device may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
On top of the above components, an operating system runs. Such as an iOS operating system, an android operating system, a Windows operating system, and the like. A running application may be installed on the operating system.
In some embodiments, the Android system is divided into four layers, as shown in fig. 5, a kernel layer, an Android runtime (Android runtime) and system library, an application framework layer and an application layer are respectively arranged from bottom to top.
The kernel layer is a layer between hardware and software. The kernel layer includes at least drivers for various hardware. The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system. The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android. The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. As shown in fig. 5, the modules related to incoming calls running in the application framework layer include, but are not limited to: the system comprises a telephone account number PhoneAccount, a telephone management TelecomManager, a connection service connecting service, a simulation incoming call tool EtsUtils, a telephone account number tool PhoneAccountUtils, a simulation incoming call connection service and a simulation incoming call connection EtsConnection. Wherein PhoneAccount, TelecomManager, and ConnectionService are APIs native to android.
The application layer may include a series of applications. As shown in fig. 5, the application program includes: simulating an incoming call, a call user interface incall ui, a media player MediaPlayer, and a telephone Telecom. Telecom includes the following modules: media player MediaPlayer, ring player Ringer, asynchronous ring player asyncringtone player and Vibrator. Incall ui and Telecom are android native applications.
Based on the above layers, whether it is a Circuit Switched (CS) domain or an IP Multimedia Subsystem (IMS), the actual incoming call flow is as follows:
the transmission path of the incoming call data is as follows: chip-kernel layer-Android runtime-application framework layer-application layer. Specifically, the bottom layer (at least including the chip) provides incoming call data for the application framework layer, and the TelecomManager of the application framework layer transmits data for incoming call display in the incoming call data to the InCallUI by calling ConnectionService according to the incoming call data. The InCallUI acquires the incoming call number from the data for displaying the incoming call, inquires the contact information (including but not limited to contact names and head portraits) of the incoming call number, and displays an incoming call interface by using the inquired information. The TelecomManager informs Telecom of realizing ringing and vibration, and specifically, the TelecomManager informs Ringer incoming calls in the Telecom through an onCallAdded () interface, the Ringer acquires incoming call ringtone information and vibration type information, calls a play () interface of Async Ringer Player, realizes ringing according to the incoming ringtone information, and realizes vibration according to the vibration type information by calling a vibrant () interface of the Vibrator. And after the incoming call is connected, the TelecomManager plays the call audio transmitted by the bottom layer by calling the MediaPlayer. The modules can cooperate with each other to realize the switching of the display interface according to the operation of the user on the display interface.
In the research process, the inventor finds that, compared with a real incoming call, a simulated incoming call does not transmit incoming call data to an upper layer (an application framework layer and an application layer) at a bottom layer, and native experience of an android operating system is embodied by each application program of the application layer, so that the purpose of simulating native experience of an incoming call with a real incoming call is realized, in the embodiment, a simulated incoming call application program is added at the application layer, and functions of the simulated incoming call application program include but are not limited to: a User Interface (UI) is provided for selecting a number of the simulated incoming call and for triggering a control for the simulated incoming call. EtsUtils, PhoneAccountUtils, EtsConnectionService and EtsConnection are newly added in the application framework layer. The EtsUtils and PhoneAccountUtils are used for providing simulated incoming call data for the native module of the android system, so that the native module is triggered to display an incoming call interface, send an incoming call reminding signal and the like. Etsdonnectionservice and etsdonnection are used to provide simulated conversational audio.
The flow of the software framework shown in fig. 5 for implementing the simulation function will be described in detail below.
The flow of the simulated incoming call is triggered by a control on the simulated incoming call interface shown by the simulated incoming call application shown in fig. 5.
The flow of initiating a simulated incoming call is shown in fig. 7:
and S71, after the simulated incoming call application program is triggered to run, displaying a simulated incoming call interface for setting the incoming call number and the incoming call delay.
In some implementations, an example of a simulated incoming call interface is shown in fig. 6a, and the controls displayed on the simulated incoming call interface include: the control part of the incoming call number and the control part of the incoming call delay. The incoming call number control is used for the user to select the number simulating the incoming call. The incoming call delay control is used for selecting the interval duration of the initiation time of the simulated incoming call and the trigger time of the simulated incoming call by a user. In fig. 6a, the simulated incoming call is triggered by clicking the confirmation control, and therefore the trigger time of the simulated incoming call may be the time of clicking the confirmation control.
And S72, the application program of simulating the incoming call responds to the operation of the incoming call number control to obtain the telephone number of the simulated incoming call.
Also taking fig. 6a as an example, after the user clicks the incoming call number control, the interface is switched to the selection interface of the incoming call number. The incoming number selection interface provides functions of selecting a phone number from stored contacts of the electronic device, selecting a phone number specifying a home, and selecting a phone number specifying a tag type.
In some implementations, the selection interface for the incoming number is as shown in fig. 6b, and includes a contact selection control, a home selection control, and a tag type selection control.
It can be understood that based on the interface shown in fig. 6b, the specific implementation of S72 is:
and S721, judging whether the contact person telephone number is selected or not, if so, executing S722, and if not, executing S723.
And S722, taking the telephone number of the contact person as the analog incoming call number.
Referring to fig. 6b, after the contact selection control is clicked, a contact list in the electronic device is displayed, and when a user selects a certain contact from the contact list, the phone number of the selected contact is used as the simulated incoming call number.
And S723, judging whether the phone number of the designated attribution is selected, if so, executing S724, and if not, executing S725.
And S724, generating or inquiring the telephone number of the designated attribution as the simulated incoming call number.
In conjunction with FIG. 6b, after the home selection control is clicked, a home setting interface is displayed, which in some implementations provides a control for selecting a home according to an administrative division, e.g., a province and city selection control. After the home location setting interface acquires the designated home location, the telephone number of the designated home location may be generated, or the telephone number of the designated home location may be queried from the configured telephone numbers of the respective home locations as the simulated incoming call number.
S725, judging whether the telephone number with the selected mark type is selected, if so, executing S726, and if not, ending the process.
S726, a telephone number having the selected tag type is generated or queried as the simulated incoming call number.
Referring to fig. 6b, after the mark type selection control is clicked, a mark type selection interface is displayed, and in some implementations, the mark type selection interface displays names of configured mark types, including but not limited to: express delivery, meal delivery, and the like. After the selection interface of the tag type obtains the tag type, the analog incoming call APP may generate a telephone number with the selected tag type, or query the telephone number with the selected tag type from configured telephone numbers as an analog incoming call number.
It is understood that the display interface of the contact list, the home setting interface, and the selection interface of the mark type may be a small window interface displayed together with the selection interface of the incoming call number shown in fig. 6b, or may be a full screen interface, that is, a selection interface of the incoming call number shown in fig. 6b is switched to the display interface of the contact list, the home setting interface, or the selection interface of the mark type.
The selection interface of the incoming call number shown in fig. 6b may further display a selected phone number through the display interface of the contact list, the home setting interface, or the mark type selection interface, for example, as shown in fig. 6b, in a lower area of the contact selection control, the home selection control, and the mark type selection control, a control for displaying the selected phone number and the attribute information is displayed. The incoming call number control is used for displaying the selected telephone number. The number attribution control is used for displaying attribution of the telephone number displayed by the incoming call number control, the marking information control is used for displaying marking types of the telephone number displayed by the incoming call number control, and the remark control is used for displaying remark information of the telephone number displayed by the incoming call number control. The remark information, the attribution, and the mark type are collectively referred to as attribute information herein.
It will be appreciated that the telephone number selected from the contact list may also have a type of label, and the label type and attribution may be displayed in a corresponding control. The phone number or contact number specifying the home may not have a label type, and therefore, the content displayed in the label information control is empty. Or, the control displaying empty content can receive the content input by the user. For example, a tag information control specifying a phone number of a home is displayed as empty, and the user enters a tag type in the control.
It will be appreciated that for incoming numbers already stored in the electronic device, for example, incoming numbers selected from a contact list, there is no need to repeat the storage because they are already stored in the electronic device. For incoming call numbers not stored in the electronic device, for example, a telephone number with a selected tag type generated by the analog incoming call APP, S727 may be executed to store the telephone number with the selected tag type in the contact database in correspondence with the attribute information.
The attribute information includes, but is not limited to: contact, home, type of label, and note.
In some implementations, the database storing the phone numbers and attribute information with the selected tag type is different from the database storing contact information in the electronic device.
And S73, responding to the operation of the incoming call delay control, and acquiring the delay of the initiated simulated incoming call.
After the confirmation setting control in the interface shown in fig. 6b is clicked, the interface shown in fig. 6a is switched to, and the incoming call delay control in the interface shown in fig. 6a is used for the user to select the time length of the delay.
It is understood that the delay of initiating the analog incoming call refers to the interval duration from the time of triggering the analog incoming call to the time of initiating the analog incoming call.
For example, after the confirmation incoming call control in the interface shown in fig. 6a is clicked, it indicates that the delay and the simulated incoming call number have been set. The electronic equipment starts timing from the moment when the incoming call control is confirmed to be clicked, and initiates the simulated incoming call after delaying the time length indicated by the incoming call delay.
It is to be understood that the order of execution of S73 and S72 is not limited.
As can be seen from fig. 7, the simulated incoming call application has the function of selecting the simulated incoming call number from different dimensions.
It can be understood that, after the confirmation call control in the interface shown in fig. 6a is clicked, a simulated call process is initiated, and the initiated simulated call process is shown in fig. 8, and includes the following steps:
s81, the simulated incoming call application transmits the simulated incoming call phone number and a click event confirming the incoming call control to etssuils.
S82, EtsUtils transcodes the telephone number of the simulated incoming call into a first parameter and generates PhoneAccountHandle.
In some implementations, the string-type phone number is converted to a Uniform Resource Identifier (URI) type, and then converted from the URI type to an incomincagaddress type as the first argument.
PhoneAccountHandle is the unique identification of PhoneAccount.
Since the upper layer cannot acquire the incoming call data from the bottom layer, a part of the incoming call data is generated in this step.
S83, etssuils transmits to phoneacount a parameter list extra including the first parameter, and phoneacentrandhandle.
S84, EtsUtils transmits a click event confirming the incoming call control to PhoneAccountUtils.
The execution sequence of S82 and S84, S83 and S84 is not limited.
S85, phoneacountutils registers phoneacount parameter in response to the click event.
In some implementation manners, the phoneacentrount parameter is configured in the phoneacentrustutils, a register testphoneacount () interface configured for the phoneacentrustils in advance is called, then an android native register phoneacount () interface is called, and the configured phoneacentrount parameter is registered to obtain the phoneacentrount parameter with phoneacentrusthandle.
The registered phoneacount parameter can be regarded as another part of incoming call data.
S86, phoneacentrutils transmits the registered phoneacount parameter to phoneacount.
It is understood that, up to this point, the phoneacount parameter, extra, and phoneacentrandhandle, which are registered, are stored in PhoneAccount, and are collectively referred to herein as incoming call data.
S87, phoneacount transfers the incoming call data to the TelecomManager by calling the AddNewIncomingCall () interface.
S88, the telecom manager binds the ConnectionService of the simulated incoming application and transmits the incoming call data to the ConnectionService by calling the oncreateinconsmingconnection () interface to request a new instance of the Connection object representing the new incoming call.
S89, ConnectionService transfers incoming data to the incalui by calling the oncoladed () interface to request an incoming display interface.
And S810, inquiring attribute information of the telephone number of the simulated incoming call by using the first parameter in the incoming call data through the InCallUI.
And S811, displaying an incoming call reminding interface by the InCallUI.
In some implementations, a simulated incoming call phone number and corresponding attribute information are displayed on the incoming call alert interface.
An example of an incoming call reminder interface can be seen in FIG. 1a or FIG. 1 b.
S812, the TelecomManager informs Telecom to realize ringing and vibration.
In some implementations, TelecomManager calls the onCallAdded () interface of Ringer to notify Ringer of Telecom of the incoming call. Ringer performs at least one of ringing and vibration according to ringing and vibration patterns that have been configured in the electronic device.
It is understood that the order of S89-S811 and S812 is not limited.
After the steps are executed, the electronic equipment displays the incoming call reminding interface and sends out at least one reminding signal of ringing and vibration.
It can be understood that since the incalui is a module for displaying the incoming call interface in the real incoming call scene, and in the embodiment, the incoming call reminding interface is also provided by the incalui, the same effect as that in the real incoming call scene can be achieved based on the operation of the incoming call reminding interface of the simulated incoming call.
The following description takes the answering and rejecting operations of the incoming call reminding interface as an example:
the user can put through the call on the call reminding interface. After the analog incoming call is answered, the answering process is triggered to be executed, including S813-S819.
S813, the InCallUI informs the TelecomManager that the incoming call is connected by calling setActive () interface.
S814, the telecom manager transmits the incoming call message to the etcconnectionservice by calling the AddNewIncomingCall () interface.
S815, etsdonnectionservice calls the onAnswer () interface to send an electrical connection notification to etsdonnection.
And S816, after receiving the notification, the EtsConnection judges whether a USAGE _ VOICE _ COMMUNICATION media is played, if not, the EtsConnection notifies the TelecomManager to acquire call audio by calling an onAnswer () interface, and if so, the EtsConnection does not process.
S817, TelecomManager transmits call AUDIO EXTRA _ PLAY _ CS _ AUDIO to EtsConnection.
It will be appreciated that because of the analog incoming call, the underlying layer does not upload the call audio. In this embodiment, the call audio may be audio pre-configured in the electronic device, for example, the call audio is recorded in advance by the user and stored in the electronic device, and the recording control may be displayed through the interface shown in fig. 6a or fig. 6 b. Or, the call audio recorded in the scene of the true incoming call can also be used.
And the TelecomManager acquires the call audio stored in the electronic equipment by using the identification of the call audio.
In some implementations, the identification of call audio is pre-configured in etssuils as part of the extras and transmitted by etssuils to the telecom manager.
In other implementations, the identifier of the call audio is configured in advance in phoneacountutils as a part of phoneacount parameter, and is transmitted to the telecom manager by phoneacountutils.
S818, etcconnection transfers EXTRA _ PLAY _ CS _ AUDIO to the media player MediaPlayer by calling the mmedclayer.
S819, MediaPlayer PLAYs EXTRA _ PLAY _ CS _ AUDIO.
The playing of the conversation audio enables the simulated incoming call to have the effect of being closer to the real incoming call.
It is understood that the user may also hang up the call by operating the call interface, and perform S820-S822 after the call is hung up.
S820, etsdonnectionservice sends a hangup notification to etsdonnection by calling the onDisconnect () interface.
S821 and etconnection, upon receiving the hang-up notification, notify the MediaPlayer to stop playing the EXTRA _ PLAY _ CS _ AUDIO.
And S822, switching the InCallUI to a pre-call interface.
It can be understood that, after the user clicks the hang-up control of the call interface or clicks the reject control of the incoming call reminding interface, the CallCardFragment in the incall ui monitors the hang-up event or the reject event, and transmits the hang-up event or the reject event to the telecom adapter in the incall ui through the endCallClicked () interface, and the AMS destroys the hang-up interface and displays the interface before call.
After the call reminding interface refuses to receive the call, the incall ui interacts with native modules such as the telecom manager and the like to realize the native function, which is not described herein again.
As can be seen from the flows shown in fig. 7 and fig. 8, the method for simulating an incoming call provided in the embodiment of the present application takes the native function of the android software framework under the condition of a real incoming call as a basis, and provides the native module with data for displaying an incoming call interface and a call audio through the newly added module, so as to achieve the purpose of simulating a real incoming call. Because the information that the user can perceive, such as the incoming call interface display, the ringing and the vibration, is realized by the android native module, compared with the real incoming call, the experience of the user has no difference, and therefore, the android native experience of simulating the incoming call is realized.
It can be understood that the method for simulating the incoming call provided by the embodiment of the application can also be used for testing the incoming call function of the electronic device, and because bottom layer participation is not needed, a real SIM card is not needed, and an auxiliary computer is not needed. Based on the flow shown in fig. 7, the functions of different types of incoming numbers can also be tested. And, because of having the call audio playing function, it is also possible to test the function related to the call audio.
It can be understood that in the flow shown in fig. 8, the answering operation on the call reminder interface is mainly used as an example for explanation, but actually, the functions that can be realized by the native modules of android, such as incall ui, in the real call scene can be realized in the scene of simulating the incoming call described in this embodiment, and besides answering, the functions include but are not limited to: responding to the operation of the call interface, switching the call interface to a real call scene, triggering the displayed interface at the same operation of the call interface, responding to the operation of the electronic equipment, switching the simulated incoming call reminding signal to a real incoming call state at the same operation triggering signal state, and further displaying the simulated incoming call information in the interface of the call record, as shown in fig. 3.
As can be seen from the flow shown in fig. 8, etssuils, phoneacountutils, EtsConnectionService, and EtsConnection are modules that are set in the embodiments of the present application in order to invoke native functions of an android, where etssuils and phoneacountutils serve to transmit incoming data to the native modules of the android instead of the underlying layer. EtsConnectionService and EtsConnection function to transmit call audio to native modules of an android instead of the underlying layers.
It can be understood that, the above processes are all described by taking an android software framework as an example, but the method for simulating an incoming call provided in the embodiment of the present application is not limited to the android software framework. The method is extended to other software frameworks, and only needs to provide display data for the caller identification module in other software frameworks, trigger the ringing and vibration module to ring and/or vibrate according to the configured mode, and provide call audio for the audio playing module.
Claims (12)
1. A method for simulating incoming calls, which is applied to an electronic device, wherein the electronic device runs an operating system, and the operating system comprises: the method comprises the following steps that an incoming call reminding interface used for displaying a real incoming call and an incoming call module used for sending out a reminding signal of the real incoming call are used, and the method comprises the following steps:
acquiring a telephone number of a simulated incoming call through a simulated incoming call interface;
responding to the first operation of the simulated incoming call interface, and generating incoming call data according to the telephone number and pre-configured parameters;
and transmitting the incoming call data to the incoming call module, triggering the incoming call module to display the incoming call reminding interface according to the incoming call data, and sending out the reminding signal.
2. The method of claim 1, wherein the operating system further comprises a media player;
after the transmitting the incoming call data to the incoming call module, the method further includes:
responding to answering operation of the incoming call reminding interface, and acquiring conversation audio pre-stored in the electronic equipment through the incoming call module;
and transmitting the call audio to the media player, and triggering the media player to play the call audio.
3. The method of claim 2, wherein the call audio is recorded through the simulated incoming call interface, or wherein the call audio is a recording of the real incoming call.
4. The method of claim 2 or 3, wherein the incoming call data comprises:
an identification of the call audio;
the obtaining of the conversation audio pre-stored in the electronic device through the incoming call module includes:
triggering the incoming call module to acquire the pre-stored call audio from the electronic equipment according to the identification;
and receiving the call audio transmitted by the calling module.
5. The method according to claim 2 or 3, wherein the obtaining, by the incoming call module, a call audio pre-stored in the electronic device in response to the answering operation of the incoming call reminding interface comprises:
receiving an incoming call message transmitted by the incoming call module in response to the answering operation;
after determining that no media is played, triggering the incoming call module to acquire conversation audio pre-stored in the electronic equipment;
and receiving the call audio transmitted by the calling module.
6. The method of claim 2 or 3, further comprising:
and responding to the hang-up operation of the call interface, and informing the media player to stop playing the call audio.
7. The method of claim 1 or 2, wherein the simulating a power-on interface comprises:
and at least one of a setting control for simulating the telephone number of the incoming call and a setting control for simulating the time of the incoming call.
8. The method of claim 7, wherein obtaining the telephone number of the simulated incoming call through the simulated incoming call interface comprises:
selecting a contact phone number from the electronic equipment through a contact selection control;
or, the control is selected through the attribution to acquire the telephone number of the appointed attribution;
or, the telephone number with the specified mark type is acquired through the mark type selection control.
9. The method according to claim 1 or 2, wherein the generating incoming call data according to the phone number and the pre-configured parameter comprises:
converting the telephone number into a first parameter and generating a telephone account identification;
and registering the pre-configured parameters as the telephone account parameters with the telephone account identification.
10. The method according to claim 1 or 2, wherein the operating system is an android system;
the incoming call module comprises: the phone account number phoneacount of the application framework layer, the phone management TelecomManager, the connection service ConnectionService and the call user interface application and the phone application of the application layer.
11. An electronic device comprising a memory and at least one processor; the memory is used for storing an application program;
the processor is used for running the application program to realize the incoming call simulating method of any one of claims 1-10.
12. A computer-readable storage medium on which a program is stored, characterized in that the method of simulating incoming calls of any one of claims 1 to 10 is implemented when the program is run by a computer device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111517777.1A CN113949772B (en) | 2021-12-13 | 2021-12-13 | Method and device for simulating incoming call |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111517777.1A CN113949772B (en) | 2021-12-13 | 2021-12-13 | Method and device for simulating incoming call |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113949772A true CN113949772A (en) | 2022-01-18 |
CN113949772B CN113949772B (en) | 2022-11-01 |
Family
ID=79339134
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111517777.1A Active CN113949772B (en) | 2021-12-13 | 2021-12-13 | Method and device for simulating incoming call |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113949772B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114554009A (en) * | 2022-02-15 | 2022-05-27 | 支付宝(杭州)信息技术有限公司 | Incoming call risk guiding method and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1358005A (en) * | 2002-01-07 | 2002-07-10 | 郭林忠 | New communication facility function of providing user with self protection |
CN101465907A (en) * | 2007-12-19 | 2009-06-24 | 宁波波导软件有限公司 | Method for implementing simulation of mobile phone true incoming call or talking |
CN203313263U (en) * | 2013-05-21 | 2013-11-27 | 深圳创维无线技术有限公司 | A processor with a fake incoming call function |
US9037977B1 (en) * | 2011-03-22 | 2015-05-19 | Shoretel, Inc. | Simulated communication |
CN105005446A (en) * | 2015-07-27 | 2015-10-28 | 宁波萨瑞通讯有限公司 | Virtual incoming call interface setting method and mobile terminal |
CN105763720A (en) * | 2014-12-19 | 2016-07-13 | 上海智朴科技发展有限公司 | Method, apparatus and system for faking incoming call |
CN106534513A (en) * | 2016-10-26 | 2017-03-22 | 上海与德信息技术有限公司 | Method and module for simulating incoming call |
US20200005772A1 (en) * | 2018-06-28 | 2020-01-02 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Interactive method and device of robot, and device |
-
2021
- 2021-12-13 CN CN202111517777.1A patent/CN113949772B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1358005A (en) * | 2002-01-07 | 2002-07-10 | 郭林忠 | New communication facility function of providing user with self protection |
CN101465907A (en) * | 2007-12-19 | 2009-06-24 | 宁波波导软件有限公司 | Method for implementing simulation of mobile phone true incoming call or talking |
US9037977B1 (en) * | 2011-03-22 | 2015-05-19 | Shoretel, Inc. | Simulated communication |
CN203313263U (en) * | 2013-05-21 | 2013-11-27 | 深圳创维无线技术有限公司 | A processor with a fake incoming call function |
CN105763720A (en) * | 2014-12-19 | 2016-07-13 | 上海智朴科技发展有限公司 | Method, apparatus and system for faking incoming call |
CN105005446A (en) * | 2015-07-27 | 2015-10-28 | 宁波萨瑞通讯有限公司 | Virtual incoming call interface setting method and mobile terminal |
CN106534513A (en) * | 2016-10-26 | 2017-03-22 | 上海与德信息技术有限公司 | Method and module for simulating incoming call |
US20200005772A1 (en) * | 2018-06-28 | 2020-01-02 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Interactive method and device of robot, and device |
Non-Patent Citations (1)
Title |
---|
陈果: "电子设备模拟测试平台框架的设计与实现", 《电子技术与软件工程》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114554009A (en) * | 2022-02-15 | 2022-05-27 | 支付宝(杭州)信息技术有限公司 | Incoming call risk guiding method and device |
Also Published As
Publication number | Publication date |
---|---|
CN113949772B (en) | 2022-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3986008A1 (en) | Method for using remote sim module, and electronic apparatus | |
CN112887926B (en) | Calling method and device | |
US11973895B2 (en) | Call method and apparatus | |
CN112543447A (en) | Device discovery method based on address list, audio and video communication method and electronic device | |
CN111628916A (en) | Method for cooperation of intelligent sound box and electronic equipment | |
CN113949772B (en) | Method and device for simulating incoming call | |
CN114679752A (en) | Method for sharing wireless communication capacity by dual systems and terminal equipment | |
CN116137639A (en) | Cross-equipment audio data transmission method and electronic equipment | |
CN116055633A (en) | Incoming call processing method, incoming call processing system, electronic equipment and storage medium | |
CN113678481B (en) | Wireless audio system, audio communication method and equipment | |
CN115243236A (en) | Seamless switching method for audio data | |
CN115065799B (en) | Video call method and electronic equipment | |
CN113543366A (en) | Mobile terminal, call method thereof, call server and call system | |
CN109218505A (en) | Incoming call reminding method, device | |
CN115942253B (en) | Prompting method and related device | |
CN114449103B (en) | Reminding method, graphical user interface and terminal | |
CN117135729B (en) | Multi-device cooperation method, system and terminal device | |
CN117119097B (en) | Method, equipment and storage medium for incoming call resonance | |
CN116055632B (en) | Incoming call processing method, electronic equipment and storage medium | |
CN115087134B (en) | Bluetooth connection method and electronic equipment | |
CN114390569B (en) | Method and device for measuring synchronous signal block and mobile terminal | |
CN117014884A (en) | Number using method and related equipment | |
CN117255154A (en) | Incoming call display method and electronic equipment | |
CN117812548A (en) | Distributed communication method and electronic equipment | |
CN104851438B (en) | A kind of information processing method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230906 Address after: 201306 building C, No. 888, Huanhu West 2nd Road, Lingang New District, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai Patentee after: Shanghai Glory Smart Technology Development Co.,Ltd. Address before: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee before: Honor Device Co.,Ltd. |
|
TR01 | Transfer of patent right |