[go: up one dir, main page]

CN108093132B - Terminal device and ringtone volume control method - Google Patents

Terminal device and ringtone volume control method Download PDF

Info

Publication number
CN108093132B
CN108093132B CN201711332704.9A CN201711332704A CN108093132B CN 108093132 B CN108093132 B CN 108093132B CN 201711332704 A CN201711332704 A CN 201711332704A CN 108093132 B CN108093132 B CN 108093132B
Authority
CN
China
Prior art keywords
volume
external audio
notification message
terminal
type
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.)
Active
Application number
CN201711332704.9A
Other languages
Chinese (zh)
Other versions
CN108093132A (en
Inventor
葛云源
高毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201711332704.9A priority Critical patent/CN108093132B/en
Publication of CN108093132A publication Critical patent/CN108093132A/en
Application granted granted Critical
Publication of CN108093132B publication Critical patent/CN108093132B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72484User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/02Details of telephonic subscriber devices including a Bluetooth interface

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Telephone Function (AREA)

Abstract

The present disclosure provides a terminal device and a method for controlling ring volume, the method for controlling ring volume includes: monitoring whether the terminal receives an application notification message; when monitoring that the terminal receives an application notification message, confirming whether the terminal is connected with external audio equipment or not and confirming whether the terminal outputs audio through the external audio equipment or not; confirming the type of an external audio device when it is confirmed that the terminal is connected with the external audio device and audio is being output through the external audio device; acquiring the playing volume of the application notification message according to the type of the external audio equipment and the playing volume of the output audio; and playing the notification ring corresponding to the application notification message according to the playing volume of the application notification message. The technical scheme dynamically adjusts the notification ring according to the type of the currently connected external audio equipment and the playing volume of the output audio, and improves the user experience.

Description

Terminal device and ringtone volume control method
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a terminal device and a method for controlling ring volume.
Background
When the mobile phone receives the notification message (english: notification), the notification ring is played, the volume of the notification ring is usually set to a fixed value, and the user experience is affected when the volume of the notification ring is not appropriate in some usage scenarios. For example, when a user listens to music played by a mobile phone through an earphone, if the mobile phone receives a notification message and plays a notification ring, the notification ring is too large to interfere with the user listening to the music, and even to make the user feel harsh.
Disclosure of Invention
The embodiment of the disclosure provides a terminal device and a method for controlling ring volume, and the technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for controlling ring volume, including:
monitoring whether the terminal receives an application notification message;
when monitoring that the terminal receives an application notification message, confirming whether the terminal is connected with external audio equipment or not and confirming whether the terminal outputs audio through the external audio equipment or not;
confirming the type of an external audio device when it is confirmed that the terminal is connected with the external audio device and audio is being output through the external audio device;
acquiring the playing volume of the application notification message according to the type of the external audio equipment and the playing volume of the output audio;
and playing the notification ring corresponding to the application notification message according to the playing volume of the application notification message.
According to the technical scheme, when the application notification message is received, the current use scene is judged, if the external audio equipment is determined to be connected and the audio is output through the external audio equipment, the playing volume of the notification message is determined according to the type of the external audio equipment and the playing volume of the output audio, and the notification ring is played at the playing volume, namely the notification ring is adjusted by the terminal according to the type of the currently connected external audio equipment and the playing volume of the output audio, so that the notification ring volume is adjusted according to different use scenes, and the user experience is improved.
In one embodiment, the confirming whether the terminal is connected to an external audio device and confirming whether the terminal is outputting audio through the external audio device includes:
and calling an interface provided by a system audio module, and inquiring the current connection state between the terminal and external audio equipment and the type of the audio stream currently output by the terminal.
In one embodiment, the confirming the type of the external audio device comprises:
determining the type of the external audio equipment according to the interface type of the external audio equipment;
or receiving an attribute indication message sent by the external audio equipment, and determining the type of the external audio equipment according to the attribute indication message.
In one embodiment, the obtaining the playing volume of the application notification message according to the type of the external audio device and the playing volume of the output audio includes:
when the type of the external audio equipment is a sound box, determining that the playing volume of the application notification message is higher than the playing volume of the audio output by the external audio equipment;
when the type of the external audio equipment is an earphone, determining that the playing volume of the application notification message is lower than the playing volume of the audio output by the external audio equipment;
and when the type of the external audio equipment is wired equipment, determining that the playing volume of the application notification message is lower than the playing volume of the audio output by the external audio equipment.
In one embodiment, the obtaining of the playing volume of the application notification message includes:
acquiring the playing volume of the audio output by the external audio equipment;
acquiring a volume adjustment value;
and increasing or subtracting the volume adjustment value from the playing volume of the audio output by the external audio equipment to obtain the playing volume of the application notification message.
According to a second aspect of the embodiments of the present disclosure, there is provided a terminal device, including:
the monitoring module is used for monitoring whether the terminal receives the application notification message;
the scene judging module is used for confirming whether the terminal is connected with external audio equipment or not and confirming whether the terminal outputs audio through the external audio equipment or not when monitoring that the terminal receives the application notification message;
the type judging module is used for confirming the type of the external audio equipment when the terminal is confirmed to be connected with the external audio equipment and audio is output through the external audio equipment;
the volume adjusting module is used for acquiring the playing volume of the application notification message according to the type of the external audio equipment and the playing volume of the output audio;
and the ring output module is used for playing the notification ring corresponding to the application notification message according to the playing volume of the application notification message.
In one embodiment, the scene decision module comprises:
and the interface calling submodule is used for calling the interface provided by the system audio module, inquiring the current connection state between the terminal and the external audio equipment and the type of the audio stream currently output by the terminal.
In one embodiment, the type determination module comprises an interface sub-module or an attribute sub-module;
the interface submodule is used for determining the type of the external audio equipment according to the interface type of the external audio equipment;
the attribute submodule is used for receiving the attribute indication message sent by the external audio equipment and determining the type of the external audio equipment according to the attribute indication message.
In one embodiment, the volume adjusting module comprises a sound box volume control submodule, an earphone volume control submodule or a wired device volume control submodule;
the sound box volume control submodule is used for determining that the playing volume of the application notification message is higher than the playing volume of the audio output by the external audio equipment when the type of the external audio equipment is a sound box;
the earphone volume control submodule is used for determining that the playing volume of the application notification message is lower than the playing volume of the audio output by the external audio equipment when the type of the external audio equipment is an earphone;
and the wired device volume control sub-module is used for determining that the playing volume of the application notification message is lower than the playing volume of the audio output by the external audio device when the type of the external audio device is the wired device.
In one embodiment, the volume adjustment module includes:
the reference volume acquisition submodule is used for acquiring the playing volume of the audio output by the external audio equipment;
the difference acquisition submodule is used for acquiring a volume adjustment value;
and the notification volume determining submodule is used for increasing or subtracting the volume adjusting value from the playing volume of the audio output by the external audio equipment to obtain the playing volume of the application notification message.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal device, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
monitoring whether the terminal receives an application notification message;
when monitoring that the terminal receives an application notification message, confirming whether the terminal is connected with external audio equipment or not and confirming whether the terminal outputs audio through the external audio equipment or not;
confirming the type of an external audio device when it is confirmed that the terminal is connected with the external audio device and audio is being output through the external audio device;
acquiring the playing volume of the application notification message according to the type of the external audio equipment and the playing volume of the output audio;
and playing the notification ring corresponding to the application notification message according to the playing volume of the application notification message.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method for controlling the volume of a ringtone provided by the first aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating a method of controlling a volume of a ringtone, according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a method of controlling a volume of a ringtone, according to an exemplary embodiment.
FIG. 3 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 4 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 5 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 6 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 7 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 8 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 9 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 10 is a block diagram of an electronic device shown in accordance with an example embodiment.
FIG. 11 is a block diagram of an electronic device shown in accordance with an example embodiment.
Fig. 12 is a block diagram of a terminal device shown according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
When a user listens to the audio played by the mobile phone through the earphone, if the mobile phone receives the application notification message and plays the notification ring, the notification ring often causes interference to the audio being played. For example, when a user listens to music with an earphone, the mobile phone receives the application notification message and plays a notification ring, which not only interferes with the audio being played, but also makes the user feel harsh.
The present disclosure provides a method for controlling a ring volume, and a terminal for performing the same. The terminal can be a mobile phone, a tablet and the like. When the terminal receives the application notification message, the current use scene is judged, and the volume of the notification ring tone is adjusted according to different use scenes, so that the use experience of a user on a product is improved.
Fig. 1 is a flowchart illustrating a method for controlling ring volume according to an exemplary embodiment, where the method is applied to a terminal device, and an embodiment of the disclosure is described by taking a case where a terminal is a mobile phone as an example. The method for controlling the volume of ring tone comprises steps 101-105:
in step 101, the listening terminal receives an application notification message.
Taking the case that the terminal is a mobile phone as an example, the mobile phone monitors whether an application notification message is received after the data function is started. The application notification message may be a notification message of any application it is installed on.
Step 102 is triggered when it is monitored that the terminal receives the application notification message.
In step 102, it is confirmed whether the terminal is connected to the external audio device and whether the terminal is outputting audio through the external audio device.
The external audio device includes a line audio output device, a wireless audio output device. Such as in-ear headphones, headsets, traffic headsets, bluetooth audio output devices, and the like.
The audio module of the system detects, records, etc. audio-related events, sets parameters, etc. Including whether an external audio device is connected, the type of audio stream output, the playback volume, etc. The information can be queried by calling the corresponding interface provided by the audio module.
For example, the audio module identifies and records the connection status between the handset and the external audio device. When the earphone interface is inserted into the 3.5mm earphone interface, hardware detection of the earphone hole is triggered, and the bottom layer of the mobile phone operating system reports an external audio device access event to the upper layer of the system. The application program can send a query command to the system bottom layer by calling an interface provided by the system, and the bottom layer feeds back a result to the upper application program according to the currently recorded audio equipment connection state.
In addition, the mobile phone operating system defines the audio into a plurality of types, and the application program needs to specify the type of the played audio stream when playing the audio. For example, audio streams in cell phones include several types:
voice call audio stream, audio stream output by the mobile phone when the user makes and receives calls.
Multimedia audio streams, including audio streams that are output when music, video, etc. are played.
Ringing audio streams, including audio streams output when an incoming call rings.
By calling the corresponding interface provided by the system audio module, the application program can inquire the current connection state of the mobile phone and the external audio equipment and the type of the currently output audio stream. For example, it is determined whether an interface into which the wired headset is inserted is audiomanager.
Taking a scene that a user listens to music through an earphone as an example, by calling an open interface of an audio module, it is determined that the current moment of the mobile phone is connected with the earphone, and if the type of the currently output audio stream is a multimedia audio stream, it is determined that the mobile phone is connected with an external audio device and audio is being output through the external audio device.
Step 103 is triggered when it is confirmed that the terminal is connected to the external audio device and audio is being output through the external audio device.
In step 103, the type of external audio device is confirmed.
In one embodiment, the type of the external audio device is determined according to the interface type of the external audio device. For example, the Type of the external audio device includes a wired audio device, and when the mobile phone detects that the external audio device is connected to the mobile phone through an earphone hole (e.g., a 3.5mm earphone interface, a Type C interface), the Type of the external audio device is determined to be the wired audio device.
In step 104, the playing volume of the application notification message is obtained according to the type of the external audio device and the playing volume of the output audio.
In one embodiment, when the external audio device is a wired audio device, the playback volume of the application notification message is determined to be lower than the playback volume of the audio output by the external audio device to prevent the playback volume of the notification message from being too high for the user to feel harsh.
For example, the playing volume of the output audio of the external audio device is queried by calling an interface of the system audio module, and the volume adjustment value is further determined. And subtracting the volume adjustment value from the playing volume of the audio output by the external audio equipment to obtain the playing volume of the application notification message. Wherein the volume adjustment value can be a preset value.
Taking a scene that a user listens to music through an earphone as an example, if the volume of the currently output multimedia audio stream is 7 grids and the volume adjustment value is 3 grids, the playing volume of the notification message is set to 4 grids.
In step 105, according to the playing volume of the application notification message, a notification ring corresponding to the application notification message is played.
Taking a scene that a user listens to music through an earphone as an example, the user inserts the earphone into an earphone hole and opens the music player. When the mobile phone receives the application notification message, the mobile phone determines that an external audio device is accessed and outputs the multimedia audio stream through the external audio device. At this time, the mobile phone further determines that the type of the external audio device is a wired audio device, sets the playing volume of the notification message to be lower than the volume of the current music playing, and plays the notification ring at the smaller volume.
The volume of the current music playing is the volume which makes the user feel comfortable, and the volume of the played notification ring is lower than the volume of the music playing, so the notification ring does not make the user feel harsh.
According to the method for controlling the ring volume provided by the embodiment of the disclosure, when an application notification message is received, a current usage scenario is judged, and if it is determined that an external audio device is connected and audio is being output through the external audio device, the volume for playing the notification message is determined according to the type of the external audio device and the playing volume of the output audio, and the notification ring is played at the volume, that is, the terminal adjusts the notification ring according to the type of the currently connected external audio device and the playing volume of the output audio, so that the notification ring volume is adjusted according to different usage scenarios, and user experience is improved.
Based on the method for controlling the volume of the ring tone provided in the embodiment corresponding to fig. 1, fig. 2 is a flowchart illustrating a method for controlling the volume of the ring tone according to an exemplary embodiment. The embodiment corresponding to fig. 2 illustrates a method for controlling the volume by taking a wireless external audio device as an example. The content of some steps is the same as or similar to the steps in the corresponding embodiment of fig. 1, and only the differences in the steps will be described in detail below. Referring to fig. 2, the method for controlling the volume of ring tone provided in this embodiment includes steps 201 and 205:
in step 201, the listening terminal receives an application notification message.
Step 202 is triggered when it is monitored that the terminal receives the application notification message.
In step 202, it is confirmed whether the terminal is connected to the external audio device and whether the terminal is outputting audio through the external audio device.
Step 203 is triggered when it is confirmed that the terminal is connected to the external audio device and audio is being output through the external audio device.
In step 203, the type of the external audio device is determined from the attribute indication message.
Taking the case that the external audio device is a bluetooth device as an example, when the bluetooth device is connected to a mobile phone, the bluetooth device sends an attribute indication message to the mobile phone, where the attribute indication message is used to indicate the type of the bluetooth device, such as a video camera, a car audio device, a headset, a microphone, and so on. Bluetooth external audio devices are a class of bluetooth devices.
After the mobile phone receives the attribute indication message, whether the Bluetooth device is an external audio device or not and the type of the external audio device can be determined according to the attribute indication message. In one embodiment, the types of external audio devices include speakers and headphones. The vehicle-mounted audio equipment and the Bluetooth sound box are classified into sound boxes, and the head-mounted earphone is classified into an earphone.
In step 204, the play volume of the application notification message is determined according to the type of the external audio device and the play volume of the output audio.
And when the type of the external audio equipment is the loudspeaker box, determining that the playing volume of the application notification message is higher than the playing volume of the output audio of the external audio equipment.
When the type of the external audio device is the earphone, determining that the playing volume of the application notification message is lower than the playing volume of the audio output by the external audio device.
In one embodiment, the difference between the playback volume of the application notification message and the playback volume of the output audio of the external audio device is a preset volume adjustment value.
For example, if the mobile phone is connected to the bluetooth speaker and is outputting the multimedia audio stream, and the playback volume is 6 frames and the volume adjustment value is 1 frame, it is determined that the playback volume of the notification message is 7 frames.
Or, the mobile phone is connected with the bluetooth headset and is outputting the multimedia audio stream, the playing volume is 7 lattices, and the volume adjustment value is 3 lattices, and then the playing volume of the notification message is determined to be 4 lattices.
In step 205, according to the playing volume of the application notification message, a notification ring tone corresponding to the application notification message is played.
When the type of the external audio equipment is a sound box, the notification ring tone is higher than the playing volume of the currently output audio, so that the user can hear the notification ring tone more clearly.
When the type of the external audio equipment is the earphone, the notification ring tone is lower than the playing volume of the current output audio, so that the user is prevented from feeling harsh.
According to the method for controlling the ring volume provided by the embodiment of the disclosure, when an application notification message is received, a current usage scenario is judged, and if it is determined that an external audio device is connected and audio is being output through the external audio device, the volume for playing the notification message is determined according to the type of the external audio device and the playing volume of the output audio, and the notification ring is played at the volume, that is, the terminal adjusts the notification ring according to the type of the currently connected external audio device and the playing volume of the output audio, so that the notification ring volume is adjusted according to different usage scenarios, and user experience is improved.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 3 is a block diagram illustrating an electronic device, which may implement some or all of its functions through software, hardware, or a combination of both, for performing the ring tone volume control method described in the corresponding embodiments of fig. 1-2, according to an example embodiment. As shown in fig. 3, the electronic apparatus includes:
a monitoring module 301, configured to monitor whether the terminal receives the application notification message.
The scene determining module 302 is configured to, when it is monitored that the terminal receives the application notification message, determine whether the terminal is connected to the external audio device, and determine whether the terminal is outputting audio through the external audio device.
A type determining module 303, configured to determine the type of the external audio device when it is determined that the terminal is connected to the external audio device and audio is being output through the external audio device.
And the volume adjusting module 304 is configured to obtain the playing volume of the application notification message according to the type of the external audio device and the playing volume of the output audio.
And a ring output module 305, configured to play the notification ring corresponding to the application notification message according to the playing volume of the application notification message.
As shown in FIG. 4, in one embodiment, the scenario determination module 302 includes:
the interface calling sub-module 3021 is configured to call an interface provided by the system audio module, and query a current connection state between the terminal and the external audio device, and a current type of the audio stream output by the terminal.
As shown in FIG. 5, in one embodiment, the type determination module 303 includes an interface submodule 3031.
The interface submodule 3031 is configured to determine the type of the external audio device according to the interface type of the external audio device.
As shown in FIG. 6, in one embodiment, the type determination module 303 includes an attribute submodule 3032.
And the attribute submodule 3032 is configured to receive an attribute indication message sent by the external audio device, and determine the type of the external audio device according to the attribute indication message.
As shown in FIG. 7, in one embodiment, volume adjustment module 304 includes a loudspeaker volume control submodule 3041.
The speaker volume control submodule 3041 is configured to determine that the playback volume of the application notification message is higher than the playback volume of the audio output by the external audio device when the type of the external audio device is a speaker.
As shown in fig. 8, in one embodiment, volume adjustment module 304 includes a headphone volume control submodule 3042.
The earphone volume control sub-module 3042 is configured to determine, when the type of the external audio device is an earphone, that the playing volume of the application notification message is lower than the playing volume of the audio output by the external audio device.
As shown in fig. 9, in one embodiment, volume adjustment module 304 includes a wired device volume control sub-module 3043.
The wired device volume control sub-module 3043 is configured to determine, when the type of the external audio device is a wired device, that the playing volume of the application notification message is lower than the playing volume of the audio output by the external audio device.
As shown in fig. 10, in one embodiment, the volume adjustment module 304 includes:
the reference volume obtaining submodule 3044 is configured to obtain a playing volume of the audio output by the external audio device.
A difference obtaining submodule 3045 for obtaining the volume adjustment value.
The notification volume determining submodule 3046 is configured to increase or subtract the volume adjustment value from the playing volume of the audio output by the external audio device, so as to obtain the playing volume of the application notification message.
According to the electronic device provided by the embodiment of the disclosure, when the application notification message is received, the current usage scenario is judged, and if it is determined that the external audio device is connected and the audio is being output through the external audio device, the volume of the notification message is determined according to the type of the external audio device and the playing volume of the output audio, and the notification ring is played at the volume, that is, the terminal adjusts the notification ring according to the type of the currently connected external audio device and the playing volume of the output audio, so that the volume of the notification ring is adjusted according to different usage scenarios, and the user experience is improved.
Fig. 11 is a block diagram illustrating an electronic device according to an exemplary embodiment, which may be implemented by software, hardware or a combination of the two as part or all of an electronic device for performing the ring volume control method described in the embodiments corresponding to fig. 1-2. As shown in fig. 11, the electronic device 110 includes:
a processor 1101.
A memory 1102 for storing instructions executable by the processor 1101.
Wherein the processor 1101 is configured to:
and monitoring whether the terminal receives the application notification message.
And when the terminal receives the application notification message, confirming whether the terminal is connected with the external audio equipment or not and confirming whether the terminal outputs audio through the external audio equipment or not.
When it is confirmed that the terminal is connected with the external audio device and audio is being output through the external audio device, the type of the external audio device is confirmed.
And acquiring the playing volume of the application notification message according to the type of the external audio equipment and the playing volume of the output audio.
And playing the notification ring corresponding to the application notification message according to the playing volume of the application notification message.
In one embodiment, the processor 1101 may be further configured to:
and calling an interface provided by the system audio module, and inquiring the current connection state between the terminal and the external audio equipment and the type of the audio stream currently output by the terminal.
In one embodiment, the processor 1101 may be further configured to:
and determining the type of the external audio equipment according to the interface type of the external audio equipment.
Or receiving an attribute indication message sent by the external audio equipment, and determining the type of the external audio equipment according to the attribute indication message.
In one embodiment, the processor 1101 may be further configured to:
and when the type of the external audio equipment is the loudspeaker box, determining that the playing volume of the application notification message is higher than the playing volume of the output audio of the external audio equipment.
When the type of the external audio device is the earphone, determining that the playing volume of the application notification message is lower than the playing volume of the audio output by the external audio device.
When the type of the external audio device is a wired device, it is determined that a playback volume of the application notification message is lower than a playback volume of the external audio device outputting audio.
In one embodiment, the processor 1101 may be further configured to:
and acquiring the playing volume of the audio output by the external audio equipment.
And acquiring a volume adjustment value.
And increasing or subtracting the volume adjustment value from the playing volume of the audio output by the external audio equipment to obtain the playing volume of the application notification message.
According to the electronic device provided by the embodiment of the disclosure, when the application notification message is received, the current usage scenario is judged, and if it is determined that the external audio device is connected and the audio is being output through the external audio device, the volume of the notification message is determined according to the type of the external audio device and the playing volume of the output audio, and the notification ring is played at the volume, that is, the terminal adjusts the notification ring according to the type of the currently connected external audio device and the playing volume of the output audio, so that the volume of the notification ring is adjusted according to different usage scenarios, and the user experience is improved.
The electronic device provided by the embodiment of the present disclosure may be a terminal device as shown in fig. 12, fig. 12 is a block diagram of a terminal device shown according to an exemplary embodiment, the terminal device 120 may be a smart phone, a tablet computer, and the like, and the terminal device 120 is configured to execute the ring volume control method described in the embodiments corresponding to fig. 1 to fig. 2.
Terminal device 120 may include one or more of the following components: processing component 1201, memory 1202, power component 1203, multimedia component 1204, audio component 1205, input/output (I/O) interface 1206, sensor component 1207, and communications component 1208.
The processing component 1201 generally controls the overall operation of the terminal device 120, such as operations associated with display, telephone call, data communication, camera operation, and recording operation. The processing component 1201 may include one or more processors 12012 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 1201 can include one or more modules that facilitate interaction between the processing component 1201 and other components. For example, the processing component 1201 may include a multimedia module to facilitate interaction between the multimedia component 1204 and the processing component 1201.
Memory 1202 is configured to store various types of data to support operations at terminal device 120. Examples of such data include instructions for any application or method operating on terminal device 120, contact data, phonebook data, messages, pictures, videos, and so forth. The Memory 1202 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read Only Memory (EPROM), a Programmable Read Only Memory (PROM, ROM), a Read Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk or an optical disk.
The power supply component 1203 provides power to the various components of the terminal device 120. The power components 1203 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the terminal device 120.
The multimedia component 1204 includes a screen providing an output interface between the terminal device 120 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1204 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the terminal device 120 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1205 is configured to output and/or input audio signals. For example, audio component 1205 includes a Microphone (MIC) configured to receive external audio signals when terminal device 120 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 1202 or transmitted via the communication component 1208. In some embodiments, the audio component 1205 also includes a speaker for outputting audio signals.
The I/O interface 1206 provides an interface between the processing component 1201 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 1207 includes one or more sensors for providing various aspects of status assessment for the terminal device 120. For example, sensor component 1207 may detect an open/closed state of terminal device 120, the relative positioning of components, such as a display and keypad of terminal device 120, sensor component 1207 may also detect a change in the position of terminal device 120 or a component of terminal device 120, the presence or absence of user contact with terminal device 120, orientation or acceleration/deceleration of terminal device 120, and a change in the temperature of terminal device 120. The sensor assembly 1207 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor component 1207 may also include a photosensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1207 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communications component 1208 is configured to facilitate communications between terminal device 120 and other devices in a wired or wireless manner. The terminal device 120 may access a Wireless network based on a communication standard, such as Wireless Fidelity (WiFi), 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1208 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the Communication component 1208 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal Device 120 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components for executing the ring tone volume control method described in the embodiments corresponding to fig. 1-2.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as the memory 1202 including instructions executable by the processing component 1201 of the terminal device 120 to perform the above-described method. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The instructions in the storage medium, when executed by the processing component 1201 of the terminal device 120, enable the terminal device 120 to perform the method of controlling ring tone volume described in the corresponding embodiments of fig. 1-2 above, the method comprising:
and monitoring whether the terminal receives the application notification message.
And when the terminal receives the application notification message, confirming whether the terminal is connected with the external audio equipment or not and confirming whether the terminal outputs audio through the external audio equipment or not.
When it is confirmed that the terminal is connected with the external audio device and audio is being output through the external audio device, the type of the external audio device is confirmed.
And acquiring the playing volume of the application notification message according to the type of the external audio equipment and the playing volume of the output audio.
And playing the notification ring corresponding to the application notification message according to the playing volume of the application notification message.
In one embodiment, a method comprises:
and calling an interface provided by the system audio module, and inquiring the current connection state between the terminal and the external audio equipment and the type of the audio stream currently output by the terminal.
In one embodiment, a method comprises:
and determining the type of the external audio equipment according to the interface type of the external audio equipment.
Or receiving an attribute indication message sent by the external audio equipment, and determining the type of the external audio equipment according to the attribute indication message.
In one embodiment, a method comprises:
and when the type of the external audio equipment is the loudspeaker box, determining that the playing volume of the application notification message is higher than the playing volume of the output audio of the external audio equipment.
When the type of the external audio device is the earphone, determining that the playing volume of the application notification message is lower than the playing volume of the audio output by the external audio device.
When the type of the external audio device is a wired device, it is determined that a playback volume of the application notification message is lower than a playback volume of the external audio device outputting audio.
In one embodiment, a method comprises:
and acquiring the playing volume of the audio output by the external audio equipment.
And acquiring a volume adjustment value.
And increasing or subtracting the volume adjustment value from the playing volume of the audio output by the external audio equipment to obtain the playing volume of the application notification message.
According to the terminal device and the storage medium provided by the embodiment of the disclosure, when the application notification message is received, the current usage scenario is judged, and if it is determined that the external audio device is connected and the audio is being output through the external audio device, the volume of the notification message is determined according to the type of the external audio device and the playing volume of the output audio, and the notification ring is played at the volume, that is, the terminal adjusts the notification ring according to the type of the currently connected external audio device and the playing volume of the output audio, so that the volume of the notification ring is adjusted according to different usage scenarios, and the user experience is improved.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for controlling the volume of a ringtone, comprising:
monitoring whether the terminal receives an application notification message;
when monitoring that the terminal receives an application notification message, confirming whether the terminal is connected with external audio equipment or not and confirming whether the terminal outputs audio through the external audio equipment or not;
confirming the type of an external audio device when it is confirmed that the terminal is connected with the external audio device and audio is being output through the external audio device;
acquiring the playing volume of the application notification message according to the type of the external audio equipment and the playing volume of the output audio;
playing a notification ring corresponding to the application notification message according to the playing volume of the application notification message;
the obtaining of the play volume of the application notification message includes:
acquiring the playing volume of the audio output by the external audio equipment;
acquiring volume adjustment values, wherein the volume adjustment values corresponding to different types of external audio equipment are different;
and increasing or subtracting the volume adjustment value from the playing volume of the audio output by the external audio equipment to obtain the playing volume of the application notification message.
2. The method for controlling the ring volume according to claim 1, wherein said confirming whether the terminal is connected to an external audio device and whether the terminal is outputting audio through the external audio device comprises:
and calling an interface provided by a system audio module, and inquiring the current connection state between the terminal and external audio equipment and the type of the audio stream currently output by the terminal.
3. The method of claim 1, wherein the confirming the type of the external audio device comprises:
determining the type of the external audio equipment according to the interface type of the external audio equipment;
or receiving an attribute indication message sent by the external audio equipment, and determining the type of the external audio equipment according to the attribute indication message.
4. The method for controlling the volume of a ringtone according to claim 1, wherein the obtaining the playback volume of the application notification message according to the type of the external audio device and the playback volume of the output audio comprises:
when the type of the external audio equipment is a sound box, determining that the playing volume of the application notification message is higher than the playing volume of the audio output by the external audio equipment;
and when the type of the external audio equipment is the earphone, determining that the playing volume of the application notification message is lower than the playing volume of the audio output by the external audio equipment.
5. A terminal device, comprising:
the monitoring module is used for monitoring whether the terminal receives the application notification message;
the scene judging module is used for confirming whether the terminal is connected with external audio equipment or not and confirming whether the terminal outputs audio through the external audio equipment or not when monitoring that the terminal receives the application notification message;
the type judging module is used for confirming the type of the external audio equipment when the terminal is confirmed to be connected with the external audio equipment and audio is output through the external audio equipment;
the volume adjusting module is used for acquiring the playing volume of the application notification message according to the type of the external audio equipment and the playing volume of the output audio;
a ring output module, configured to play a notification ring corresponding to the application notification message according to the play volume of the application notification message;
the volume adjustment module includes:
the reference volume acquisition submodule is used for acquiring the playing volume of the audio output by the external audio equipment;
the difference obtaining submodule is used for obtaining volume adjustment values, and the volume adjustment values corresponding to different types of external audio equipment are different;
and the notification volume determining submodule is used for increasing or subtracting the volume adjusting value from the playing volume of the audio output by the external audio equipment to obtain the playing volume of the application notification message.
6. The terminal device according to claim 5, wherein the scene decision module comprises:
and the interface calling submodule is used for calling the interface provided by the system audio module, inquiring the current connection state between the terminal and the external audio equipment and the type of the audio stream currently output by the terminal.
7. The terminal device according to claim 5, wherein the type decision module comprises an interface sub-module or an attribute sub-module;
the interface submodule is used for determining the type of the external audio equipment according to the interface type of the external audio equipment;
the attribute submodule is used for receiving the attribute indication message sent by the external audio equipment and determining the type of the external audio equipment according to the attribute indication message.
8. The terminal device of claim 5, wherein the volume adjusting module comprises a speaker volume control sub-module, an earphone volume control sub-module or a wired device volume control sub-module;
the sound box volume control submodule is used for determining that the playing volume of the application notification message is higher than the playing volume of the audio output by the external audio equipment when the type of the external audio equipment is a sound box;
the earphone volume control submodule is used for determining that the playing volume of the application notification message is lower than the playing volume of the audio output by the external audio equipment when the type of the external audio equipment is the earphone.
9. A terminal device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
monitoring whether the terminal receives an application notification message;
when monitoring that the terminal receives an application notification message, confirming whether the terminal is connected with external audio equipment or not and confirming whether the terminal outputs audio through the external audio equipment or not;
confirming the type of an external audio device when it is confirmed that the terminal is connected with the external audio device and audio is being output through the external audio device;
acquiring the playing volume of the application notification message according to the type of the external audio equipment and the playing volume of the output audio;
playing a notification ring corresponding to the application notification message according to the playing volume of the application notification message;
the obtaining of the play volume of the application notification message includes:
acquiring the playing volume of the audio output by the external audio equipment;
acquiring volume adjustment values, wherein the volume adjustment values corresponding to different types of external audio equipment are different;
and increasing or subtracting the volume adjustment value from the playing volume of the audio output by the external audio equipment to obtain the playing volume of the application notification message.
10. A computer readable storage medium having stored thereon computer instructions, which when executed by a processor, carry out the steps of the method for controlling the volume of a ringtone of any one of claims 1 to 4.
CN201711332704.9A 2017-12-13 2017-12-13 Terminal device and ringtone volume control method Active CN108093132B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711332704.9A CN108093132B (en) 2017-12-13 2017-12-13 Terminal device and ringtone volume control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711332704.9A CN108093132B (en) 2017-12-13 2017-12-13 Terminal device and ringtone volume control method

Publications (2)

Publication Number Publication Date
CN108093132A CN108093132A (en) 2018-05-29
CN108093132B true CN108093132B (en) 2021-01-29

Family

ID=62175391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711332704.9A Active CN108093132B (en) 2017-12-13 2017-12-13 Terminal device and ringtone volume control method

Country Status (1)

Country Link
CN (1) CN108093132B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112849050A (en) * 2019-11-28 2021-05-28 上海博泰悦臻电子设备制造有限公司 Vehicle, vehicle equipment and volume cooperative adjustment method thereof
CN111107226A (en) * 2019-12-27 2020-05-05 珠海市魅族科技有限公司 Volume control method applied to mobile terminal
CN111324331A (en) * 2020-02-17 2020-06-23 Oppo广东移动通信有限公司 Interactive message prompting method and device, electronic device and storage medium
CN115942018A (en) * 2022-12-09 2023-04-07 烽火通信科技股份有限公司 Volume adjusting method and device for peripheral microphone

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965651B (en) * 2015-06-12 2018-10-12 联想(北京)有限公司 Information processing method and electronic equipment
CN105530171B (en) * 2015-12-23 2020-08-25 腾讯科技(深圳)有限公司 Method and device for playing instant message voice by vehicle-mounted terminal
US10182138B2 (en) * 2016-01-08 2019-01-15 Qualcomm Incorporated Smart way of controlling car audio system
CN107071174B (en) * 2017-04-14 2019-05-17 维沃移动通信有限公司 A kind of method of speech processing and mobile terminal

Also Published As

Publication number Publication date
CN108093132A (en) 2018-05-29

Similar Documents

Publication Publication Date Title
CN107493500B (en) Multimedia resource playing method and device
CN106454644B (en) Audio playing method and device
CN108093132B (en) Terminal device and ringtone volume control method
US10827455B1 (en) Method and apparatus for sending a notification to a short-range wireless communication audio output device
WO2014021670A1 (en) Mobile apparatus and control method thereof
CN108845787B (en) Audio adjusting method, device, terminal and storage medium
CN106888327B (en) Voice playing method and device
KR20170023769A (en) Event prompting mehtod and device
CN105407368A (en) Multimedia playing method, device and system
CN105187594A (en) Echo canceling method and device
CN105407433A (en) Method and device for controlling sound output equipment
CN111049984A (en) Audio playback control method and apparatus, and storage medium
CN105139874A (en) Navigation prompt method and apparatus
CN106357913A (en) Method and device for prompting information
CN105468236A (en) Message prompting method and apparatus and terminal
CN116471355B (en) Audio playback method and electronic device
CN114513571A (en) Device connection method and device, electronic device and readable storage medium
CN112882622A (en) Data processing method and device, terminal and storage medium
WO2018035868A1 (en) Method for outputting audio, electronic device, and storage medium
US11388281B2 (en) Adaptive method and apparatus for intelligent terminal, and terminal
CN108600503B (en) Voice call control method and device
CN114416015A (en) Audio adjusting method and device, electronic equipment and readable storage medium
CN111698593A (en) Active noise reduction method and device, and terminal
WO2018058331A1 (en) Method and apparatus for controlling volume
CN106657621B (en) Self-adaptive adjusting device and method for sound signal

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