Local call in Black Berry Z10 failed

Hello

I'm developing and deploying an application in my BB Z10. I have an error - 'Cannot find variable' - local

Here is the code where I call the local:

===========================================================================

window.requestFileSystem = window.requestFileSystem | window.webkitRequestFileSystem;
var fs = null;

{$(document) .ready (function ()}
document.addEventListener ("webworksready", Function {}
Try
{
window.requestFileSystem (LocalFileSystem.PERSISTENT, 0, {function (filesystem)})
FS = file system;
(}, errorHandler);
}
catch (ex)
{
Alert (ex.message)
}
(}, false);
});

I had https://developer.blackberry.com/html5/apis/localfilesystem.html and https://developer.blackberry.com/html5/documentation/using_webworks_apis.html study and follow the instructions, but all the APIs that begin with "HTML5" have been omitted to mention (my app has worked well with other APIs like FileTransfer, IO etc.).

Can someone please suggest how to solve?

Thank you.

Kind regards

Kian ping

The function below worked perfectly for me on a Z10 running OS 10.1.  Let me know if it works for you too you wait the webworks loan event and have all the settings necessary config.xml (for example, the permission to access the directory shared as well as adding the blackberry.io function).  Let me know if you have any other questions!

function checkPDF() {}
BlackBerry.IO.sandbox = false;
var hasPDF = false;
() window.webkitRequestFileSystem
window. TEMPORARY,
1024 * 1024,
{function (FS)}
Console.log ("harr", blackberry.io.sharedFolder + ' / downloads ');
() fs.root.getDirectory
blackberry.io.sharedFolder + "/ downloads."
{create: false},
{function (Folder)}
Console.log ("the folder", folder.fullPath);
folder.createReader (.readEntries)
{function (Entries)}
Console.log ("INPUT:", entries); CONSOLE SANITY CHECK
for (var i = 0; i)< entries.length;="" i++)="">
If (entries [i].name.indexOf ('.pdf')! = - 1)
hasPDF = true;
}
Alert (hasPDF); HERE IS YOUR ANSWER
},
fsError
);
},
fsError
);
},
fsError
);
};

Tags: BlackBerry Developers

