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

Tags: BlackBerry Developers

Similar Questions

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

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

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

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

  • External BB10 Webworks/Cordova opening HTML pages on the device: "this file is not found. Check the URL and try again. »

    Hello fellow people,.

    IM quite in my application of Cordova/Webworks which downloads and save an html file in the SD (blackberry.io.sharedFolder).

    At this point, the config.xml file is defined as:

    read_device_identifying_informationermit >

    access_sharedermit >

    ermissions >

    Now, I'm trying to open the downloaded html that is saved to file:

    /Accounts/1000/removable/SDCard/MainFolder/subfolder/file.html

    My webapp, I try to open as: window.open (path, _self);

    Where path is the file above (which exists on the device!)

    Path is also, with the blackberry.io.SharedFolder + "/ MainFolder/SubFolder/file.html".< of="" that="">

    Also, I get the error:

    This file is not found. Check the URL and try again. If the URL is correct, check that your card is correctly inserted on your device.

    I am running and development off the BB10 Simulator.

    The console does not throw any error that I see.

    Any help or advice would be appreciated.

    See you soon,.

    @varunasingh

    Well, this is awkward.

    I have myself fixed by adding the string: "file://" on my road.

    I hope that others see it until they are too uptight.

    This has been resolved. Thanks for reading.

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

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

Maybe you are looking for