commit | 00a6cdff9386a2c7cebf5749ce2e914065fdec5d | [log] [tgz] |
---|---|---|
author | Justin Tyberg <jtyberg@us.ibm.com> | Mon Dec 06 11:43:34 2010 -0500 |
committer | Justin Tyberg <jtyberg@us.ibm.com> | Mon Dec 06 11:43:34 2010 -0500 |
tree | f0d1e87bf81fdd9b005605ea3fa81205143a64a6 | |
parent | 315af2ac83449d92f29b3b59e4d405b92e9781d5 [diff] |
Change PhoneGap version to 0.9.3.
PhoneGap framework for BlackBerry OS 5.0 and 6.0. The framework is implemented using the BlackBerry Web Widget SDK.
framework/ ... BlackBerry Widget Extension (PhoneGap native code) js/ .......... PhoneGap JavaScript (Non-concatenated, non-minified) template/ .... Project template for creating a new projects
The Blackberry Widget SDK provides a framework for developing hybrid applications for Blackberry devices that support Blackberry OS 5.0 and higher. In this framework, web applications consisting of web content, resources, and JavaScript can access device specific features through the exposed JavaScript Blackberry Widget API.
The Blackberry Widget API is a subset of the native Blackberry Java API. A Widget application can make use of the native Java APIs by using JavaScript extensions. Doing so provides the Widget application access to device information and capabilities that the Widget API does not provide. It is therefore helpful to think of a Blackberry Widget application as having two parts:
The phonegap-blackberry-widget project uses both the Blackberry Widget API and JavaScript extensions. This project will allow you to create your own Blackberry Widget applications that leverage the common PhoneGap API.
There are two approaches to developing a PhoneGap BlackBerry Widget:
;%ANT_HOME%\bin
to the end of the PATH value.Open your command-line tool (cmd.exe or cygwin.exe)
$ ant -v Apache Ant version 1.8.1 compiled on April 30 2010 Trying the default build file: build.xml Buildfile: build.xml does not exist! Build failed
$ cd C:\some\path\ $ git clone git://github.com/phonegap/phonegap-blackberry-widget.git $ cd phonegap-blackberry-widget $ ant help
Each project contains the PhoneGap framework and so the project is independent of the phonegap-blackberry-widget source code.
This allows you to easily distribute the project to other BlackBerry widget developers.
$ cd phonegap-blackberry-widget $ ant help $ ant create -Dproject.path="C:\development\my_new_project" $ cd C:\development\my_new_project $ ant help
For each project, you need to tell ANT where you have installed the BlackBerry Widget SDK. You can do this by editing project.properties in the project directory.
[edit project.properties]
$ cd C:\development\my_new_project $ ant help $ ant load-simulator $ ant load-device
$ cd phonegap-blackberry-widget $ git pull origin master $ ant update -Dproject.path="C:\development\my_new_project"
The Eclipse BlackBerry Widget Plugin has some powerful debugging options, such as settings breakpoints in JavaScript. In order to use these features, you must import your source code into a BlackBerry Widget project.
Follow in the installation instructions under the section Running PhoneGap BlackBerry Widgets from Eclipse.
It is best to setup two projects in Eclipse: a Java project for the Widget Extension native Java code, and a Blackberry Widget project for the web application code and resources.
$ cd C:\some\path\ $ git clone git://github.com/phonegap/phonegap-blackberry-widget.git
Q: I uploaded my application to the BlackBerry device, but it will not open or run.
A: Try hard resetting the device by pressing and hold ALT + CAPS LOCK + DEL. You must press and hold each key in sequence and not all at once.
Q: My simulator screen is not refreshing and I see blocks on a clicked position.
A: Windows 7 and the simulator's graphics acceleration do not mix. On the simulator, set View -> Graphics Acceleration to Off.
Q: When I use the PhoneGap Camera.getPicture API on my device, the camera never returns to my application. Why does this happen?
A: PhoneGap uses a JavaScript extension to invoke the native camera application so the user can take a picture. When the picture is taken, PhoneGap will close the native camera application by emulating key injections (like pressing the back button). On a physical device, users will have to set permissions to allow your application to allow key injections to take place. Setting application permissions is device-specific. On a Storm2 (9550), for example, select the Blackberry button from the Home screen to get to All Applications screen, then Options > Applications > Your Application. Then select Edit Default Permissions > Interactions > Input Simulation and set it to ‘Allow’. Save your changes.