BB10 Webworks camera API?

I was updated an application and found that the HTML5 WebWorks camera API (for example, "blackberry.media.camera.takePicture") is not usable for BB10.

I dug through the poriton BB10 and did not find any direct appeal was once used.  Y at - it another option to use the camera in a webworks HTML5 app?  any sample taken in charge?

Thanks in advance!

In BB10, is in the stuff of Invoke

Tags: BlackBerry Developers

Similar Questions

  • 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)
    }

  • 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.

  • &lt; img &gt; 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.

  • 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.

  • Vibrate to BB10 Webworks?

    I saw that you can vibrate in BB10 WebWorks here:

    https://github.com/BlackBerry/WebWorks-community-APIs/issues/101

    "navigator.vibrate is supported already"

    I tried navigator.vibrate, I can't make it work. I tried navigator.vibrate, navigator.vibrate (); Navigator.VIBRATE (1000), navigator.vibrate ([50, 100, 150]);

    Anyone know how to operate? Do you need an element of permissions in the config?

    http://dev.w3.org/2009/DAP/vibration/

    You need navigator.webkitvibrate

  • 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.

  • 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:
            
    
        
    
  • 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.

  • Error installation BB10-WebWorks - SDK_1.0.2 on Windows 8

    Hi, I have an error of installation BB10-WebWorks - SDK_1.0.2 on Windows 8.

    Whenever I start the installer, I get the following message that is attached.

    How to solve this problem?

    You're going to have to try what it says:

    1. create a webworks.bat file in the same folder.

    2. then insert this: BB10-WebWorks - SDK_1.0.2.exe - i GUI

    3 save

    4 run the bat - clicking on it.

  • Stop scrolling on BB10 - Webworks + BBui.js

    BB10 Webworks + BBui.js / DevAlpha

    I am developing a game based on key events.

    While the size of my screen is set to meet devAlpha in the landscape (1280 X 760: height less 8px), the screen scrolls up/down when I 'touch and move' a finger on devAlpha. I want to avoid this.

    I've read several discussions on this (including Adam) and also read some comments of examples, so I tried the 'solutions' without success.

    -Definition of meta display window (in the index file): no specified height.

    
    

    -Script "Inhibitor" (attempt #1: firstly the script "as-is" in my script main screen push".) JS file")

    /* ---------------
     * disable scroll
     * ---------------*/
            preventMove = function(evt) {
               evt.preventDefault();
               window.scroll(0, 0);
               return false;
            };
            document.addEventListener('touchmove', preventMove, false);
    

    -Inhibitory script (try #2: function in my ".") JS file"but the event listener added to the event"ondomready"within the bb.init () function in the index page.

    in my JS file (no event listener is added)

    /* ---------------
     * disable scroll
     * ---------------*/
            preventMove = function(evt) {
               evt.preventDefault();
               window.scroll(0, 0);
               return false;
            };
    

    in the bb.init (); event listener added when the dom is ready (my main screen is 'House')

                   // Fires "after" styling is applied and "after" the screen is inserted in the DOM
                    ondomready : function(element, id) {
                        if (id == 'dataOnTheFly') {
                            dataOnTheFly_initialLoad(element);
                        } else if (id== 'home') {
                           document.addEventListener('touchmove', preventMove, false);
                        }
                    }
    

    (I admit I'm probably lost in the DOM....)

    -Finally, since my application uses divs triggering a function on the 'ontouchstart' event, I added the 'event' parameter in the function call and added a 'preventDefault()' as the first line of the script.

    An example of the div on my page http://www.sigling.is/IMO/imofishing/home.htm

    
    

    thumbsensor script:

        thumbSensor = function(place,state,evt) {        currLR = place;        // what pad/dock        window[place] = state;        // what's its value
    
            /* ------------------------------------------         *  thumbs dock / started / thumb ITA states          * ------------------------------------------ */            if(evt = 'ontouchstart'){ // prevent scrolling                alert('onTS'); // => Testing, and Yes, it is displayed right//                evt.preventDefault();                window.scroll(0,0);                return(false);                        }
    [...]
    }
    

    When I check the console of Chrome using the last option, that's what I get (aside: why the webworks ready event is triggered so many times - about 10?):

    Now, I think either I missed something big (probably) or the right way to do it or...
    Can anyone help?

    If you need to replace the touch events in bbUI you have to turn screen by using effects of scrolling data-bb-scroll-effect = 'off' on the part of the screen: https://github.com/blackberry/bbUI.js/wiki/Screens

    Currently iScroll is used to scroll through effects and will contact entries for the scrolling of a screen.

  • Reminder problem video camera API

    I have reviewed most otherwise examples of Sean all camera APIs available publicly.

    Some use reminders and events.

    I'm interested in video reminder on the camera_start_video() function.

    What I want to achieve is

    1. -get each timestamp frame buffer and send it to a list stored in QML. Class doing is subclassing container.
    2. -each image translated and used in ImageView in QML image property.
    3. -If possible, transcode each image and, possibly, the video itself to resolution 480x480px (currently used is the only 720x720px for 1:1 ratio)

    Then cherry picked out of the headers and sources:

    //header
    public:
        static void vfCallbackEntry(camera_handle_t handle, camera_buffer_t* buf, void* arg);
        void vfCallback(camera_buffer_t* buf);
    
    //sources
    void VineRecorder::vfCallbackEntry(camera_handle_t handle, camera_buffer_t* buf, void* arg)
    {
        (void)handle;
        ((VineRecorder*)arg)->vfCallback(buf);
    }
    
    void VineRecorder::vfCallback(camera_buffer_t* buf)
    {
        //if (this->capturing()) {
            if (buf->framemetasize == 65536) return;
            if (buf->frametype != CAMERA_FRAMETYPE_NV12) return;
    
            quint64 currentFrameTimestamp = (quint64)buf->frametimestamp;
            //this->setLastFrameTimestamp(currentFrameTimestamp);
            qDebug() << currentFrameTimestamp;
        //}
    }
    
    //line where callback is used
    err = camera_start_video(mHandle, filename, vfCallbackEntry, NULL, NULL);
    

    What confuses me, is that vfCallback is not a static member and still it does not recognize "this", or anything else outside its local scope.

    Application crashes on each lines commented in vfCallback.

    Did get bad "arg" perhaps?

    Can someone maybe show an example of a non-static member is used as a reminder? A function pointer?

    Thanks for all of your discussions, responses and suggestions. Please help, it's very frustrating.

    Nope... I'm a model. I missed this part of your post somehow.

    in any case... your mistake is that you spent NOTHING for arg in camera_start_video().  documentation:

    @param arg the argument passed to the functions of callback, which is the
    * last argument in the callback functions.

    (a little difficult to put into words, but everything that you pass as an argument 'arg' of camera_start_video() is the same argument passed to your reminders like "arg")

    This is shown in most of the samples.

  • How to get the functionality of the Plugin BB10 webworks development using phonegap.

    Hi all

    How to get the functionality of the Plugin BB10 webworks development using phonegap.

    Thank you all

    Here is a link to the documentation specifically: http://docs.phonegap.com/en/2.6.0/guide_plugin-development_index.md.html

    We will update the things little when we adopt a more close relationship with Cordova.

  • BB10 Webworks doubts

    I'm working on enforcement BB10 Webworks. I have following doubts

    1. How can I see the log console or any error/exception
    2. How can I work with the Web Inspector? I lived with this URL http://developer.blackberry.com/html5/documentation/web_inspector_overview_1553586_11.html

    But unable to see anything on

    http://169.254.0.1:1337 / inspectorBB.html? page = 0

    Use the function 'console.log ().

    and to use Web inspector, you have to be in the same network and use the-d parameter when packing.

Maybe you are looking for