Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
New Developer
Posts: 55
Registered: ‎04-04-2012
My Device: Z30, Z10LE, Q5 & PlayBook
My Carrier: German Provider

Permission restrictions with files on memory card, compared to OS

Hi there!

 

I've encountered another annoying issue with my app PhotoUploader. When I read the photos from the camera folder on the memory card, I sometimes do not get all the files that are shown inside the BlackBerry Photo app or the file manager.

 

It looks like this happens when the memory card was not formatted with this device and / or some pictures where taken with another device as well. So this could depend on the ownership of the files. I'm using this piece of code:

 

QDir dir(path); // /accounts/1000/removable/sdcard/camera
QFileInfoList result = dir.entryList(QDir::Files, QDir::Time | QDir::Reversed);

 

The user, and I too, expect to get the same files as the BlackBerry photo app or the file manager does, but that does not happen in some cases. For me, from a developer point of view, it looks like I have not the same (read-)access to the files. My app looks to run in a different context and in a different user environment.

 

Is there any chance to retrieve the full list of files in that directory? - Currently I recommend the user to backup the sd card and format it thereafter in there BB10 device. Then copy all the data back. That normally do the trick, but it's not very user-friendly...

 

Any help and suggestion would be greatly appreciated!

 

Best,

Sven

 

---
Developer ReadItNow!, PhotoUpload, WhereIs...?, Magic4Square and OrganizeMe!

http://sven-ziegler.com
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Permission restrictions with files on memory card, compared to OS

Sounds like that could be a bug. Please report it to the Developer Issue Tracker:

 

DIT

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
New Developer
Posts: 55
Registered: ‎04-04-2012
My Device: Z30, Z10LE, Q5 & PlayBook
My Carrier: German Provider

Re: Permission restrictions with files on memory card, compared to OS

I'm very unsure about that, I guess it could be same issue like my other thread: http://supportforums.blackberry.com/t5/Native-Development/QDir-entryInfoList-gt-std-bad-alloc/td-p/2...

 

For that thread a bug is already reported, for over one year right now and the issue is not solved. Opening issue looks not like a promising way to get issues solved...

 

Best,

Sven

---
Developer ReadItNow!, PhotoUpload, WhereIs...?, Magic4Square and OrganizeMe!

http://sven-ziegler.com
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Permission restrictions with files on memory card, compared to OS

Unfortuatenly it can take time for an issue to be prioritized, fixed internally, tested, and put out in a build available to outside users. It may be slow, but not submitting an issue is a good way to ensure it never gets fixed.

 

The file system issue you mentioned had a few depencies that needed to be resolved before the actual issue could be fixed. It has been fixed internally, but it may not have made it into an external build yet.

 

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
New Developer
Posts: 55
Registered: ‎04-04-2012
My Device: Z30, Z10LE, Q5 & PlayBook
My Carrier: German Provider

Re: Permission restrictions with files on memory card, compared to OS

Good point, you're right about that. But I think that this issue is directly linked to the one I mentioned in my last post. Since I switched the access to the files, as mentioned in the other thread, I was able to see all the files I expected to see. So it looks like no issue with the permission, but perhaps with the inode. I need to to some further investigation, before I'm willing to open another issue or mark this thread as resolved. I hope thats okay for you.

 

Best,

Sven

---
Developer ReadItNow!, PhotoUpload, WhereIs...?, Magic4Square and OrganizeMe!

http://sven-ziegler.com