01-28-2013 07:15 AM
Hello,
I want to read images from sdcard. What path should i use to access it in QDirIterator ?
In simulator i see this path "/accounts/1000/removable/sdcard"
In a few forum posts i see "file:///SDCard/.."
Can any one please confirm if above works on device.
I would prefer not to use the full path. Can 1000 ever change ?
Thanks
01-29-2013 01:55 AM
Ill ty to use
QDir::currentPath() + "/../../removable/sdcard"
Hopefully this will work on the device. Did not find sdcard path in any official documentation.
01-29-2013 03:15 AM
Can 1000 ever change ?
No, the "1000" wont change. See the BB10 Filesystem explained here...
-Dishooom
01-29-2013 09:05 AM
thanks .. good to know
02-01-2013 04:05 AM
I used QDir::currentPath() + "/../../removable/sdcard" in an app also. A friend confirmed that it worked on a device.
Hadn't seen the "file:///SDCard/" one before. Have you tried that at all?
02-01-2013 06:32 AM
I got QDir::currentPath() + "/../../removable/sdcard" from your post
Was going to use full path but this is nicer and fits better with my app as i used relative path from home anyway.
QDir("file:///SDCard/").exists() returns false so it wont work. I thought there maybe some internal translation as there is no folder /SDCard/.
Btw , I see now that the simulator has /sdcard/ and /sdcard2/
/sdcard/ is internal storage (shared)
and /sdcard2/ is same as /accounts/1000/removable/sdcard/ so it must be for sd card.
I bank on your friends testing for now. Only have playbook.
I pushed app update for approval. Ill update this post if i get any complaints ![]()
02-02-2013 08:18 PM
SpacemanSpiff wrote:
I got QDir::currentPath() + "/../../removable/sdcard" from your post
![]()
Was going to use full path but this is nicer and fits better with my app as i used relative path from home anyway.
...
Btw , I see now that the simulator has /sdcard/ and /sdcard2/
/sdcard/ is internal storage (shared)
and /sdcard2/ is same as /accounts/1000/removable/sdcard/ so it must be for sd card.
Heh. Can't remember my own posts...
One note - /sdcard and /sdcard2 definitely won't work. They work on the simulator, but not actual devices.
02-03-2013 03:04 AM
thanks for that , ill only use the ...removable... link.
wierd that they should have them on simulator.
02-03-2013 03:07 AM
I should have been clearer -- I think the reason they don't work is due to access restrictions, there being fewer on the simulator.