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
Highlighted
New Contributor
Posts: 6
Registered: ‎07-20-2013
My Device: Blackberry Z10
My Carrier: Orange
Accepted Solution

Problems with FileTransfer in Cordova 2.6.0

Hi,

 

I'm writing a Phonegap / Cordova app that has to download a lot of files from a website in order to run. they're mostly images but a few json files as well. Works fine on iOS and Android but on Blackberry 10 I'm getting error code 10 which is QUOTA_EXCEEDED_ERR.

 

My config.xml file I think has all the relevant permission -

 

  <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
  <feature id="blackberry.utils" required="true" version="1.0.0.0" />
  <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />

  <feature id="blackberry.io.filetransfer" required="true" version="1.0.0.0" />
  <feature id="blackberry.io" required="true" version="1.0.0.0" /> (i'm not sure if it needs this one but i added it anyway)

and then     <rimSmiley Tongueermit>access_shared</rimSmiley Tongueermit> in the <rimSmiley Tongueermissions> section.

 

What else do i need to do?

 

Thanks,

 

Paul

New Contributor
Posts: 6
Registered: ‎07-20-2013
My Device: Blackberry Z10
My Carrier: Orange

Re: Problems with FileTransfer in Cordova 2.6.0

I should say I get this issue both in the BB10 simulator and on a BB10 device

New Contributor
Posts: 6
Registered: ‎07-20-2013
My Device: Blackberry Z10
My Carrier: Orange

Re: Problems with FileTransfer in Cordova 2.6.0

Well I figured it out eventually. whereas on iOS and Android you request the persistant storage directory using:

 

fileSystem.root.getDirectory("unique-directory-name",{create:true},gotDir,onError);

 

on Blackberry you have to use the following instead:

 

blackberry.io.sandbox = false;
fileSystem.root.getDirectory(blackberry.io.sharedFolder + '/downloads',{create:false},gotDir,onError);

Visitor
Posts: 1
Registered: ‎09-27-2013
My Device: BB z10, playbook
My Carrier: Tušmobil

Re: Problems with FileTransfer in Cordova 2.6.0

There is blackberry object available, but  I  always get 

 

blackberry.io.sharedFolder
undefined
 
and also 
blackberry.io.home
undefined
 
Do I have to set something to have this paths accessible.  I think I already have all the needed things configured in config.xml and plugins.xml
 

<feature id="blackberry.io.file" required="true" version="1.0.0.0" />
<feature id="blackberry.utils" required="true" version="1.0.0.0" />
<feature id="blackberry.io.dir" required="true" version="1.0.0.0" />

 

<rimSmiley Tongueermit>access_shared</rimSmiley Tongueermit>

 

and plugins

 

<plugin name="File" value="org.apache.cordova.file.FileManager"/>

<plugin name="FileTransfer" value="org.apache.cordova.http.FileTransfer"/>