android - notification tone over bluetooth
is there a way to play a tone over bluetooth?
I'm not trying to stream audio or anything fancy, I just want the headset to make a beep sound like when pressing an on开发者_JAVA百科 screen button or getting a call.
There is no current way to assign the device to play a sound. It will always play to the default output device.
If the Bluetooth headset is the default output device at that time, the MediaPlayer sounds will be heard in it.
Audio and Video
Audio and Video Playback
Media can be played from anywhere: from a raw resource, from a file from the system, or from an available network (URL).
You can play back the audio data only to the standard output device; currently, that is the mobile device speaker or Bluetooth headset. You cannot play sound files in the conversation audio.
精彩评论