Академический Документы
Профессиональный Документы
Культура Документы
BlackBerry WebWorks is an application platform for BlackBerry smartphones. The BlackBerry WebWorks SDK was released by Research In Motion in October 2009 - under the name, BlackBerry Widgets - to enable developers to create hybrid (web and native) applications for BlackBerry devices running BlackBerry OS 5.0 and higher. WebWorks applications cannot be run on devices that support BlackBerry OS 4. In September 2010, RIM announced BlackBerry WebWorks, the next generation of the BlackBerry Widget framework. At the time of the announcement, WebWorks was little more than a rebranding of the existing Widget framework. RIM continues to develop WebWorks, and has made a version of the SDK available for the PlayBook tablet. Before the BlackBerry WebWorks SDK was released, developers could only create BlackBerry applications using RIM's Java Development Environment (JDE). The BlackBerry WebWorks SDK is targeted at the web developer and enables a new kind of hybrid (web + native Java) application for BlackBerry devices. The platform includes: The BlackBerry WebWorks API, which exposes device information and capabilities through JavaScript. A framework that enables developers to extend the WebWorks API. The framework allows developers to create JavaScript Extensions, which are written in Java and expose their own JavaScript API through the WebWorks framework. JavaScript Extensions have full access to all the capabilities that RIM's native Java APIs provide. Development tools to help create WebWorks applications and JavaScript Extensions.
Important Information
BlackBerry WebWorks tooling is only available for Windows environments. In addition, if you are running a 64-bit Windows operating system, you must use the 32-bit versions of the Java SDK and Eclipse. WebWorks applications can ONLY be deployed to BlackBerry devices running OS 5.0 and higher. This information will not help you develop PhoneGap applications targeted for BlackBerry OS 4. For instructions on how to do that, see link.
4.
5.
4.
5.
NOTE: To have a choice of locations to install, choose the "Run" option instead of the "Save" option when given that choice during the downloading procedure.
Download PhoneGap
1. 2. 3. 4. Download the latest stable release of PhoneGap Select the Downloads button on the upper right. Select the Download.zip button and save the archive file to a temporary directory. Unzip the contents of the archive file to a working directory, e.g. C:\Dev\phonegap-1.3.0
Note: be sure to escape the backslashes in the directory path. 4. Return to the command window and build the PhoneGap sample project: C:\Dev\phonegap-1.3.0\phonegap-1.3.0\BlackBerry-WebWorks\sample>ant blackberry build Buildfile: C:\Dev\bbw\sample\build.xml generate-cod-name: [echo] Generated name: PhoneGapSample.cod clean: [delete] Deleting directory C:\bbw\sample\build package-app: [mkdir] Created dir: C:\Dev\phonegap-1.0.0\phonegap-1.0.0\BlackBerry-
WebWorks\sample\build\widget [copy] Copying 8 files to C:\Dev\phonegap-1.0.0\phonegap1.0.0\BlackBerry-WebWorks\sample\build\widget [zip] Building zip: C:\Dev\phonegap-1.0.0\phonegap1.0.0\BlackBerry-WebWorks\sample\build\PhoneGapSample.zip build: [exec] [exec] [exec] [exec] [exec] element [exec] [exec] [exec] [exec]
Parsing command line options Parsing bbwp.properties Validating widget archive Parsing config.xml Failed to find the <author> Populating widget source Compiling widget Generating output files Widget packaging complete
3.
[Optional] Run the PhoneGap sample in a user-defined BlackBerry simulator. Edit the project.properties file. In this case, we specify the simulator running BlackBerry OS 6.0 (Torch 9800) that comes installed with the BlackBerry WebWorks Packager. When finished, repeat steps 1 and 2.
# (Optional) Simulator Directory # # If sim.dir is not specified, the build script will use the simulator
directory # within the Blackberry Widget Packager. # blackberry.sim.dir=C:\\BBWP\\simpack\\6.0.0.227 # (Optional) Simulator Binary # # If sim.bin is not specified, the build script will attempt to use the default # simulator in the simulator directory. # blackberry.sim.bin=9800.bat
Install the BlackBerry Web and WebWorks SDK Plug-ins for Eclipse
End Of Life Notice: The BlackBerry WebWorks Plug-in For Eclipse will no longer be available for download as of Oct. 18, 2011. Support for the plug-in will be discontinued on Dec. 31, 2011. Read more. You will need at least two plug-ins to develop WebWorks applications using Eclipse: the BlackBerry Web Plug-in, and the WebWorks SDK Plug-in. Both are available using the standard Eclipse software installation procedure. Note: Even if the standalone BlackBerry WebWorks SDK is already installed on your system, you must install the BlackBerry WebWorks Plug-in for Eclipse to enable Blackberry WebWorls project capabilities within Eclipse. 1. 2. Start Eclipse and create a workspace. Help -> Install New Software... -> Click Add... Name: Blackberry Update - Web Location: Blackberry Web - http://www.blackberry.com/go/eclipseUpdate/3.6/web Select Blackberry Web Plug-in Category. This will select both of the required plug-ins
3.
4.
Restart Eclipse
3.
iii.
4. 5.
Build the WebWorks application i. Select the project, right-click and select Build BlackBerry Widget Project Run the WebWorks application in the simulator i. Select the project, right-click and select Run as -> Blackberry Simulator