I want to check if the phone has SD card inserted or not. Actually I want to provide user to select the storage location.
This question has several duplicates, however, you can check for the SD card like this:
Boolean isSDPresent = android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);