diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index c62267e..a095d11 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -979,13 +979,28 @@
                        && (key_action == KeyEvent.ACTION_DOWN)) {
                 Log.d(LOGTAG, "SessionCallback: MEDIA_PLAY");
                 if (isAntennaAvailable() && mServiceInUse) {
-                    fmOn();
-                    try {
-                        if (mCallbacks != null ) {
-                            mCallbacks.onEnabled();
+                    if (isFmOn()){
+                        //FM should be off when Headset hook pressed.
+                        fmOff();
+                        try {
+                            /* Notify the UI/Activity, only if the service is "bound"
+                             * by an activity and if Callbacks are registered
+                             * */
+                            if ((mServiceInUse) && (mCallbacks != null) ) {
+                                mCallbacks.onDisabled();
+                            }
+                        } catch (RemoteException e) {
+                            e.printStackTrace();
                         }
-                    } catch (RemoteException e) {
-                        e.printStackTrace();
+                    } else {
+                        fmOn();
+                        try {
+                            if (mCallbacks != null ) {
+                                mCallbacks.onEnabled();
+                            }
+                        } catch (RemoteException e) {
+                            e.printStackTrace();
+                        }
                     }
                     return true;
                 }
@@ -1561,10 +1576,12 @@
                   return;
               }
               switch (msg.arg1) {
-                  case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK:
-                      Log.v(LOGTAG, "AudioFocus: received AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK");
                   case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT:
                       Log.v(LOGTAG, "AudioFocus: received AUDIOFOCUS_LOSS_TRANSIENT");
+                      if (true == isFmRecordingOn())
+                          stopRecording();
+                  case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK:
+                      Log.v(LOGTAG, "AudioFocus: received AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK");
                       if (true == mPlaybackInProgress) {
                           stopFM();
                           mStoppedOnFocusLoss = true;
