tags:

views:

35

answers:

1

Hello, How can I make the Device sound a beep when socket connection has been established. In other words, how to set a notification tone when an event occurs in Android sdk?

A: 

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.

CommonsWare