WebWorks

WebWorks can work with Mozilla FIrefox? If not why?

Asmooh is correct, the WebWorks APIs are Javascript APIs that tie down in the native BlackBerry 10 operating system layer. These API works fully on our operating system like PC (for example Firefox) and other mobile devices do not have the same architecture.

For Google Chrome, we have published the emulator of ripple that behaves (for most WebWorks APIs) as if they were actually called. But when I call him blackberry.invoke, for example it is not actually executing native code in the waving, it is simply supported and pretend not a, then by providing comments in the browser so that the user knows it worked (or didn't) as expected.

Firefox has no such emulator; the underlying engine is more different (so that Chrome has a similar Webkit engine). So in Firefox you cannot imitate (due to differences in web engine) nor (because of differences in OS architecture) WebWorks APIs.

Let us know if you have any questions on this subject.

Tags: BlackBerry Developers

Similar Questions

  • WebWorks command not defined windows cmd

    I try to display the webworks on browser project, when the project working directory when I run webworks serve I got the following:

    'WebWorks' is not recognized as an internal or external command,
    operable program or batch file.
    

    Is it because of the installation error?

    BB WW2 SDK install log:

    Copy File:                Destination: C:\Users\Student\BB10 WebWorks SDK 2.2.0.15\webworks-ui\bin\shortcut_256.ico
                              Status: SUCCESSFUL
    
    Set Environment Variable: WEBWORKS_HOME = C:\Users\Student\BB10 WebWorks SDK 2.2.0.15
                              Status: WARNING
                              Additional Notes: WARNING - Could not get UNIX shell name for environtment editing!
    
    Set Environment Variable: PATH = %WEBWORKS_HOME%
                              Status: WARNING
                              Additional Notes: WARNING - Could not get UNIX shell name for environtment editing!
    
    Set Environment Variable: PATH = %WEBWORKS_HOME%\cordova-blackberry\bin\dependencies\bb-tools\bin
                              Status: WARNING
                              Additional Notes: WARNING - Could not get UNIX shell name for environtment editing!
    
    Refresh Windows Environment:
                              Status: SUCCESSFUL
    
    Execute Script/Batch file:   webworks
                              Status: ERROR
                              Additional Notes: ERROR - Error while attempting to execute the installation script
    
    Install Directory:        C:\Users\Student\Desktop\
                              Status: SUCCESSFUL
                              Additional Notes: NOTE - Directory already existed
    
    Create Link:              C:\Users\Student\Desktop\BlackBerry WebWorks 2.2.0.15
                              Status: ERROR
                              Additional Notes: ERROR - Unable to Create Shortcut
    

    I managed to solve this problem by following these steps:

    1. Open cmd.
    2. Run the cmd: echo %PATH% (to see the current status)
    3. Run the cmd: PATH = % PATH %; C:\Users\Student\BB10 WebWorks SDK 2.2.0.15
    4. Run the cmd: echo %PATH% (to see views)
    C:\Users\Student\WebWorks Projects\Calorie-Counter>webworks
    usage: webworks [--verbose] command [options]
    
    These commands may be used globally:
    
       create               create a new project
       create-headless      create a new project which includes a native headless component
       target               manage devices and simulators
       help                 view usage for all commands
    
    These commands may be used from within a project directory:
    
       build                package app into a BAR file
       run                  build and deploy to a device
       emulate              build and deploy to a simulator
       upgrade              upgrade blackberry10 platform
       plugin               add or remove plugins
       serve                start a webserver to host project assets
    
    See 'webworks help ' for more information on a specific command.
    
  • Abandoned WebWorks?

    Thus abandoned WebWorks or just put development on hold?

    Asking the reason is that the latest version uses obsolete plug-ins and former Cordova style of their designation. This means that update those, to remove the 'old' and install the most recent by using different names. Naturally, thereafter it is not possible to see those who use the software development kit.

    The broken next page's significant regarding this issue:

    https://developer.BlackBerry.com/HTML5/downloads/roadmap/

    There are also other issues, but they are maybe not so relevant to the issue, for the moment.

    Thanks in advance for any sensitive about this reaction.

    There are currently no plans to release an updated SDK WebWorks.

  • Question about WebWorks and Windows 10 compatibility

    I would like to know, can I run on Windows 10 WebWorks? Someone at - it tried?

    As far as I know that it has not been tested officially. I do not think that you will be able to install it there because of the requirements inherited in the installer itself, but running it I expect to work. Cordova, which it inspired, is used to create applications for Windows 10, so I think it's reasonable for the base code works very well.

    I'll test it when Windows 10 comes out at least, and I'll see if I can try it on the preview in a VM too.

  • Cannot install Webworks - Windows DLL failed to load - 10 Windows

    Hello

    Try to install 2.2 on Windows 10 Webworks but fails with this message:

    Flexeraawm$ aaa: cannot load Windows DLL
    at Flexeraawm.af (unknown Source)
    at Flexeraawm.aa (unknown Source)
    at com.zerog.ia.installer.LifeCycleManager.init (unknown Source)
    at com.zerog.ia.installer.LifeCycleManager.executeApplication (unknown Source)
    at com.zerog.ia.installer.Main.main (unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
    at java.lang.reflect.Method.invoke (unknown Source)
    at com.zerog.lax.LAX.launch (unknown Source)
    at com.zerog.lax.LAX.main (unknown Source)

    Any help is appreciated.

    There is a problem with the installer WebWorks and recent updates of Java on Windows 10 1.8.  The workaround is to use Java 1.7.

  • Problem installing WebWorks / Simulator / push SDK

    Hello

    I tried to install WebWorks / Simulator / SDK to push, but these software use InstallAnywhere as an installer. I have problems after the installer because it stops 3/4 of the download. It goes to 100%, but not the load bar full.

    I still have the error of

    "Fata Application error".

    This request has unexpectedly

    Invocation of this java application has caused an InvocationTargetException. This application will now exit. (LAX)

    "

    I have tried everything I learned from looking around Google and so make me add these following:

    -J' added to my value to C:\Program Files\Java\jdk1.8.0_73 environment variable JAVA_HOME

    -Currently I have this in my WAY: C:\ProgramData\Oracle\Java\javapath, but I changed it to C:\Program Files\Java\jre1.8.0_73\bin. I exchange these values whenever it fails to ensure that one of them works.

    -Command line, I used nameofinstaller.exe LAX_VM "C:\Program Files\Java\jdk1.8.0_73\bin\java.exe"

    Can someone help me install this software without having this problem.

    Recent versions of Java 1.8 broke these installers.  To work around the problem, you can install Java 1.7 and use it to install (change accordingly, JAVA_HOME and PATH environment variables).

  • Tutorial of WebWorks Hello World, Webworks SDK tool hangs in the browser

    Being very new BlackBerry WebWorks and Cordova, I would please help get implemented with WebWorks Hello World tutorial.

    Platform: Windows 7 ultimate x 64 chrome 31.0.1650.63 firefox version m 26, Blackberry Web Works SDK Version 2.0BETA & Blackberry Web Works SDK 1.0.4.11, MomenticsIDE, 3.3.1 - 0.1.2 of cordova, VMWare Player version 5.0.3 build-1410761 using BlackBerry10Simulator.vmdk

    Background:

    I followed the tutorial began getting ( https://developer.blackberry.com/html5/documentation/beta/getting_started.html ) and I checked several times to make sure I did it correctly.

    Also, I tried to follow along with the Blackberry guides provided by cordova ( http://cordova.apache.org/docs/en/3.3.0/guide_platforms_blackberry10_index.md.html#BlackBerry%2010%2... ).

    I tested this problem using Blackberry 10.2.0 Simulator both 10.2.1 in VMWare Player.

    Unfortunately, when I followed the tutorial, sure I get to the point in the project when I press save, then chrome & firefox (I tried both) they cling. For more details and photos, you can see my post to http://stackoverflow.com/q/20907450/2115934 and this http://pastebin.com/BjCxHDfB .

    Finally, I don't know if this is related, but when I try to run

    webworks target add   [ -t device | simulator]  [-p ]  [--pin ]
    

    As described in the section for the definition of objectives, I get this error:

    'webworks' is not recognized as an internal or external command
    operable program or batch file.

    This makes me wonder if I was not properly installed webworks, or if I had to set the system path variable.

    My system path Variables

    C:\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\Java\jdk1.7.0_45\bin\;C:\Program Files\nodejs\;C:\Windows\Microsoft.NET\Framework\v4.0.30319;Z:\adroidsdk\platform-tools;Z:\adroidsdk\tools;ANT_HOME=Z:\ant\apache-ant-1.9.3;JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45;Z:\ant\apache-ant-1.9.3\bin;Z:\bbndk\host_10_2_0_15\win32\x86\usr\bin;Z:\BB10WebWorksSDK\cordova-blackberry\bin\dependencies\bb-tools\bin;Z:\MomenticsIDE_BBNativeSDK\host_10_2_0_15\win32\x86\usr\bin
    

    I would be very grateful for advice on how to proceed.

    This is the output of the variable path on the command line? It is strange to see the ANT_HOME and other variables put there - I'm not sure that should be there, but it would not be the problem here either.

    What I see missing is a reference to the new SDK WebWorks. When you ran the Setup program, it must have created a new user named WEBWORKS_HOME Environment Variable that must be set to the location where it was installed. Then, he should have added % WEBWORKS_HOME %; your variable to the path of the user. It doesn't look like that's happened. Maybe you can try to install again and it must put these variables. You can try to add yourself as well but a relocation should include everything that is missing.

    This lack of access path variables are why the webworks command does nothing, and because the GUI calls simply orders webworks, thats why that is also a failure.

    It is possible that there is a problem with the Setup program if it does not have the permissions required to create these variables.

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

  • Using Webworks database in Java.

    Hi all.

    Just a quick question. Is it possible to use/access/write in a database created by an application of webworks (using javascript) in a java application built eclipse?

    I've already tried it and of course it is encrypted. I tried to copy the file, open a file connection and copy the data from the original file to the copy and then open the copy, as other people mentioned, but it is always encrypted. I believe that this method is only to overcome a java built the database previously saved on a SD card that uses only the card encryption.

    Of what my research has shown is that webwork applications automatically encrypt it to the databases. So I'm assuming that only a webworks application can decrypt this type of database and there is no way that a created Java application will be able to access. I hope that's not true!

    Thanks for your time guys!

    Rob

    According to http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Database-problem-in-the-webworks, the PB is encrypted and cannot be opened with the key stored in the webworks app.

  • Set the Lockscreen Wallpaper (WebWorks)

    Hey,.

    is it possible in any way to set the wallpaper of the Lockscreen from Webworks application?

    The plugin system allows me only to regular wallpaper (blackberry.system.setWallpaper).

    We badly need this feature

    PS: it seems to be possible if I invoke the pictureeditor with option setwallpaper (she gives the Selector screen), but I will not have the option 'Save a copy' in there... is possible to refuse this option?

    ... it would be cool to have the same option for lockscreen as blackberry.system.setWallpaper.

    I would like to write my own plugin, but I can't c + c++ code / native

    Thank you

    I guess. @twindsor done made a great plugin model that might get you in the right direction at least. I would use the Yeoman version of generator.

    He talks more about it in this blog-> http://devblog.blackberry.com/2015/09/cordova-5-x-for-blackberry-10/

  • Unable to sign applications WebWorks

    Hi all

    I created a Blackberry WebWorks app, which works well in development mode that uses.  However, when I try to add to our BES 12 server I get the following message;

    An error has occurred. The application is not signed correctly and cannot be added.

    I have followed Server guides, but can't seem to make it work.  When the compiled application I get the following error message;

    C:\Users\myusername\Desktop\Blackberry\CRM\platforms\blackberry10\build\device\bb10app.bar
    [INFO]    Error: Loading the keystore: C:\Users\myusername\.cordova\lib\blackberry10\cordova\v2.2.0.15\bin\dependencies\bb-tools\bin (access is denied)
    An error has occurred

    This is the guide I used.

    https://developer.BlackBerry.com/HTML5/documentation/v1_0/signing_setup.html

    Now I note that's WebWorks 1.0 and I use WebWorks 2.2 and should have used it;

    https://developer.BlackBerry.com/HTML5/documentation/v2_2/testing_and_signing_setup.html

    So I followed the instructions 2.2 a lot more simple, but nd upward with the same error - access denied.

    Any ideas?

    There are a few possibilities.  There are 2 places of passwords can be set.  In your BlackBerry ID token (bbidtoken.csk) and your developer certificate (author.p12).  The WebWorks SDK requires two of them are the same (because there's only one entry for a password).  If they are different, recreate one of them, so they are doing and try again.

    It can also indicate an error file system permission to access the files required for code signing.  They are located in one of these directories:

    • Windows 8®, Windows 7®, and Windows Vista®: %HOMEPATH%\AppData\Local\Research in motion
    • Windows® XP: %HOMEPATH%\Local Settings\Application is moving
    • Mac OS: ~/Library/Research in motion
    • UNIX / Linux: ~/.rim

    Check the permissions on these files and folders are correct.

  • Landscape of WebWorks 2.0 + keyboard (bug?)

    my application is set to landscape of config.xml:

    
    

    It uses jquery - 1.11.0 and bootstrap - 3.1.1 only.

    in one of the page, there a textarea with contentEditable = true and when a I touch/click in this text box. popup keyboard as expected.

    I tried to find a way to hide the keyboard by program, looking everywhere but can not find (to hide it "manually" by pressing the space bar for a momen, is to find work, but not what I need).

    someone has already worked on the same case like that?

    Another thing, while still visible keyboard, I flip Z10 portrait, my app screen landscape again, then I loose the bottom, my minimized application, but ke keyboard was still:

    This is a bug I think and I hope it will be fixed in the next version of WebWorks.

    I am already able to solve the problem of contentEditable and touch the event, she caused by extension jquery that do not treat the events correctly and when I changed to hammer.js my problem is solved.

    last question is virutal keyboard bug, can someone confirm?

  • Start/Invoking third-party apps from the WebWorks app

    Hi all

    Just a quick question. Is it possible to start/call a third party on a blackberry java application 7 from a WebWorks app?

    I did some research and it seems that it is impossible. I did the opposite and opened a WebWorks app from java application successfully but hope that it is possible.

    Thank you all for your time.

    Rob

    Unfortunately BBOS was not as flexible as BlackBerry 10 invocation framework and what was available on the side of Java is not inherently available in WebWorks.

    You can use the ApplicationManager:
    http://www.BlackBerry.com/developers/docs/7.0.0api/NET/rim/device/API/system/ApplicationManager.html

    Launch an application, if you know the information on the module itself.

    launch
    http://www.BlackBerry.com/developers/docs/7.0.0api/NET/rim/device/API/system/ApplicationManager.html...

    launchApplication
    http://www.BlackBerry.com/developers/docs/7.0.0api/NET/rim/device/API/system/ApplicationManager.html...

    runApplication
    http://www.BlackBerry.com/developers/docs/7.0.0api/NET/rim/device/API/system/ApplicationManager.html...
    http://www.BlackBerry.com/developers/docs/7.0.0api/NET/rim/device/API/system/ApplicationManager.html...

    However, if you want to access these in WebWorks, you create a custom extension to call the native API (Java).
    https://github.com/BlackBerry/WebWorks-community-APIs/tree/master/Smartphone/template

  • Cannot package App when upgrade webworks 1.0.2.9

    I could package app within the ripple with webworks 1.0.0.17, but failed for packing when upgrade to 1.0.2.9.

    Got the msg of error as below. I hope someone can help. Thank you.

    I use win7 64 bit, installed 1.6e 64-bit java, ripple v0.9.10.

    Because of Java veriosn?

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

    departures:
    C:\Users\feng75\AppData\Local\Google\Chrome\User Data\Default\Extensions\cnijnna
    imeaacneklcndcafbnkeicckh\0.9.10_1\services\node\node_modules\rbd>"C:\Program Fi
    les\Research in Motion\BlackBerry 10 1.0.2.9\dependencies\node\node WebWorks SDK
    .exe""C:\Program research in Motion\BlackBerry 10 SDK WebWorks 1.0.2.9\li
    b\bbwp.js' 'C:\BBProj\output/iLoveCook.zip' o 'C:\BBProj\output' d

    2012-10-09 17:05:26 GET/ripple/build_status/3993 200
    2012-10-09 17:05:27 GET/ripple/build_status/3993 200
    2012-10-09 17:05:27 GET/ripple/build_status/3993 200
    2012-10-09 17:05:28 GET/ripple/build_status/3993 200
    2012-10-09 17:05:28 GET/ripple/build_status/3993 200
    2012-10-09 17:05:29 GET/ripple/build_status/3993 200
    2012-10-09 17:05:29 GET/ripple/build_status/3993 200
    2012-10-09 17:05:30 GET/ripple/build_status/3993 200
    out: source application Populating [INFO]

    2012-10-09 17:05:30 GET/ripple/build_status/3993 200
    2012-10-09 17:05:31 GET/ripple/build_status/3993 200
    2012-10-09 17:05:31 GET/ripple/build_status/3993 200
    2012-10-09 17:05:32 GET/ripple/build_status/3993 200
    2012-10-09 17:05:32 GET/ripple/build_status/3993 200
    2012-10-09 17:05:33 GET/ripple/build_status/3993 200
    2012-10-09 17:05:33 GET/ripple/build_status/3993 200
    2012-10-09 17:05:34 GET/ripple/build_status/3993 200
    2012-10-09 17:05:34 GET/ripple/build_status/3993 200
    2012-10-09 17:05:35 GET/ripple/build_status/3993 200
    out: [INFO] Parsing config.xml

    out: [WARN] build ID defined in the file config.xml [version], but the signature key file was not
    t found: author.p12

    out: [WARNING] build ID defined in the file config.xml [version], but no signature password was
    provided [-g]. Bar will be unsigned

    out: [WARNING] can't find the feature with id: blackberry.message.sms

    out: [WARNING] can't find the feature with id: blackberry.ui.menu

    out: [WARNING] can't find the feature with id: blackberry.system.event

    out: [WARNING] can't find the feature with id: blackberry.app.event

    out: build output files [INFO]

    out: [WARNING] can't find the debugging token

    2012-10-09 17:05:35 GET/ripple/build_status/3993 200
    2012-10-09 17:05:36 GET/ripple/build_status/3993 200
    2012-10-09 17:05:36 GET/ripple/build_status/3993 200
    2012-10-09 17:05:37 GET/ripple/build_status/3993 200
    2012-10-09 17:05:37 GET/ripple/build_status/3993 200
    2012-10-09 17:05:38 GET/ripple/build_status/3993 200
    out: [ERROR] java.lang.UnsupportedClassVersionError: com, qnx, bbt, nativepackage
    r/BarNativePackager (unsupported major.minor version 50.0)

    out: [INFO] at java.lang.ClassLoader.defineClass0 (Native Method) at java.
    lang. As ClassLoader.defineClass (unknown Source) at the java.security.SecureClassLoad
    er.defineClass (unknown Source) at java.net.URLClassLoader.defineClass (unknown S
    ource) to $100 (unknown Source) at the java.net.URLC java.net.URLClassLoader.access
    lassLoader$ 1.run (unknown Source) at the java.security.AccessController.doPriv
    inhabitants (Native method) at java.net.URLClassLoader.findClass (unknown Source)
    at java.lang.ClassLoader.loadClass (unknown Source) at the Sun.misc.Launcher$appclassloader$ App
    ClassLoader.loadClass (unknown Source) at java.lang.ClassLoader.loadClass (exercise
    WN Source)

    out: [INFO] at java.lang.ClassLoader.loadClassInternal (unknown Source)

    2012-10-09 17:05:38 GET/ripple/build_status/3993 200
    out: [INFO] Exception in thread "main".

    out: [ERROR] Native package exception has occurred

    2012-10-09 17:05:39 GET/ripple/build_status/3993 200
    out: [WARNING] can't find the debugging token

    2012-10-09 17:05:39 GET/ripple/build_status/3993 200
    out: [ERROR] java.lang.UnsupportedClassVersionError: com, qnx, bbt, nativepackage
    r/BarNativePackager (unsupported major.minor version 50.0)

    out: [INFO] at java.lang.ClassLoader.defineClass0 (Native Method) at java.
    lang. As ClassLoader.defineClass (unknown Source)

    out: [INFO] at java.security.SecureClassLoader.defineClass (unknown Source)
    at java.net.URLClassLoader.defineClass (unknown Source) at the java.net.URLClassLoad
    St. $100 (unknown Source) at the java.net.URLClassLoader access$ 1.run (Unknown Source)
    at java.security.AccessController.doPrivileged (Native Method) at java.
    NET. URLClassLoader.findClass (unknown Source) at the java.lang.ClassLoader.loadCla
    SS (unknown Source) at the Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Unknown So
    extended) at java.lang.ClassLoader.loadClass (unknown Source) at the java.lang.Cla
    ssLoader.loadClassInternal (unknown Source)

    out: [INFO] Exception in thread "main".

    out: [ERROR] Native package exception has occurred

    2012-10-09 17:05:40 GET/ripple/build_status/3993 200
    Built
    error response - {"code": 1, "msg": "[ERROR] java.lang.UnsupportedClassVersionErr}
    or: com/qnx/bbt/nativepackager/BarNativePackager (unsupported major.minor versio
    50.0 n) \n [INFO] java.lang.ClassLoader.defineClass0 (Native Method) \tat ja \tat
    java.security.SecureClassLoa \tat va.lang.ClassLoader.defineClass (unknown Source)
    der.defineClass (unknown Source) \tat java.net.URLClassLoader.defineClass (unknown
    (Source), $100 (unknown Source) java.net.URLClassLoader.access \tat \tat java.net.URLC
    java.security.AccessController.doPrivileged \tat lassLoader$ 1.run (unknown Source)
    (Native Method), java.net.URLClassLoader.findClass (unknown Source) \tat \tat java.l
    Ang. Sun.misc.Launcher$appclassloader$ AppClassLoader.l \tat ClassLoader.loadClass (unknown Source)
    oadClass (unknown Source) \tat java.lang.ClassLoader.loadClass (unknown Source) \n [I
    NFO] \tat java.lang.ClassLoader.loadClassInternal (unknown Source) \n [INFO]
    [' Exception in thread Buda "occurred\n \n[ERROR] exception Native Packer [WA
    RN] could not find debugging token\n [ERROR] java.lang.UnsupportedClassVersionEr
    MMR: com/qnx/bbt/nativepackager/BarNativePackager (unsupported major.minor version
    on 50.0) \n [INFO] \tat java.lang.ClassLoader.defineClass0 (Native Method) \tat j
    ava.lang.ClassLoader.defineClass (unknown Source) \n [INFO] \tat java.security.S
    java.net.URLClassLoader.defineC \tat ecureClassLoader.defineClass (unknown Source)
    Lass (unknown Source) \tat java.net.URLClassLoader.access$ 100 (unknown Source) \tat
    java.security.AccessController java.net.URLClassLoader \tat $1.run (unknown Source)
    .doPrivileged (native Method) \tat java.net.URLClassLoader.findClass (unknown source
    (e) \tat java.lang.ClassLoader.loadClass (unknown Source) \tat Sun.misc.Launcher$appclassloader$ App
    ClassLoader.loadClass (unknown Source) \tat java.lang.ClassLoader.loadClass (Unknow
    Source n) \tat java.lang.ClassLoader.loadClassInternal (unknown Source) \n [INFO]
    Exception in thread Buda ' \n[ERROR] occurred\n exception Native packer. "
    {'data': null}
    2012-10-09 17:05:40 GET/ripple/build_status/3993 200

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

    solved. updated JRE 1.6 (win32) then fine.

  • Problem of database in the webworks for smart phone

    Hi guys of BB.

    I have some difficulties in the part of the database,

    How could I see the database created in the webworks, I know that the path has been created

    but I was not able to open the database is how can I could check it out like any SQLmanager or some think to check that. To display the DB created in this part.

    Unfortunately, you will not be able to open and view your database with another tool.  The database is encrypted, and is only accessible with the encryption key stored with your application WebWorks

  • WebWorks Push Client

    Hello

    I'm sort of stuck in the logical process to receive a push message in an application webworks. The sample application works fine and I can receive messages with him. I guess I understand something wrong.

    What I understand so far is:

    1. create pushservice

    2. create the event listener

    3 activate the application to launch on push

    4 create the channel

    and everything should be good... or not? Lets talk about code:

    config. XML (part)

    
        post_notification
        _sys_use_consumer_push
        read_device_identifying_information
    
    
        APPLICATION
        
            bb.action.PUSH
            application/vnd.push
        
    
    

    JavaScript :

    function createPushService() {
      try {
    
            ops = { invokeTargetId : 'bert.pushcapture.invoke.push',
                    appId : 'XXX-XXXX...',
                    ppgUrl : 'http://cpXXX.pushapi.na.blackberry.com'
            };
    
            blackberry.push.PushService.create(ops, successCreatePushService, failCreatePushService, onSimChange, onPushTransportReady);  
    
      }
      catch (err) {
        alert(err);
      }
    } 
    
    function successCreatePushService(service) {
        //alert("Created Push service");
        // check this **bleep**
        pushService = service;
        blackberry.event.addEventListener("invoked", onInvoke);
        launchApplicationOnPush(true, launchApplicationCallback);
    }
    
    function failCreatePushService(result) {
        alert("Error: Received error code (" + result + ") after " + "calling blackberry.push.PushService.create.");
    }
    
    function onPushTransportReady(result) {
        if (result == blackberry.push.PushService.SUCCESS) {
                    alert("successful Configuration");
            } else {            
    
                if (result == blackberry.push.PushService.INTERNAL_ERROR) {
                    alert("Error: An internal error occurred while calling launchApplicationOnPush. " + "Try restarting the application.");
                } else if (result == blackberry.push.PushService.CREATE_SESSION_NOT_DONE) {
                    alert("Error: Called launchApplicationOnPush without an " +
                    "existing session. It usually means a programming error.");
                } else {
                    alert("Error: Received error code (" + result + ") after " + "calling launchApplicationOnPush.");
                }
            }
    }
    
    function launchApplicationCallback(result) {
        if (result == blackberry.push.PushService.SUCCESS) {
                    alert("successful Configuration");
            } else {
    
                if (result == blackberry.push.PushService.INTERNAL_ERROR) {
                    alert("Error: An internal error occurred while calling launchApplicationOnPush. " + "Try restarting the application.");
                } else if (result == blackberry.push.PushService.CREATE_SESSION_NOT_DONE) {
                    alert("Error: Called launchApplicationOnPush without an " + "existing session. It usually means a programming error.");
                } else {
                    alert("Error: Received error code (" + result + ") after " + "calling launchApplicationOnPush.");
                }
            }
    }
    
    function onSimChange() {
        alert("SIM card is changed!");
    }
    
    function createChannelCallback(result, token) {
        if (result === blackberry.push.PushService.SUCCESS) {
            alert("channel created");
        } else if (result === blackberry.push.PushService.INTERNAL_ERROR) {
            alert("channel failed");
    
        }
    }
    
    function onInvoke (invokeRequest) {
            if (invokeRequest.action != null && invokeRequest.action == "bb.action.PUSH") {
                if (pushService == null) {
                    setTimeout(function() { onInvoke(invokeRequest); }, 750);
                } else {
                    var pushPayload = extractPushPayload(invokeRequest);
                    pushNotificationHandler(pushPayload);
                }
            }
    }
    
    function pushNotificationHandler (pushpayload) {
        var contentType = pushpayload.headers["Content-Type"];
        if(!contentType) {
            contentType = pushpayload.headers["content-type"];
            if(!contentType) {
                contentType = "text/plain";
            }
        }
    
        db.transaction(
            function(tx) {
                tx.executeSql("INSERT INTO Data (title) values(?)", [ "PUSH"], null);
            });
    
        //alert("PUSH RECEIVED");
        pushpayload.acknowledge(true);
    
    };
    

    I call following functions thanks to a button:

    1 createPushService();

    2 pushService.createChannel (createChannelCallback);

    and I get a 'alert ("channel created");"and it means to me that the PushService and the channel was created successfully.

    Given that I have create an event for a 'called' via 'blackberry.event.addEventListener ("called" onInvoke),"the"onInvoke"function should be called when receives a new thumb. Fix?

    Unfortunately it does not work and I get no response or error.

    Any help or advice is appreciated. I'm really stuck here...

    The best

    bert2002

    Hello

    A couple of things to ask you.  Not sure if they are related to your problem, but it's worth a shot.

    1. you call extractPushPayload below when dealing with a thrust to invoke.  But, when this function is defined?  You must call pushSevice.extractPushPayload somewhere.

    2. you should not the setTimeout function need more if you add the event listener for the "called" event in your call to success blackberry.push.PushService.create.  Our sample no longer use setTimeout.

    3. in your code, you call launchApplicationOnPush and createChannel every time.  You only really need to call them once.  After graduating launchApplicationonPush and reminders of createChannel successfully the first time, then you are ready to receive the impulses.  You just do it again if you make a destroyChannel somewhere.  Do you need to call blackberry.push.PushService.create each time however.

    4. are you setting the tag in your config.xml file?

    Hope that helps,

    Matt

Maybe you are looking for