Similar Questions

  • BlackBerry Khmer Unicode for Black Berry Z10 Z10

    Hi all

    I'm in Phnom Penh, Cambodia. I just bought a smart phone of black Berry Z10 and I just want to use Khmer fonts with my phone. So, I wonder if there at - it the Khmer fonts or unicode taking in charge with the phone?

    Hey Kyan,.

    Welcome to the community of BlackBerry Support Forums.

    Thanks for the question.

    Currently khmer unicode is not supported on the BlackBerry Z10 smartphone.  Additional languages continue to be added in the software updates.  Control of updates in the future.

    Let me know if you have any other questions.

    See you soon.

  • World of blackBerry BLaCk BeRrY Z10

    my black Berry opens not only loading with circle and opened

    Hello humam146,

    Welcome to the BlackBerry support community.

    Thank you for your question about BlackBerry World showing the circle of rotation when you access the application on your BlackBerry Z10 smartphone.

    The following article will help you to solve this problem:

    http://bbry.lv/11qtvdt

    Let us know if that helps.

  • BlackBerry Z10 Black berry Z10 works / stop button inoperable

    Hello I hope you do well and the best of your health, that my power of black berries Z10, button walk / stop is out of order his does not work even after by pressing and holding for 10-15 seconds, I am unable to turn off my cell phone is there any other option to turn on/off my cell with the help of this power to the bottom of my cell key? as the power on off button is broken and my laptop is on since 2 days kindly difficulty tone, deliver and develop

    Concerning

    Umair Ali Shah

    Hello and welcome to the community!

    This behavior has always been like that? Or is this new behavior? If new behavior, what happened just before it started to please? An update of the OS? A new application? Fall or physically damaged? Something else? Please think very carefully, as the smallest thing could perhaps be causal.

    Also, I'm a bit confused... the power button is at the bottom of your cell, you say? Z10 button is at the top, so I'm confused as to what real device, you use...

    Let us know.

  • When I start the software Black Berry via the Office to receive the error message "the Black Berry Desktop software has encountered a problem and needs to close. We are sorry for the inconvenience. »

    Original Titus: cannot install software blackberry "BOLD"

    When I start the software Black Berry through the icon to the desktop, the windows error reporting or display below:

    Quote: Black Berry Desktop has encountered a problem and needs to close. We are sorry for the inconvenience.

    If you were in the middle of something, the information you were working on might be lost.

    Please tell this problem to Microsoft.

    We have created an error report that you can send improve us Black Berry Desktop Software. We will treat this report as confidential and anonyomous.

    End of quote

    What data means this error report contain?

    Why should I report to Microsoft?

    I received error below during the repair software blackberry

    Quote: The path:

    ' C:\DOCUME "1\HLZUTS" 2\LOCALS "1\TEMP\WZSE1. Berry TEMP\BLACK Office software.msi' is not found. Make sure you have access to this location and try again, or try to find the installation package "Black Berry Desktop Software.msi" as a folder that you can install the Black Berry Desktop Software 6.1 product

    End of quote

    No path

    Hi ZiaHL,

    Try the steps listed in the article mentioned below and check if it helps you to fix the problem:

    "BlackBerry Desktop Manager has encountered a problem and needs to close. We are sorry for the inconvenience. "during the synchronization process

    http://BTSC.webapps.BlackBerry.com/BTSC/dynamickc.do?externalId=KB10340&sliceId=&command=show&forward=nonthreadedKC&kcId=KB10340

    You can also view the article mentioned below for more information:

     

    BlackBerry Desktop Software issues fixed in this release

    http://docs.BlackBerry.com/en/Admin/deliverables/20936/BlackBerry_Desktop_Software_Fixed_904527_11.jsp

    Let us know if that helps.

  • local calls without the + 1?

    I don't seem to be able to make local calls within US 10-digit (area code + phone number) without Skype adding + 1 which in turn prevents calls to go through. Anyone else having this problem? A solution of Workaround available?

    Thank you!

    Never mind - I just realized my answer. I use a phone GE Skype and thinking + 1 has been inserted automatically but is not - and it is mandatory to use the country code before the 10-digit number. All is well now.

  • Black Berry sync software unable to Synch with Yahoo

    My Black Berry Desktop software Sync used to work perfectly, backup and sync phone Contacts and calendar with Yahoo. Now it errors when it tries to synchronize the calendar with the server connection is lost. The version is up-to-date.

    Hello

    I recommend you contact the support team of Yahoo for help on this issue.

    http://answers.Yahoo.com/

  • Download photos from my phone black berry

    How can I transfer video from my black Berry on my pc

    Something to try...

    Connect the Blackberry to your PC via the USB cable and turn it on.

    Reach... Start / computer.

    The Blackberry should be recognized by a drive letter.

    If you click this drive left letter you should see the directory of the
    memory card in the Blackberry and you can copy and paste photos
    from there to a folder on your hard drive.

  • My contacts deleted all of my Black Berry

    my black Berry 9630, I lost only my contact data I wish to recover it please help me

    Hi Scott,.

    You must get in touch with Blackberry to get help:

    http://us.BlackBerry.com/support/programs/technical/

    You can also check out the support of Blackberry at following link and check.

    http://docs.BlackBerry.com/en/smartphone_users/deliverables/13195/Troubleshooting_title_841297_11.jsp

    Hope this information is useful.

  • Get the UUID of my Black Berry Device/Simulator

    Hello

    How it is possible to get the UUID of my Black Berry Device/Simulator using C++ code?

    Thank you.

    So, something like that? https://developer.BlackBerry.com/Cascades/reference/quuid.html#createUuid

    If this is not appropriate, please explain your use to do this, then a useful answer can be given.

  • How to use Black Berry OS version J2ME?

    Could you show me how to adjust Black Berry BONES J2ME version, please?

    Are you looking to find the version of the OS on the device programmatically? If so, the following method returns a string:

    DeviceInfo.getSoftwareVersion)

  • Implementation CustomButtonField as a backdrop in the black berry

    can someone tell me how to set the custom button as a backdrop to black Berry field.

    You cannot set a ButtonField as a background. If you try only to use an image, see the BackgroundFactory class. Also be aware that the definition of the background on a screen in general does not work - you will need to set the background to a VerticalFieldManager and then add it to the screen.

  • BlackBerry Smartphones Black Berry Bold 9900 only able to ring if number in phone contact list

    Black Berry Bold 9900 only able to ring if number in phone contact list

    can someone help me solve the problem above his on optus and has just the stock of claims on this subject.

    Would appreciate any assistance.

    Perfect phone in all other respects.

    Hello and welcome to the community!

    I recommend that you try to start safe mode:

    • KB17877 How to start a smartphone BlackBerry in Mode safe

    It will take several attempts to get the combination of keys ESC (press/release/hold) OK, so be patient. When properly in Safe Mode, see what happens.

    If the behavior continues, then well... think what happened just before this behavior started? A new application? An update? A theme? Something else? Think carefully that the slightest change can be causal... and try to undo all that was.

    But if the behavior continues mode without failure, you may need to consider more drastic measures - WIPE, OS Reload, BBSAK Wipe/Reload and the process of reloading OS 'skeleton '. To prepare, you should be sure that you have a full backup of your PC... Please see the Backup link in my sig auto on this post for instructions.

    You may also use these tips:

    Good luck and let us know!

  • BlackBerry Smartphones Black Berry Torch 9800 Hard Lock

    Hi gentlemen,

    I have Black Berry Torch 9800. I put the MEP Code more of 10 times incorrectly. Now, the phone does not accept any SIM. I think that the phone was hard locked by the manufacturer. Please tell us how do I remove hard phone lock so I can use any network...

    Hope to receive your reply soon,

    Best regards

    Mohammed Ramzan

    Hello and welcome to the community!

    Please see this thread useful to start:

    If you have exhausted all your chances to enter the correct unlock code, is there nothing more, that you can do. Even if you happen to have the right code now, it is useless. Only the factory can now (legally) unlock your BB. In general, I've heard that the cost of having BlackBerry do this for you will be higher than the cost of just buying a new. But, you are able to ask them... see here:

    Note, however, that this process will begin with a tax...

    If you obtained your unlock code from somewhere, but it was incorrect, that your remedy could be with them - however, they may well wonder why you exhausted all 10 attempts before contacting them.

    If your BB was already locked MEP and you got it from a source that represents as that can be unlocked, then your recourse would be with the seller that you got it.

    Good luck!

  • BlackBerry Smartphones Black Berry ID - password forgotten

    I try to install Black Berry Protect on my BB9000 and so I need my BlackBerry ID.

    I don't remember the password and when I click on the 'Forgotten password?' button I get a message "the BlackBerry ID service is temporarily unavailable. It's already for a few days.

    Is there a solution?

    Karim

    Hiya!

    Have you tried the site?

    www.BlackBerry.com/blackberryid

    see if you can reset it.

Maybe you are looking for