Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8416027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:37:21+00:00 2026-06-10T01:37:21+00:00

I have an app that works correctly on Android and iOS, but currently fails

  • 0

I have an app that works correctly on Android and iOS, but currently fails on BlackBerry (OS 6.0+). The app used to work on all 3 flavors, but since converting the app to download updates dynamically (rather than re-publishing the app each time there’s a minor change to some Javascript), the app fails to get past the getDirectory function. I am using Cordova 1.8.1.

Here is the beginning part of my JavaScript code that executes when the device is ready:

function onDeviceReady(){
    // get the filesystem setup and run the pre-loader (follow the callback road)
    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail_FS);
}

function gotFS(fileSystem) {
   fileSystem.root.getDirectory("data", {create: true}, gotDir, fail_GD);   
}

function gotDir(dir) {
    console.log("got dir");
    DATADIR = dir;
    // code for downloading/updating files goes here
    // left out for brevity and lack of relevance at this point
}

function fail_FS(error){
    fail(error,'requestFileSystem');
}

function fail_GD(error){
    fail(error,'getDirectory');
}

function fail(error,call){
    console.log("ERROR: "+call);
    console.log(JSON.stringify(error));
}

I get an Error Code of 1 from the getDirectory call (GotFS function). I have added extra comments to test. Here is what I know:

fileSystem = ‘persistent’
fileSystem.root.name = “”
fileSystem.root.fullPath = ‘file:///store’

I’ve checked the documentation on Cordova here and here and here is what I have in my config.xml

<feature id="blackberry.system" required="true" version="1.0.0.0" />
<feature id="org.apache.cordova" required="true" version="1.0.0" />
<feature id="blackberry.find" required="true" version="1.0.0.0" />
<feature id="blackberry.identity" required="true" version="1.0.0.0" />
<feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
<feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
<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.app" required="true" version="1.0.0.0" />
<feature id="blackberry.app.event" required="true" version="1.0.0.0" />
<feature id="blackberry.system.event" required="true" version="1.0.0.0"/>
<feature id="blackberry.widgetcache" required="true" version="1.0.0.0"/>
<feature id="blackberry.media.camera" />
<feature id="blackberry.invoke" />
<feature id="blackberry.invoke.BrowserArguments" />
<feature id="blackberry.identity" />
<feature id="blackberry.ui.dialog" />
<feature id="blackberry.system" />

<access subdomains="true" uri="file:///store" />
<access subdomains="true" uri="file:///store/data" />
<access subdomains="true" uri="file:///SDCard" />
<access subdomains="true" uri="*" />
<rim:permissions>
    <rim:permit>use_camera</rim:permit>
    <rim:permit>read_device_identifying_information</rim:permit>
    <rim:permit>access_shared</rim:permit>
    <rim:permit>read_geolocation</rim:permit>
</rim:permissions>

Among other info… And here is what’s in my plugins.xml:

<plugins>
  <plugin name="App"            value="org.apache.cordova.app.App"/>
  <plugin name="Device"         value="org.apache.cordova.device.Device"/>
  <plugin name="Camera"         value="org.apache.cordova.camera.Camera"/>
  <plugin name="NetworkStatus"  value="org.apache.cordova.network.Network"/>
  <plugin name="Notification"   value="org.apache.cordova.notification.Notification"/>
  <plugin name="Accelerometer"  value="org.apache.cordova.accelerometer.Accelerometer"/>
  <plugin name="Geolocation"    value="org.apache.cordova.geolocation.Geolocation"/>
  <plugin name="File"           value="org.apache.cordova.file.FileManager"/>
  <plugin name="FileTransfer"   value="org.apache.cordova.http.FileTransfer"/>
  <plugin name="Contacts"       value="org.apache.cordova.pim.Contact"/>
  <plugin name="Capture"        value="org.apache.cordova.capture.MediaCapture"/>
  <plugin name="Battery"        value="org.apache.cordova.battery.Battery"/>
  <plugin name="Media"          value="org.apache.cordova.media.Media"/>
  <plugin name="ChildBrowser"   value="org.apache.cordova.plugins.childbrowser.ChildBrowser"/>
</plugins>

I suspect it’s just a matter of something simple (like I’m doing something wrong with the access permissions in the xml), but after trying various different things and searching all over the internet, I’m stumped…

Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:37:23+00:00Added an answer on June 10, 2026 at 1:37 am

    Your code looks correct to me.

    If you have the BlackBerry connected to USB and entered your device password when prompted at the “USB Drive” screen, you would have enabled ‘mass media/storage mode’. This will lock the file system to the USB and prevent your app from accessing it. I would expect you would see an error when trying to call fileSystem.root.getDirectory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SharedPreferences that currently works in one class but doesn't work in
I have a facebook app using a lot of Javascript that doesn't work correctly
I need to build an app that works on IPhone , Android and Blackberry
Ok, currently I have a view in my android app that displays a list
I have a mobile app that I targeted for iOS and Android. It makes
I have built an app that works only when not run as a Windows
This is probably a setting error somewhere. I have a django app that works
I have an App that downloads and displays images from URL's. This works fine
Story: One of the app that i have works on python 2.4 and other
I have an MVC3/EF4.1 app that I'm building which now works fine on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.