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
2010-08-03 20:37:05