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

Web and WebWorks Development

Reply
Developer
Posts: 54
Registered: ‎10-05-2012
My Device: -
Accepted Solution

Error FileDownloader Extension on BlackBerry OS 7

Hi,

 

I am trying to develop an application using FileDownloader Extension. It works fine on BlackBerry OS 6. But, when I test it on BlackBerry OS 7 device, it always shows error message "unable to create file: null undefined". Is there any changes I should do to make it work?

 

 

Thanks in advance.

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Error FileDownloader Extension on BlackBerry OS 7

Hi there, I'm assuming this is the extension you are referring to:
https://github.com/blackberry/WebWorks-Community-APIs/tree/master/Smartphone/FileDownloader

It seems to have been tested on OS 6.0 and 7.0, so my expectation is that it should work.

I see you've logged the issue for this:
https://github.com/blackberry/WebWorks-Community-APIs/issues/246

So right now it's in the best place, and we'll need to see what the owner of the extension says. In general, there shouldn't really be anything additional needed as far as I can tell.

One thing to double check; where are you saving the file to? If the SD Card, do both device have an SD Card inserted?

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
Posts: 54
Registered: ‎10-05-2012
My Device: -

Re: Error FileDownloader Extension on BlackBerry OS 7

Thanks for your reply. I am waiting for the solution from github, too.

I am saving the file to device and I set the destination path to file:///store/home/user/pictures/[appname]/[filename].jpg. Is there any differences about media pictures folder on BlackBerry OS 6 and OS 7?
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Error FileDownloader Extension on BlackBerry OS 7

Based on this documentation, there shouldn't be any difference in the root folders:

6.0: http://docs.blackberry.com/en/developers/deliverables/17952/Storing_files_in_the_file_system_1219757...

7.0: http://docs.blackberry.com/en/developers/deliverables/29299/Storing_files_in_the_file_system_1554343...

And both seem to have "file:///store/home/user/" as valid paths. I haven't been able to find any indication that the pictures folder has changed. By all accounts if it works in one place, I'm not sure why it's not working in the other.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
Posts: 54
Registered: ‎10-05-2012
My Device: -

Re: Error FileDownloader Extension on BlackBerry OS 7

Thanks for your reply, oros. Is there any special permission for app to write file/folder in BB OS 7?
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Error FileDownloader Extension on BlackBerry OS 7

There shouldn't be as far as I'm aware. Have you tested on multiple devices by chance? The OS7 test device isn't corporate / wouldn't have IT Policies restricting the access?

The issue itself seems to be stemming from this file (Lines 166-172):
https://github.com/blackberry/WebWorks-Community-APIs/blob/master/Smartphone/FileDownloader/src/webw...

It could also occur from within the createFolders function:
https://github.com/blackberry/WebWorks-Community-APIs/blob/master/Smartphone/FileDownloader/src/webw...

Perhaps some extra debugging in the extension could help point at the actual cause, but at this point I'm not sure.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.