diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 7dacbee..6fc0d6a 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -1159,13 +1159,6 @@
 
        stopRecording();
 
-       if (!Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
-            Log.e(LOGTAG, "startRecording, no external storage available");
-            return false;
-       }
-
-        if (!updateAndShowStorageHint())
-            return false;
         long maxFileSize = mStorageSpace - LOW_STORAGE_THRESHOLD;
         if(FmSharedPreferences.getRecordDuration() !=
             FmSharedPreferences.RECORD_DUR_INDEX_3_VAL) {
@@ -1181,7 +1174,7 @@
 
         }
 
-        mStoragePath = Environment.getExternalStorageDirectory();
+        mStoragePath = getApplicationContext().getFilesDir();;
         Log.d(LOGTAG, "mStoragePath " + mStoragePath);
         if (null == mStoragePath) {
             Log.e(LOGTAG, "External Storage Directory is null");
@@ -1192,10 +1185,10 @@
         File sampleDir = null;
         if (!"".equals(getResources().getString(R.string.def_fmRecord_savePath))) {
             String fmRecordSavePath = getResources().getString(R.string.def_fmRecord_savePath);
-            sampleDir = new File(Environment.getExternalStorageDirectory().toString()
+            sampleDir = new File(getApplicationContext().getFilesDir().getPath().toString()
                     + fmRecordSavePath);
         } else {
-            sampleDir = new File(Environment.getExternalStorageDirectory().getAbsolutePath()
+            sampleDir = new File(getApplicationContext().getFilesDir().getAbsolutePath()
                     + "/FMRecording");
         }
 
@@ -1273,7 +1266,6 @@
                      if (mFmRecordingOn) {
                          stopRecording();
                      }
-                     updateAndShowStorageHint();
                  }
              }
         });
@@ -1306,7 +1298,6 @@
        String state = Environment.getExternalStorageState(mStoragePath);
        Log.d(LOGTAG, "storage state is " + state);
 
-       if (Environment.MEDIA_MOUNTED.equals(state)) {
           try {
                this.addToMediaDB(mSampleFile);
                Toast.makeText(this,getString(R.string.save_record_file,
@@ -1315,10 +1306,6 @@
           } catch(Exception e) {
                e.printStackTrace();
           }
-       } else {
-           Log.e(LOGTAG, "SD card must have removed during recording. ");
-           Toast.makeText(this, "Recording aborted", Toast.LENGTH_SHORT).show();
-       }
        try {
            if((mServiceInUse) && (mCallbacks != null) ) {
                mCallbacks.onRecordingStopped();
