Nathan's code works but gives two notifications for each change system settings. To avoid that, use the following
public class SettingsContentObserver extends ContentObserver {
int previousVolume;
Context context;
public SettingsContentObserver(Context c, Handler handler) {
...
if yes, simple @Roshnijain just register boradcast receiver.. see this sample..it periodcially checks internet.. if u turn off and turn on.. same @Roshnijain
see u need to go step by step.. first check whether u can get something like this.. if (audioManager.isSpeakerphoneOn()) { //make it as false..check whether this is working or not.. @Roshnijain }
then implement that in onreceive..because u need to check that periodically right @Roshnijain
?? @IshitaSinha i am shadow!!!~ramji from chennai,India.. don't forget tomorrow.. then dishyum dishyum..or like gajini note down in few space in memory..just<1 kb :P