Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
Talk:How to check if device has memory card or not
Under drive lette E may be internal non removable card. Like - mass media internal storage. Your code is not correct.
Jp4symbian - Memory card or mass memory?
Has anyone figured out how to differentiate memory card from mass memory. Both have similar TDriveInfo type of EMediaHardDisk.Also PathInfo::MemoryCardRootPath() returns the Mass memory drive rather than the Memory card drive.
16:00, 13 October 2011 (EEST)
Hamishwillee - @Jp4symbian - perhaps KDriveAttRemovable
Its quite possible the author is not watching this article which they created in 2007. I suggest you raise the request on the forums - but I would appreciate it if you added the answer to the article if you find one.
I suspect the mass memory is just a MMC card soldered in, which is why it returns as a memory card for PathInfo. I'd search on KDriveAttRemovable in the library.
03:52, 14 October 2011 (EEST)
I just posted in case someone reaches this page while searching & might know the solution.My test on Nokia C7 says that KDriveAttRemovable is set for both Mass Memory & Memory Card.
09:37, 14 October 2011 (EEST)
Hamishwillee - That sux.
Thanks for letting me know. That is bad. Can we reasonably assume that the drive will be the later of any drives that report themselves as MMC? Otherwise I again suggest you try the discussion boards. If you don't get an answer in a few days send me a link (private messaging) and I'll see if I can find a file system person from my mis-spent Symbian Ltd days to give us an answer.
08:33, 17 October 2011 (EEST)
On S60 devices I'm using a "top-down" approach: First, I'm scanning for EDriveF, then for EDriveE. As type, I've set EMediaHardDisk for both, memory card and mass memory. If there's a mass storage available, the memory card will probably have drive letter F and subsequently the memory card will have drive letter E. If there's no mass storage, drive letter F will be not in use and therefore the memory card will have drive letter E. I can confirm that KDriveAttRemovable is set for both memories.
19:28, 3 November 2011 (EET)
Hamishwillee - @patrick - copy in your code?
Would it be possible for you to copy your code into the article in its own section? That would save other developers having to re-invent the wheel.
05:31, 4 November 2011 (EET)
I've done something like that...
for (TInt driveNumber=EDriveF; driveNumber>=EDriveE; driveNumber--)
if(driveInfo.iType == EMediaHardDisk)
// if there is a mass storage (EDriveE), the memory card (EDriveF) will be detected during the first loop
// if there is no mass storage, the memory card will be detected during the second loop as it will be on EDriveE
13:19, 6 November 2011 (EET)
Hamishwillee - @Patrickfrei - thanks
Thanks Patrick, its a start for people, which is a good thing. When/if a bullet proof set of code is created it should be merged into the above article. regardsH
07:38, 9 November 2011 (EET)