< img > image not cached in app BB10 Webworks

Hello

Is there some configuration setting, that I need to use to get Webworks (on BB10) to cache images served from a server?

I have a BB10 Webworks app that dynamically adds and remove the DOM html.  Images referenced in items loading as expected, but if the item is removed from the DOM, and later added again, Webworks reloads the image file from the server, rather than using a cached version.  (I can watch what is happening in the Web Inspector).

If I run the code in a browser, Chrome on Windows, it behaves correctly, by using the cached copy of the image when the new item is added to the Dom.

The frequency from the server HTTP headers are:

Cache-Control, must-revalidate
Content-length: 1730
Content-Type: image / jpeg
Date: Mon, 21 October, 2013 21:18:34 GMT
ETag:c4863b363e4536f8d854d721092cf528
Expires on: Wednesday November 20, 2013 21:18:34 + 0000
Last modified: Monday February 4, 2013 17:20:13 + 0000
MicrosoftOfficeWebServer:5.0_Pub
Server: Microsoft-IIS/6.0
X-Powered-ByHP/5.2.13, ASP.NET

So, with response codes above, Chrome set cache the image as expected, while the BB10 Webworks reload from the server each time (no caching).

I'm running on a version of the software Blackberry Z10, model number STL100-3, 10.1.0.4181, and the app is created using Blackberry 10 Webworks SDK 1.0.4.11.

What Miss me?

Thank you

Terry

My apologies for the confusion.  The purpose of qnx is only available in a native extension running inside the app - not directly from JavaScript running in your application.

Here is an example of an extension that uses the qnx object:

https://github.com/BlackBerry/WebWorks-community-APIs/tree/master/BB10/PreventSleep

Specific location where it is used:

https://github.com/BlackBerry/WebWorks-community-APIs/BLOB/master/BB10/PreventSleep/ext/community.PR...

What is your comfort level write / using native extensions?  You will need to create your own, to interact with this API.

Tags: BlackBerry Developers

