diff --git a/fmapp2/src/com/caf/fmradio/FMRadio.java b/fmapp2/src/com/caf/fmradio/FMRadio.java
index 0acbc63..6fa9298 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadio.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadio.java
@@ -234,6 +234,7 @@
 
    /* Current Status Indicators */
    private static boolean mRecording = false;
+   private static boolean mRtPlusSupported = false;
    private static boolean mIsScaning = false;
    private static boolean mIsSeeking = false;
    private static boolean mIsSearching = false;
@@ -648,6 +649,7 @@
       MenuItem item;
       boolean radioOn = isFmOn();
       boolean recording = isRecording();
+      boolean RtPlusSupported = isRtPlusSupported();
       boolean mSpeakerPhoneOn = isSpeakerEnabled();
       boolean searchActive = isScanActive() || isSeekActive();
 
@@ -681,6 +683,9 @@
       if (item != null) {
           item.setVisible(sleepActive && radioOn);
       }
+      item = menu.findItem(MENU_TAGS);
+      if (item != null)
+          item.setVisible(RtPlusSupported);
       return true;
    }
 
@@ -1831,6 +1836,19 @@
       return(mRecording);
    }
 
+   private boolean isRtPlusSupported() {
+      mRtPlusSupported = false;
+      if (mService != null) {
+          try {
+             mRtPlusSupported = mService.isRtPlusSupported();
+          } catch (RemoteException e) {
+             e.printStackTrace();
+         }
+      }
+      Log.d(LOGTAG, "mRtPlusSupported: " + mRtPlusSupported);
+      return(mRtPlusSupported);
+   }
+
    private boolean isSpeakerEnabled() {
       boolean speakerEnabled = false;
       if (mService != null) {
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index e26a75e..c7f1682 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -125,6 +125,7 @@
    MediaRecorder mA2dp = null;
    private boolean mFMOn = false;
    private boolean mFmRecordingOn = false;
+   private static boolean mRtPlusSupport = false;
    private boolean mSpeakerPhoneOn = false;
    private int mCallStatus = 0;
    private BroadcastReceiver mScreenOnOffReceiver = null;
@@ -1504,6 +1505,11 @@
          return(mService.get().isFmRecordingOn());
       }
 
+      public boolean isRtPlusSupported()
+      {
+         return(mService.get().isRtPlusSupported());
+      }
+
       public boolean isSpeakerEnabled()
       {
          return(mService.get().isSpeakerEnabled());
@@ -2038,6 +2044,10 @@
       return mFmRecordingOn;
    }
 
+   public boolean isRtPlusSupported() {
+      return mRtPlusSupport;
+   }
+
    public boolean isSpeakerEnabled() {
       return mSpeakerPhoneOn;
    }
@@ -2706,6 +2716,7 @@
 
    public void clearStationInfo() {
        if(mFMRxRDSData != null) {
+          mRtPlusSupport = false;
           mFMRxRDSData.setRadioText("");
           mFMRxRDSData.setPrgmId(0);
           mFMRxRDSData.setPrgmType(0);
@@ -3000,6 +3011,7 @@
       {
          int tag_nums;
          Log.d(LOGTAG, "FmRxEvRTPlusInfo");
+         mRtPlusSupport =  true;
          if (mReceiver != null) {
              mFMRxRDSData = mReceiver.getRTPlusInfo();
              tag_nums = mFMRxRDSData.getTagNums();
diff --git a/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl b/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl
index 7b04d71..7a2062d 100644
--- a/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl
+++ b/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl
@@ -73,5 +73,6 @@
     long getRecordingStartTime();
     boolean isSleepTimerActive();
     boolean isSSRInProgress();
+    boolean isRtPlusSupported();
 }
 
