android_begginer94
android_begginer94

Reputation: 19

Diverting phone ringing to earphones

When there is a phone call and if im using my earphones,i want the sound of the ringtone to go through the earphones. In this app setSpeakerphoneon() is not working, any other ideas to stream the ringing through earphones when a call comes?

P.S:im using sdk 2.3.3

Upvotes: 1

Views: 8061

Answers (1)

Michael
Michael

Reputation: 58497

Every single Android implementation I've seen routes ringtones to Speaker + wired headset/headphones if you've got a wired accessory attached. If you want the ringtone to be played only in the wired accessory you should be able to accomplish that with AudioManager.setRingerMode() (using RINGER_MODE_VIBRATE or RINGER_MODE_SILENT).
This might be undesirable for the user though, especially if there's no wired accessory attached or the user doesn't have the earplugs in his/her ears.

Upvotes: 0

Related Questions