Similar Questions

  • Call my app when clicking on a specific URL in the BB10 webworks

    Hi all

    I want to register my application to open a specific URL (like: http://www.xyz.com) on impact on the browser. Below is the contents of the config.xml file, I tried. This does not work for me.

    
    
        
            APPLICATION
            
                bb.action.OPEN
                text/plain //tried with * also
            
            
        
    

    I tried several configuration in the config.xml file, but no luck. Also researched a lot on forums and found below URL for native code.

    http://supportforums.BlackBerry.com/T5/native-development/how-to-invoke-my-app/m-p/2734705#M57010

    Is this possible in BB10 Webworks?

    Finally found the solution which shows pop up to open my application by hitting a specific URL in the browser. Here's the changes to make in the config.xml file.

    
            APPLICATION
    
            
              bb.action.VIEW
              *
              
            
    
            
              activetext:
            
    
        
    
  • Download picture of URL link and store the Image in a Local folder in BB10 Webworks

    Hello

    I want to download the image of URL link and store the image in a local folder in Webworks BB10.
    But I did not get the code for this.

    If such knowledge code or have any solution then please help me...

    Thank you best regards &,.

    Laurent Subudhi

    NitishSubudhi wrote:
    I go through this code... but it is throwing the exception. That is to say "ReferenceError: Webworks is undefined '." "

    According to the device/operating system, you need to add the extension of your installation of WebWorks as explained here for OS SmartPhone BB or PlayBook OS.

    To use read the samples provided, they must work somehow. When I worked with the extension on PlayBook I only copy + pasted the provided source code and changed the attributes for the function call:

    // You need to define "remotePath", "localPath", "onProgress", "onError", "options" like shown in documentationblackberry.io.fileTransfer.downloadFile(remotePath, localPath, onProgress, onError, options);
    

    For OS SmartPhone BB the function call looks like this:

    // You need to define "options" like shown in documentationwebworks.io.FileDownloader.download(options);
    

    All think that all information provide here, try to follow and cela should operate.

  • How do I send the email from BB10 webworks app

    I want to have a module in my BB10 WebWorks app that will allow users to compose a message by entering the information in a form, which will then be sent by e-mail to an e-mail address.

    I guess this could be done by using the EmailComposerOptions API, but I don't know how to use it.

    Any help will be appreciated.

    Have you looked at the code example in the API document?

    https://developer.BlackBerry.com/HTML5/APIs/BlackBerry.Invoke.card.html#.invokeEmailComposer

    < script="text/javascript">
    //simply invoke email composer, with no options and callbacks
    blackberry.invoke.card.invokeEmailComposer();
    
    //invoke email composer with subject, body, to, cc and attachment options
    blackberry.invoke.card.invokeEmailComposer({
        subject: "Email subject",
        body: "Email body",
        to: ["[email protected]", "[email protected]"],
        cc: ["[email protected], [email protected]"],
        attachment: ["/path/to/an/attachment.txt", "path/to/another/attachment.txt"]
    }, function (done) {
        console.log(done);
    }, function (cancel) {
        console.log(cancel)
    }, function (invokeError) {
        console.log(invokeError);
    });
    
    

    Once the function is called, map of composer email will slip into the view with all pre-filled fields and the user can then click on send.

  • BB10 WebWorks: how to call SMS app with content filled beforehand and without a phone number?

    Say that I want to share content via SMS, App can prepare the content, launch the SMS application and users enter the number of the recipient.

    Is this possible? BB10 WebWorks call APIs seems to require pre-filling the destination number.

    https://developer.BlackBerry.com/HTML5/documentation/text_messages.html

    Thank you

    I found another way, instead of directly calling the SMS app, I can call target selector API actions and from there I select SMS or Email or BBM or Facebook or Twitter, LinkedIn, line break work well, a single API call solves all registered social work services.

    https://developer.BlackBerry.com/HTML5/APIs/BlackBerry.Invoke.card.html#.invokeTargetPicker

    try {}
    application of var = {}
    Action: "bb.action.SHARE."
    data : 'Line 1' + '\n ' +.
    'Line 2' + '\n ' +.
    'Line 3' + '\n ';
    MIME: "text/plain",
    target_type: ['MAP']
    };

    () blackberry.invoke.card.invokeTargetPicker
    asks,
    "Share."
    function (successEvt) {},
    {function (errorEvt)}
    );
    }
    {} catch (e)
    }

  • Existing port BB10 Webworks ask BBOS 6 and above devices

    Hi all

    Please guide me the easy steps to port my app BB10 BBOS 6 and above.

    My applications BB10 has features such as WCF service calls, Parsing XMl and JSON localstorage using format.

    and my file config.xml looks like at

    http://www.BlackBerry.com/ns/widgets"version ="0.9.1.25"rim: header =" "RIM-Widget: RIM / widget" xmlns =""http://www.w3.org/ns/widgets " id ="sow">"
      DIABATE
      LS
      https://github.com/tneil "> MMAD"
     
     
     
     


     
     
     
     
     
     
     
     
     
     


       
     


        
        
        
        
        
     


     
     
     
     
        
        <>ermissions >
            <>Ermit > access_sharedermit >
            <>Ermit > bbm_connectermit >
        <>Ermit > connectionermit >
        <>Ermit > access_pimdomain_calendarsermit >
        ermissions >

    Note:

    (1) is THAT BBOS supports all of these features of the config I am uisng for BB10? If not then how to make it compatible with BBOS

    (2) how much of the business logic and .css changes I need to do

    (3) what will be the structure of the application of the Image etc...

    There is no direct way to just "convert" an app, although there are some things you can do to facilitate the process.

    For example, if simply package you your config.xml into a ZIP file and try to package it with BlackBerry WebWorks 2.3.1.5, package manager will alert you to any function (more precisely the features that do not exist in this version of the SDK WebWorks.)

    For example, try to wrap your config.xml I received:

    [ERROR]         Feature cannot be found in any extension(blackberry.ui.toast)
    [ERROR]         Feature cannot be found in any extension(blackberry.pim.calendar)
    

    Note that the package only will talk one at a time, so there may be additional features that should be deleted.

    For all the features that do not exist, it is best to check the BBOS API documentation to see if there is no official API to replace the functionality:

    https://developer.BlackBerry.com/BBOS/HTML5/

    If not, you can check the existing API to the Community (or create your own native extension) for the functional gaps:

    https://github.com/BlackBerry/WebWorks-community-APIs/tree/master/Smartphone

    If a specific feature cannot be found and there is no extension that you offer this feature, you simply be removed from the application.

    In addition, for any element of config.xml, it is best to check these exist against the documentation here:

    https://developer.BlackBerry.com/BBOS/HTML5/documentation/config_doc_elements.html

    There are also differences in function to keep in mind. For example, in BB10, we rely on the webworksready (1.0) and deviceready (2.0) of the events, so that those who are not applicable to the BBOS.

    Finally, the HTML5 support in 6.0 and 7.0 has been much better than in 5.0, but certainly BlackBerry 10 supports much more than previous versions of BBOS. Basically, for generic elements HTML5 and JavaScript, you should not see a whole lot of questions. But if you use more complicated API (IndexedDB, etc.) it is certainly useful to check the compatibility reference to get an idea of what can/cannot be used.

    https://developer.BlackBerry.com/BBOS/HTML5/documentation/web_references_1986046.html

    Without seeing the application, the amount of business logic and CSS that should be changed depends really. If you use something like BBUI, it is created for fits rather well at BBOS. If you use custom implementations, then he will really vary the complexity.

    The structure of the file remains the same, you still have your config.xml file to the root and your HTML code, images, etc. as of the sisters or contained in subfolders.

  • BB10 Webworks packaging "interrupted (quit)" error of the emulator of the ripple

    I am trying to build a BB10 webworks app using Sencha Touch 2.2 and packaging using ripple and get Interrupted errors (abandonment of the). Is anyone else seeing this? I noticed that I am able to clear this error if the .sass_cache is filled in/resources/sass Sencha Touch project folder. Changes in error on what file it is interrupted.

    out:  (deflated 71%)
      adding: touch/src/XTemplateCompiler.js (deflated 72%)
      adding: touch/src/XTemplateParser.js (deflated 76%)
      adding: touch/version.txt (stored 0%)
      adding: twitter_bb.js (deflated 61%)
      adding: webworks-1.0.4.11.js
    out: 
    
    out:
    zip error: Interrupted (aborting)
    
    error response - {"code":1,"msg":"\nzip error: Interrupted (aborting)\n","data":null}
    2013-06-13 11:48:44 GET /ripple/build_status/1021 200
    

    After trying various things, I came across the solution, by sheer luck, I guess. When you compile a Sencha Touch app, it compiles the sass file and creates a cache. Sencha Touch is not delete the folder ".sass_cache" once it did the compilation. This seemed weird questions with the operation of a BB10 webworks app package. He would stop with the message above on the different file compression.

    After you have removed all the contents of the folder '.sass_cache' using ' rm - rvf *' I was able to do this successfully the package.

  • How to specify the custom application BB10 WebWorks category

    How to specify the custom in BB10 WebWorks app category. If tried, but it seems that this does not work for me. What shoul I do it.

    Hello.

    I think the element of config.xml standard tag would be the rim: category, as in the example of documentation:

    
    

    but it seems not be supported yet for BB10. You can ask a question to the github repo, I think that the BB10 Packer must be at the right place.

  • JavaScript does not not in ripple or BB10 Dev Alpha A

    Hi all

    I am trying to create an app specifically for BB10 webworks.  I created my html and works, but trying to bring to the bb10 it no longer works.  To be more precise, my javascript online will not run.

    Is there a reason that this (see below) should work?

    "" value1 = window.document.form1.input1.value; ".

    The idea is that the user fills out a simple form, presses a button 'calculate' and a bit of math is done, very basic stuff.  But when I press on calculate that nothing happens.  Any ideas?

    I used bbui to wrap everything autour and following: https://github.com/blackberry/bbUI.js/wiki/Screen-Specific-CSS-and-JavaScript

    Thanks in advance!

    Phil

    When you say javascript inline, you tell a svreen bbui with a tag javascript code on the page of the screen?  If so, that will not work.  You must have a tag javascript with reference to the external JS code file.  This will work.

    See the explanation here:

    https://github.com/BlackBerry/bbUI.js/issues/28

    I see on the bbui site example code online but I do not know which works.  Maybe you should post an issue on github for help.  They respond pretty quickly.

    https://github.com/BlackBerry/bbUI.js/issues

    You may need to provide a good code.

  • Bug in signature tool: PlayBook &amp; BB10 WebWorks signature tools create different ID of Package

    Hello, I wanted to download a version BB10 of a portal provider WebWorks app, but I've always had the

    File bundle (blabla.bar) was rejected. Package ID is required for all .bar file. If this is an upgrade, ID of Package must match ID of Package in the bundle of original file.

    error. I read a lot of articles like this one

    http://devBlog.BlackBerry.com/2012/03/package-ID-rejected-by-app-world/#more-8665

    on this issue, and most of them say, you used a different signing key, or you have changed the name of the Package. However none are the case - really.

    What I found is:

    The latest version of the SDK PlayBook WebWorks 2.2.0.5 produced an another Package ID in the MANIFEST. The latest version of the SDK BB10 WebWorks 1.0.2.9 MF file. I use the latest plugin ripple to package and sign applications.

    If I package sign my application with the SDK BB10 bundle file gets rejected. If I package and sign the exact folder of files (not changed character) with WebWorks PlayBook the supplier portal SDK allows me to download the bar.

    When I checked both the MANIFESTO. MF, package-Ids files were indeed different. However this way, you can provide a free upgrade for your existing PlayBook application for BB10 platform.

    Here's your solution, 3rd post http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-set-up-Package-Name-for-P...

    It is good that we can specify the name of the package in bb10 sdk.

  • How can I save the images in the Photos app on my external hard drive?

    I just use time machine and I realized that the images in the Photos app are not included in the backup, then, how can I understand them? Thank you.

    You have the preference "Copy items to the library of Photos" checked?

  • Applications example for unit Alpha BB10 webworks

    Dear all, hope you can tell on the webworks example BB10 Alpha peripheral applications.

    Hello

    You can see examples on the use bbUI building cool interfaces for BB10 using WebWorks.

    The last update of Dev Alpha also includes AppWorld, so you can download apps BB10.

    see you soon

  • Call another internal App using WebWorks App

    Hello

    Is there a way I can call it an installed application (not specific playbook) of my webworks app? Something similar otherwise call functionality. Clues on how to invoke an application in a similar way? No API for the same will be available in the near future?

    Thanks in advance

    Praveen

    You can call a 3rd another application of part on the smartphone BlackBerry using the JavaArguments.  On the PlayBook, you can only call the applications listed in the API to invoke.

    http://www.BlackBerry.com/developers/docs/WebWorks/API/BlackBerry.Invoke.JavaArguments.html

    I don't know when they will import this feature for the PlayBook.

  • Image not appearing is not in the develop Module

    I've seen a number of discussions on this, but unfortunately the proposed solutions do not work.

    When I access the image in the develop module it will show initially, but a setting I'll do the image not displayed (they do in the browser preview in the upper left corner), generally the image then disappears. After that, when I select the image it leaves a white screen where the image should display.

    When the question first, I checked and the GPU acceleration could not be turned on due to an error. I went and updated my driver, but unfortunately I have an AMD Radeon 7670 graphics card and I discovered the hard way Lightroom CC is not compatible with this graphics card and the latest driver so when I accessed to develop module lightroom instantly if is crushed, regardless of whether or not the graphics acceleration was lit.

    I was able to go back to the older version of the driver, 13.152.0.0, Lightroom will run without crashing, but still have the original problem, I can't use the develop module.

    Any suggestions? At this point, I'm tempted to restore the previous version of Lightroom, but I'm hoping to avoid that, as I have ingested, the tag and assessed to nearly 2500 pictures and would really prefer to keep this work.

    Version of Lightroom: CC 2015.1 [1025654]

    License: Creative Cloud

    Operating system: Windows 8.1 home edition Premium

    Version: 6.3 [9600]

    Application architecture: x 64

    System architecture: x 64

    Number of logical processors: 8

    Processor speed: 3.3 GHz

    Built-in memory: 16322,1 MB

    Real memory for Lightroom: 16322,1 MB

    Real memory used by Lightroom: 948,9 MB (5,8%)

    Virtual memory used by Lightroom: 928,0 MB

    Memory cache size: 59.2 MB

    Maximum thread count used by Camera Raw: 4

    Camera Raw SIMD optimization: SSE2, AVX

    System DPI setting: 96 DPI

    Composition of the Bureau enabled: Yes

    Exhibition: 1) 2560 x 1440

    Entry types: Multitouch: no, built-in touch: No, built-in pen: no, touch external: No, external pen: Yes, keyboard: No.

    Graphic processor News:

    Check the supported OpenGL: failed

    Vendor: ATI Technologies Inc.

    Version: 3.3.12422 context 13.152.0.0 the base profile

    Renderer: AMD Radeon HD 7670

    LanguageVersion: 4.30

    GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS (real = 32, minimum = 48)

    The application folder: C:\Program Files\Adobe\Adobe Lightroom

    Library path: K:\FILES_0001\lightroom_catalogs\lightroom_catalogs_0002_150709\lrcat_all_0003_130613_lr5 \lrcat_all_0003_130613_lr5-2.lrcat

    Settings folder: C:\Users\Sean\AppData\Roaming\Adobe\Lightroom

    Plugins installed:

    (1) Behance

    (2) substantive canon Plugin

    (3) Facebook

    (4) Flickr

    (5) HDR Efex Pro 2

    (6) jf PicasaWeb

    (7) attachment Plugin Leica

    (8) export of LRT

    (9) attachment Plugin Nikon

    (10) perfect B & & W 9

    (11) perfect effects 9

    (12) strengthening the perfect 9

    (13) perfect photo Suite 9

    (14) perfect Portrait 9

    (15) resize perfect 9

    (16) PhotoShelter

    Config.LUA flags: None

    Map #1: Seller: 1002

    Feature: 675b

    Subsystem: 6888103c

    Revision: 0

    Video memory: 1003

    Map #2: Seller: 1414

    Device: 8 c

    Subsystem: 0

    Revision: 0

    Video memory: 0

    AudioDeviceIOBlockSize: 1024

    AudioDeviceName: Out of DP AMD (AMD High Definition Audio Device)

    AudioDeviceNumberOfChannels: 2

    AudioDeviceSampleRate: 44100

    Build: not initialized

    Direct2DEnabled: false

    GPUDevice: not available

    OGLEnabled: true

    Looks like a problem of ICC profile.

    try to set your monitor to sRGB, or re - launch your calibration software (IE; XRite Colormunki)

  • sparsebundle disk image not mounting

    I've recently upgraded to Mac OS Sierra and now I can not mount an image of disk sparsebundle.

    I enter the password, and then nothing happens.

    I tried the same image on a Mac running Leopard and it opens fine.

    I tried a few other sparsebundle some and other encrypted disk images not. Some are open very well, but others do not.

    So, it doesn't seem to be a problem of sparsebundle encrypted disk image.

    Any suggestions?

    After investigation a little more the problem is Sophos AV

    Turn it off and the disk mount fine images.

    I hope this helps.

Maybe you are looking for