Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
03-10-2014 11:08 PM
I'm trying to read the list of jpg files on in the sdcard's camera directory. It seems to see some of the images, but not all of them. Currently I've deleted all photos and copied a JPG file into that directory from my computer, and it's not seeing it, My code, roughly, is as follows:
QFileInfoList sdPhotos = sdDir.entryInfoList(nameFilters, QDir::Files, QDir::Time);
qDebug() << "Number of SD photos: " << sdPhotos.size();
There is definitely a jpg file in that directory. I have also used the "Target File System Navigator" in the IDE to browse to:
... and I can see the file.
And yes, my app has permission to used shared files.
I don't have any brilliant ideas for why the app can't see the file. (and even stranger that my recollection was that, before I cleared the directory, it saw a small subset of the files in the directory)
Solved! Go to Solution.
03-10-2014 11:09 PM
Yeah... as I thought: If I take a photo with the camera and try again, it now sees that 1 file, but doesn't see the other test.jpg file there. What gives?
03-10-2014 11:14 PM
If I connect to the device via telnet and go to that directory, I see this:
$ cd camera
$ ls -ltr
-rw-rw---- 1 root 1000_shared 894237 Mar 10 21:27 test.jpg
-rw-rw---- 1 root 1000_shared 777109 Mar 10 23:07 IMG_20140310_230720.jpg
So the two files are plainly there, and they both have the same permissions, but:
Number of SD photos: 1
03-10-2014 11:15 PM
03-11-2014 08:02 AM
Wow.... *rolls eyes*
This is when I say "REALLY?!?!?".
If this was reported early last year and was never fixed in the API, I am scarce to come up with a good excuse for team BlackBerry... oh yoy yoy.
I'll give this theory a try tonight to see if resolve the issue. Thanks very much for pointing me to that forum post.
03-11-2014 08:12 AM
03-11-2014 08:15 AM
The related forum post does refer to two tickets, but when I click them, I get:
You cannot view this issue because you are not the issue reporter or assignee, a member of the project group, or a member of the issue group and this issue is closed or in triage.
If you think this message is wrong, please consult your administrators about getting the necessary permissions.
03-11-2014 08:18 AM - edited 03-11-2014 08:24 AM
03-11-2014 08:23 AM
I gave it a try, and sure enough, adding:
DEFINES += _FILE_OFFSET_BITS=64
DEFINES += _LARGEFILE64_SOURCE=1
... to the .pro file solves the issue.