开发者

android - notification tone over bluetooth

开发者 https://www.devze.com 2023-01-27 11:03 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消