开发者

Beep sound notification on Socket connection establishment

开发者 https://www.devze.com 2023-01-10 06:28 出处:网络
How can I make the Device sound a beep when socket connection has b开发者_JAVA技巧een established. In other words, how to set a notification tone when an event occurs in Android sdk? If you are the on

How can I make the Device sound a beep when socket connection has b开发者_JAVA技巧een established. In other words, how to set a notification tone when an event occurs in Android sdk?


If you are the one opening the socket, use MediaPlayer or SoundPool or ToneGenerator or AudioTrack or something to play back a beep.

If you are trying to arrange for beeps when other applications open sockets, that is not possible without firmware modifications.

0

精彩评论

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