broadcast.First, create a subclass of BroadcastReceiver to listen to the plug-in and pull-out of the headset:[Java]Public class HeadsetPlugReceiver extends BroadcastReceiver {Private static final String TAG = "headsetplugreceivreceiver ";@ OverridePublic void onReceive (Context context, Intent intent ){If (intent. hasExtra ("state ")){If (intent. getIntExtra ("state", 0) = 0 ){Toast. makeText (context, "
I have no interest in pop songs. I did not know who the Four Kings were for a long time in elementary school, I used to think that "Andy Lau" is the one who played the pig in "Journey to the West" (that is called Andy Ma ). I was surprised and puzzled when I saw the girls chasing the Tigers frantically. When I got to high school, I only occasionally listened to broadcast programs. But from college, I became addicted to music. If we trace it back, we should have got our first Walkman from the fre
Recently, I have been studying how to use headphones for some control operations, which naturally involves how to check whether the earphones are inserted. After some queries and experiments, I will summarize the following:
1. Principle:
In fact, the android system will send broadcasts when the earphones are inserted and pulled out. Therefore, to detect the status of the earphones, you only need to register the broadcastreceiver to respond to the status.
The broadcast name is:Android. Intent. Ac
Fever fish:Recently, some netizens often asked me how to renew my earphones. In fact, I have never been reluctant to deliberately hide a pair of headphones, because if it is done well, it is just a little faster to enter the status, such as hd600, it would have taken about two hours to get into the status every day. However, if you do not have a hard time, it may shorten the service life of your earphones and even cause permanent physical damage to your earphones, for example, when I found someo
how Android listens for key events on a Bluetooth headsetWrite in front:Directly want the code very easy, you can directly pull the scroll bar to the bottom to be able to see. If you want to understand why, then follow the steps I have planned to understand. The following test environment with "Bluedio + red rice mobile phone"on hand.1. Use of Bluetooth headsetThe use manual of Bluetooth headset will have relevant specific use instructions, here to pi
"Do you want a headset?"
For a pair of newly bought headphones, the sound has not yet achieved its own ideal performance, based on the new headset unit components, shock film, Wire and so on are still in a new stage, not warm up under the timbre, sound quality performance will still have a lot of problems, generally reflect the characteristics of the hearing is "too tight, rough, cold, burr or heavy-toothe
if no earphones are inserted, after the headset is inserted, the cat state is 1.
3. Modify headsetobserver. Java on the upper layer (/frameworks/base/services/Java/COM/Android/Server)
The upper-layer headsetobserver. Java determines how to implement channel switching through the State reported at the bottom layer.
You
bluetooth headset matching before, to ensure full power, generally to charge more than 2.5 hours before the line.
If it is a newly bought headset, has not been connected with other devices, the headset will have voice prompts, automatic search can be paired with the device. At this point to the mobile phone and other Bluetooth-enabled devices to open
Android automatically exits the FM Radio application when the flight mode is enabled and the headset is pulled out.
The FM radio needs to be inserted into the headset as an antenna, and automatically exits when the headset is pulled out.
1. First add the prompt string
Mediatek/packages/apps/FMRadio/res/values/strings. xml
The FM will close because you hav
mac headset Kong Liang a red light solution. Many users who use Macs have encountered a problem with the Kong Liang of the Mac headset, with the built-in speaker malfunctioning. What's the reason for that Mac headset Kong Liang red light? The following small series will give you the Mac headset Kong Liang red light, wh
How does a Bluetooth headset connect to a computer?
Bluetooth headset is the application of Bluetooth technology in the headset, so that users can be exempted from annoying wire, easy to talk in a variety of ways. Since the advent of Bluetooth headset, has been the action of business people to improve the efficiency o
Click to view the highlighted solution directly.Finding a laptop with this newly bought headset has a slight current of one months ago. It belongs to the kind of quiet, but can hear the sound, knocking on the keyboard or when placing a water cup if a slight vibration, there is a variety of current fluctuations, a rumble, and finally collapsed. Dick Silk can not afford to buy a computer-specific headphones, only make a phone
1. if our Apple 4s does not find our Bluetooth headset, we can try to set the Bluetooth function in the Apple mobile phone or test the related switch of the Bluetooth headset, then try to search for a Bluetooth device.2. another possibility is that the Bluetooth headset uses a battery, so that if your Bluetooth headset
if one of the most significant accidents occurs in a project, it is no doubt that the developer is using an element that is not controllable.
Objective
iOS development in the development of audio and video playback is not uncommon, users often use an output device, that is, "headphones", this blog is about some of the development of headphones related technical points. Detect if the headset is plugged in
See above the title of the time
We still remember yesterday small make up to everyone introduced a "Win7 How to open Bluetooth" article? After the article was published, many netizens paid attention to it. Due to the growing popularity of Bluetooth devices, today's small series to continue to introduce a Win7 Bluetooth headset connection method knowledge points!
Win7 Bluetooth Headset connection method:
Click on the Bluetooth icon in th
By default, the short press headset key is used to pause/play music. You can press the headset key to pause/play FM as follows:
Please delete your media button code, modify as below:
1. AndroidMenifest. xml:
2. FMRadioActivity. java code:
Public interface MediaButtonListener {
Void onMediaButtonCall (Intent intent );
}
Private MediaButtonListener mMediaB
A. Verifying the normal headset equipment
: If there is a problem with the headset, then there will be no sound when the headset is plugged into the notebook.
Verification Method:
Method One:
Look for sound when you plug the headset device into another computer or mobile device. If the
unplug:
[Java]
Copy Code code as follows:
public class Headsetplugreceiver extends Broadcastreceiver {
private static final String TAG = "Headsetplugreceiver";
@Override
public void OnReceive (context context, Intent Intent) {
if (Intent.hasextra ("state")) {
if (Intent.getintextra ("state", 0) = = 0) {
Toast.maketext (context, ' headset not connected ', Toast.length_long). Show
bluetooth headset and PC connection listening to music needs to be sure that the computer's Bluetooth drive and sound card drivers are properly installed, while the PC's Bluetooth switch has been turned on.
Now let's take the Nokia bh―104 bluetooth headset For example, there may be a slight difference in the connection between the Bluetooth headphones. Please refer to the Bluetooth
First confirm the computer Bluetooth on, the Bluetooth light is normal, and turn on the bluetooth headset switch.
Operation Steps:
Click on the Bluetooth icon in the lower right corner of the system and select "Add Device" as shown:
Select the Bluetooth headset you want to add, as shown in figure:
You are prompted to connect to the Bluetooth adapter, as shown in the figure:
Then prompt to add s
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.