You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/12/07 01:17:20 UTC
[04/12] Version 3.3.0
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c6219cfc/docs/en/3.3.0/guide/platforms/android/plugin.md
----------------------------------------------------------------------
diff --git a/docs/en/3.3.0/guide/platforms/android/plugin.md b/docs/en/3.3.0/guide/platforms/android/plugin.md
new file mode 100644
index 0000000..77902fc
--- /dev/null
+++ b/docs/en/3.3.0/guide/platforms/android/plugin.md
@@ -0,0 +1,220 @@
+---
+license: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+---
+
+# Android Plugins
+
+This section provides details for how to implement native plugin code
+on the Android platform. Before reading this, see Application Plugins
+for an overview of the plugin's structure and its common JavaScript
+interface. This section continues to demonstrate the sample _echo_
+plugin that communicates from the Cordova webview to the native
+platform and back. For another sample, see also the comments in
+[CordovaPlugin.java](https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaPlugin.java).
+
+Android plugins are based on Cordova-Android, which consists of an
+Android WebView with hooks attached to it. Plugins are represented as
+class mappings in the `config.xml` file. A plugin consists of at
+least one Java class that extends the `CordovaPlugin` class,
+overriding one of its `execute` methods. As best practice, the plugin
+should also handle `pause` and `resume` events, along with any message
+passing between plugins. Plugins with long-running requests,
+background activity such as media playback, listeners, or internal
+state should implement the `onReset()` method as well. It executes
+when the `WebView` navigates to a new page or refreshes, which reloads
+the JavaScript.
+
+## Plugin Class Mapping
+
+The plugin's JavaScript interface uses the `cordova.exec` method as
+follows:
+
+ exec(<successFunction>, <failFunction>, <service>, <action>, [<args>]);
+
+This marshals a request from the WebView to the Android native side,
+effectively calling the `action` method on the `service` class, with
+additional arguments passed in the `args` array.
+
+Whether you distribute a plugin as Java file or as a _jar_ file of its
+own, the plugin must be specified in your Cordova-Android
+application's `res/xml/config.xml` file. See Application Plugins for
+more information on how to use the `plugin.xml` file to inject this
+`feature` element:
+
+ <feature name="<service_name>">
+ <param name="android-package" value="<full_name_including_namespace>" />
+ </feature>
+
+The service name matches the one used in the JavaScript `exec` call.
+The value is the Java class's fully qualified namespace identifier.
+Otherwise, the plugin may compile but still be unavailable to Cordova.
+
+## Writing an Android Java Plugin
+
+A JavaScript call fires off a plugin request to the native side, and
+the correspoinding Java plugin is mapped properly in the `config.xml`
+file, but what does the final Android Java Plugin class look like?
+Whatever is dispatched to the plugin with JavaScript's `exec` function
+is passed into the plugin class's `execute` method. Most `execute`
+implementations look like this:
+
+ @Override
+ public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+ if ("beep".equals(action)) {
+ this.beep(args.getLong(0));
+ callbackContext.success();
+ return true;
+ }
+ return false; // Returning false results in a "MethodNotFound" error.
+ }
+
+The JavaScript `exec` function's `action` parameter corresponds to a
+private class method to dispatch with optional parameters.
+
+When catching exceptions and returning errors, it's important for the
+sake of clarity that errors returned to JavaScript match Java's
+exception names as much as possible.
+
+## Threading
+
+The plugin's JavaScript does _not_ run in the main thread of the
+`WebView` interface; instead, it runs on the `WebCore` thread, as
+does the `execute` method. If you need to interact with the user
+interface, you should use the following variation:
+
+ @Override
+ public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
+ if ("beep".equals(action)) {
+ final long duration = args.getLong(0);
+ cordova.getActivity().runOnUiThread(new Runnable() {
+ public void run() {
+ ...
+ callbackContext.success(); // Thread-safe.
+ }
+ });
+ return true;
+ }
+ return false;
+ }
+
+Use the following if you do not need to run on the main interface's
+thread, but do not want to block the `WebCore` thread either:
+
+ @Override
+ public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
+ if ("beep".equals(action)) {
+ final long duration = args.getLong(0);
+ cordova.getThreadPool().execute(new Runnable() {
+ public void run() {
+ ...
+ callbackContext.success(); // Thread-safe.
+ }
+ });
+ return true;
+ }
+ return false;
+ }
+
+## Echo Android Plugin Example
+
+To match the JavaScript interface's _echo_ feature described in
+Application Plugins, use the `plugin.xml` to inject a `feature`
+specification to the local platform's `config.xml` file:
+
+ <platform name="android">
+ <config-file target="config.xml" parent="/*">
+ <feature name="Echo">
+ <param name="android-package" value="org.apache.cordova.plugin.Echo"/>
+ </feature>
+ </config-file>
+ </platform>
+
+Then add the following to the
+`src/org/apache/cordova/plugin/Echo.java` file:
+
+ package org.apache.cordova.plugin;
+
+ import org.apache.cordova.CordovaPlugin;
+ import org.apache.cordova.CallbackContext;
+
+ import org.json.JSONArray;
+ import org.json.JSONException;
+ import org.json.JSONObject;
+
+ /**
+ * This class echoes a string called from JavaScript.
+ */
+ public class Echo extends CordovaPlugin {
+
+ @Override
+ public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+ if (action.equals("echo")) {
+ String message = args.getString(0);
+ this.echo(message, callbackContext);
+ return true;
+ }
+ return false;
+ }
+
+ private void echo(String message, CallbackContext callbackContext) {
+ if (message != null && message.length() > 0) {
+ callbackContext.success(message);
+ } else {
+ callbackContext.error("Expected one non-empty string argument.");
+ }
+ }
+ }
+
+The necessary imports at the top of the file extends the class from
+`CordovaPlugin`, whose `execute()` method it overrides to receive
+messages from `exec()`. The `execute()` method first tests the value
+of `action`, for which in this case there is only one valid `echo`
+value. Any other action returns `false` and results in an
+`INVALID_ACTION` error, which translates to an error callback invoked
+on the JavaScript side.
+
+Next, the method retrieves the echo string using the `args` object's
+`getString` method, specifying the first parameter passed to the
+method. After the value is passed to a private `echo` method, it is
+parameter-checked to make sure it is not `null` or an empty string, in
+which case `callbackContext.error()` invokes JavaScript's error
+callback. If the various checks pass, the `callbackContext.success()`
+passes the original `message` string back to JavaScript's success
+callback as a parameter.
+
+## Android Integration
+
+Android features an `Intent` system that allows processes to
+communicate with each other. Plugins have access to a
+`CordovaInterface` object, which can access the Android `Activity`
+that runs the application. This is the `Context` required to launch a
+new Android `Intent`. The `CordovaInterface` allows plugins to start
+an `Activity` for a result, and to set the callback plugin for when
+the `Intent` returns to the application.
+
+As of Cordova 2.0, Plugins can no longer directly access the
+`Context`, and the legacy `ctx` member is deprecated. All `ctx`
+methods exist on the `Context`, so both `getContext()` and
+`getActivity()` can return the required object.
+
+## Debugging Android Plugins
+
+Eclipse allows you to debug plugins as Java source included in the
+project. Only the latest version of the Android Developer Tools
+allows you to attach source code to _JAR_ dependencies, so this
+feature is not yet fully supported.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c6219cfc/docs/en/3.3.0/guide/platforms/android/tools.md
----------------------------------------------------------------------
diff --git a/docs/en/3.3.0/guide/platforms/android/tools.md b/docs/en/3.3.0/guide/platforms/android/tools.md
new file mode 100644
index 0000000..e624089
--- /dev/null
+++ b/docs/en/3.3.0/guide/platforms/android/tools.md
@@ -0,0 +1,85 @@
+---
+license: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+---
+
+# Android Command-line Tools
+
+The `cordova` command-line utility is a high-level tool that allows
+you to build applications across several platforms at once. An older
+version of the Cordova framework provides sets of command-line tools
+specific to each platform. To use them as an alternative to the CLI,
+you need to download this version of Cordova from
+[cordova.apache.org](http://cordova.apache.org). The download contains
+separate archives for each platform. Expand the platform you wish to
+target. The tools described here are typically available in the
+top-level `bin` directory, otherwise consult the __README__ file for
+more detailed directions.
+
+For information on the low-level command-line interface that enables
+plugins, see Using Plugman to Manage Plugins. See Application Plugins
+for an overview.
+
+## Create a Project
+
+Run the `create` command, specifying the existing path to the project,
+the reverse-domain-style package identifier, and the app's display
+name. Here is the syntax for both Mac and Windows:
+
+ $ /path/to/cordova-android/bin/create /path/to/project com.example.project_name ProjectName
+ $ C:\path\to\cordova-android\bin\create.bat C:\path\to\project com.example.project_name ProjectName
+
+## Build
+
+This cleans then builds a project.
+
+Debug, on Mac or Windows:
+
+ $ /path/to/project/cordova/build --debug
+ $ C:\path\to\project\cordova\build.bat --debug
+
+Release, on Mac or Windows:
+
+ $ /path/to/project/cordova/build --release
+ $ C:\path\to\project\cordova\build.bat --release
+
+## Run the App
+
+The `run` command accepts the following _optional_ parameters:
+
+* Target specification. This includes `--emulator`, `--device`, or `--target=<targetID>`.
+
+* Build specification. This includes `--debug`, `--release`, or `--nobuild`.
+
+ $ /path/to/project/cordova/run [Target] [Build]
+ $ C:\path\to\project\cordova\run.bat [Target] [Build]
+
+Make sure you create at least one Android Virtual Device, otherwise
+you're prompted to do so with the `android` command. If more than one
+AVD is available as a target, you're prompted to select one. By
+default the `run` command detects a connected device, or a currently
+running emulator if no device is found.
+
+## Logging
+
+ $ /path/to/project/cordova/log
+ $ C:\path\to\project\cordova\log.bat
+
+### Cleaning
+
+ $ /path/to/project/cordova/clean
+ $ C:\path\to\project\cordova\clean.bat
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c6219cfc/docs/en/3.3.0/guide/platforms/android/upgrading.md
----------------------------------------------------------------------
diff --git a/docs/en/3.3.0/guide/platforms/android/upgrading.md b/docs/en/3.3.0/guide/platforms/android/upgrading.md
new file mode 100644
index 0000000..8e87dd5
--- /dev/null
+++ b/docs/en/3.3.0/guide/platforms/android/upgrading.md
@@ -0,0 +1,441 @@
+---
+license: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+---
+
+# Upgrading Android
+
+This guide shows how to modify Android projects to upgrade from older versions of Cordova.
+Most of these instructions apply to projects created with an older set
+of command-line tools that precede the `cordova` CLI utility. See The Command-Line Interface for information how to update the
+version of the CLI.
+
+## Upgrading to 3.2.0 from 3.1.0
+
+For projects that were created with the cordova CLI:
+
+1. Update the `cordova` CLI version. See The Command-Line Interface.
+
+2. Run `cordova platform update android`
+
+For projects not created with the cordova CLI, run:
+
+ bin/update <project_path>
+
+## Upgrading to 3.1.0 from 3.0.0
+
+For projects that were created with the cordova CLI:
+
+1. Update the `cordova` CLI version. See The Command-Line Interface.
+
+2. Run `cordova platform update android`
+
+For projects not created with the cordova CLI, run:
+
+ bin/update <project_path>
+
+## Upgrade to the CLI (3.0.0) from 2.9.0
+
+1. Create a new Apache Cordova 3.0.0 project using the cordova CLI, as
+ described in The Command-Line Interface.
+
+2. Add your platforms the cordova project, for example: `cordova
+ platform add android`.
+
+3. Copy the contents of your project's `www` directory to the `www` directory
+ at the root of the cordova project you just created.
+
+4. Copy any native assets from your old project into the appropriate
+ directories under `platforms/android`: this directory is where your
+ native cordova-android project exists.
+
+5. Use the cordova CLI tool to install any plugins you need. Note that
+ the CLI handles all core APIs as plugins, so they may need to be
+ added. Only 3.0.0 plugins are compatible with the CLI.
+
+## Upgrade to 3.0.0 from 2.9.0
+
+1. Create a new Apache Cordova Android project.
+
+2. Copy the contents of your `www` directory to the new project.
+
+3. Copy any native Android assets from your `res` directory to the new project.
+
+4. Copy over any plugins you installed from the `src` subdirectories into the new project.
+
+5. Make sure to upgrade any deprecated `<plugin>` references from your old `config.xml` file to the new `<feature>` specification.
+
+6. Update any references to the `org.apache.cordova.api` package to be `org.apache.cordova`.
+
+ __NOTE__: all core APIs have been removed and must be installed as plugins. Please see the Using Plugman to Manage Plugins Guide for details.
+
+## Upgrade to 2.9.0 from 2.8.0
+
+1. Run `bin/update <project_path>`.
+
+## Upgrade to 2.8.0 from 2.7.0
+
+1. Remove `cordova-2.7.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-2.8.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+<!-- SS Eclipse -->
+
+4. Copy the new `cordova.js` into your project.
+
+5. Update your HTML to use the new `cordova.js` file.
+
+6. Copy the `res/xml/config.xml` file to match `framework/res/xml/config.xml`.
+
+7. Update `framework/res/xml/config.xml` to have similar settings as it did previously.
+
+8. Copy files from `bin/templates/cordova` to the project's `cordova` directory.
+
+## Upgrade to 2.7.0 from 2.6.0
+
+1. Remove `cordova-2.6.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-2.7.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-2.7.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-2.7.0.js` file.
+
+6. Copy the `res/xml/config.xml` to match `framework/res/xml/config.xml`.
+
+7. Update `framework/res/xml/config.xml` to have similar settings as it did previously.
+
+8. Copy files from `bin/templates/cordova` to the project's `cordova` directory.
+
+## Upgrade to 2.6.0 from 2.5.0
+
+1. Remove `cordova-2.5.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-2.6.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-2.6.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-2.6.0.js` file.
+
+6. Copy the `res/xml/config.xml` to match `framework/res/xml/config.xml`.
+
+7. Update `framework/res/xml/config.xml` to have similar settings as it did previously.
+
+8. Copy files from `bin/templates/cordova` to the project's `cordova` directory.
+
+Run `bin/update <project>` with the project path listed in the Cordova Source directory.
+
+## Upgrade to 2.5.0 from 2.4.0
+
+1. Remove `cordova-2.4.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-2.5.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-2.5.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-2.5.0.js` file.
+
+6. Copy the `res/xml/config.xml` to match `framework/res/xml/config.xml`.
+
+7. Update `framework/res/xml/config.xml` to have similar settings as it did previously.
+
+8. Copy files from `bin/templates/cordova` to the project's `cordova` directory.
+
+## Upgrade to 2.4.0 from 2.3.0
+
+1. Remove `cordova-2.3.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-2.4.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-2.4.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-2.4.0.js` file.
+
+6. Copy the `res/xml/config.xml` to match `framework/res/xml/config.xml`.
+
+7. Copy files from `bin/templates/cordova` to the project's `cordova` directory.
+
+## Upgrade to 2.3.0 from 2.2.0
+
+1. Remove `cordova-2.2.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-2.3.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-2.3.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-2.3.0.js` file.
+
+6. Copy the `res/xml/config.xml` to match `framework/res/xml/config.xml`.
+
+7. Copy files from `bin/templates/cordova` to the project's `cordova` directory.
+
+## Upgrade to 2.2.0 from 2.1.0
+
+1. Remove `cordova-2.1.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-2.2.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-2.2.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-2.2.0.js` file.
+
+6. Copy the `res/xml/config.xml` to match `framework/res/xml/config.xml`.
+
+7. Copy files from `bin/templates/cordova` to the project's `cordova` directory.
+
+## Upgrade to 2.1.0 from 2.0.0
+
+1. Remove `cordova-2.0.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-2.1.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-2.1.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-2.1.0.js` file.
+
+6. Copy the `res/xml/config.xml` to match `framework/res/xml/config.xml`.
+
+7. Copy files from `bin/templates/cordova` to the project's `cordova` directory.
+
+## Upgrade to 2.0.0 from 1.9.0
+
+1. Remove `cordova-1.9.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-2.0.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-2.0.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-2.0.0.js` file.
+
+6. Copy the `res/xml/config.xml` to match `framework/res/xml/config.xml`.
+
+In the 2.0.0 release, the `config.xml` file combines and replaces
+`cordova.xml` and `plugins.xml`. The old files are deprecated, and
+while they still work in 2.0.0, will stop working in a future release.
+
+## Upgrade to 1.9.0 from 1.8.1
+
+1. Remove `cordova-1.8.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-1.9.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-1.9.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-1.9.0.js` file.
+
+6. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+Due to the introduction of the `CordovaWebView` in the 1.9.0 release,
+third-Party plugins may not work. These plugins need to get a context
+from the `CordovaInterface` using `getContext()` or `getActivity()`.
+If you are not an experienced Android developer, please contact the
+plugin maintainer and add this task to their bug tracker.
+
+## Upgrade to 1.8.0 from 1.8.0
+
+1. Remove `cordova-1.8.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-1.8.1.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-1.8.1.js` into your project.
+
+5. Update your HTML to use the new `cordova-1.8.1.js` file.
+
+6. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+## Upgrade to 1.8.0 from 1.7.0
+
+1. Remove `cordova-1.7.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-1.8.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-1.8.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-1.8.0.js` file.
+
+6. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+## Upgrade to 1.8.0 from 1.7.0
+
+1. Remove `cordova-1.7.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-1.8.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-1.8.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-1.8.0.js` file.
+
+6. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+## Upgrade to 1.7.0 from 1.6.1
+
+1. Remove `cordova-1.6.1.jar` from the project's `libs` directory.
+
+2. Add `cordova-1.7.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-1.7.0.js` into your project.
+
+5. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+## Upgrade to 1.6.1 from 1.6.0
+
+1. Remove `cordova-1.6.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-1.6.1.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-1.6.1.js` into your project.
+
+5. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+## Upgrade to 1.6.0 from 1.5.0
+
+1. Remove `cordova-1.5.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-1.6.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-1.6.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-1.6.0.js` file.
+
+6. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+7. Replace `res/xml/phonegap.xml` with `res/xml/cordova.xml` to match `framework/res/xml/cordova.xml`.
+
+## Upgrade to 1.5.0 from 1.4.0
+
+1. Remove `phonegap-1.4.0.jar` from the project's `libs` directory.
+
+2. Add `cordova-1.5.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `cordova-1.5.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-1.5.0.js` file.
+
+6. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+7. Replace `res/xml/phonegap.xml` with `res/xml/cordova.xml` to match `framework/res/xml/cordova.xml`.
+
+## Upgrade to 1.4.0 from 1.3.0
+
+1. Remove `phonegap-1.3.0.jar` from the project's `libs` directory.
+
+2. Add `phonegap-1.4.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `phonegap-1.4.0.js` into your project.
+
+5. Update your HTML to use the new `phonegap-1.4.0.js` file.
+
+6. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+7. Update `res/xml/phonegap.xml` to match `framework/res/xml/phonegap.xml`.
+
+## Upgrade to 1.3.0 from 1.2.0
+
+1. Remove `phonegap-1.2.0.jar` from the project's `libs` directory.
+
+2. Add `phonegap-1.3.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `phonegap-1.3.0.js` into your project.
+
+5. Update your HTML to use the new `phonegap-1.2.0.js` file.
+
+6. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+7. Update `res/xml/phonegap.xml` to match `framework/res/xml/phonegap.xml`.
+
+## Upgrade to 1.2.0 from 1.1.0
+
+1. Remove `phonegap-1.1.0.jar` from the project's `libs` directory.
+
+2. Add `phonegap-1.2.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `phonegap-1.2.0.js` into your project.
+
+5. Update your HTML to use the new `phonegap-1.2.0.js` file.
+
+6. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+7. Update `res/xml/phonegap.xml` to match `framework/res/xml/phonegap.xml`.
+
+## Upgrade to 1.1.0 from 1.0.0
+
+1. Remove `phonegap-1.0.0.jar` from the project's `libs` directory.
+
+2. Add `phonegap-1.1.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `phonegap-1.1.0.js` into your project.
+
+5. Update your HTML to use the new `phonegap-1.1.0.js` file.
+
+6. Update `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
+## Upgrade to 1.0.0 from 0.9.6
+
+1. Remove `phonegap-0.9.6.jar` from the project's `libs` directory.
+
+2. Add `phonegap-1.0.0.jar` to the project's `libs` directory.
+
+3. If you use Eclipse, please refresh your Eclipse project and do a clean.
+
+4. Copy the new `phonegap-1.0.0.js` into your project.
+
+5. Update your HTML to use the new `phonegap-1.0.0.js` file.
+
+6. Add the `res/xml/plugins.xml` to match `framework/res/xml/plugins.xml`.
+
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c6219cfc/docs/en/3.3.0/guide/platforms/android/webview.md
----------------------------------------------------------------------
diff --git a/docs/en/3.3.0/guide/platforms/android/webview.md b/docs/en/3.3.0/guide/platforms/android/webview.md
new file mode 100644
index 0000000..fb92617
--- /dev/null
+++ b/docs/en/3.3.0/guide/platforms/android/webview.md
@@ -0,0 +1,131 @@
+---
+license: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+---
+
+# Android WebViews
+
+This section shows how to embed a Cordova-enabled WebView component
+within a larger Android application. For details on how these
+components can communicate with each other, see Application Plugins.
+
+If you're unfamiliar with Android, you should first familiarize
+yourself with the Android Platform Guide and have the latest Android
+SDK installed before you attempt the more unusual development option
+of embedding a WebView. Starting with Cordova 1.9, the Android
+platform relies on a `CordovaWebView` component, which builds on a
+legacy `CordovaActivity` component that pre-dates the 1.9 release.
+
+1. To follow these instructions, make sure you have the latest Cordova
+ distribution. Download it from
+ [cordova.apache.org](http://cordova.apache.org) and unzip its
+ Android package.
+
+1. Navigate to the Android package's `/framework` directory and run
+ `ant jar`. It creates the Cordova `.jar` file, formed as
+ `/framework/cordova-3.3.0.jar`.
+
+1. Copy the `.jar` file into the Android project's `/libs` directory.
+
+1. Add the following to the application's `/res/xml/main.xml` file,
+ with the `layout_height`, `layout_width` and `id` modified to suit
+ the application:
+
+ <org.apache.cordova.CordovaWebView
+ android:id="@+id/tutorialView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+1. Modify the activity so that it implements the `CordovaInterface`.
+ It should implement the included methods. You may wish to copy
+ them from `/framework/src/org/apache/cordova/CordovaActivity.java`,
+ or else implement them on your own. The following code fragment
+ shows a basic application that relies on the interface. Note how
+ the referenced view id matches the `id` attribute specified in the
+ XML fragment shown above:
+
+ public class CordovaViewTestActivity extends Activity implements CordovaInterface {
+ CordovaWebView cwv;
+ /* Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main);
+ cwv = (CordovaWebView) findViewById(R.id.tutorialView);
+ Config.init(this);
+ cwv.loadUrl(Config.getStartUrl());
+ }
+
+1. If the application needs to use the camera, implement the
+ following:
+
+ @Override
+ public void setActivityResultCallback(CordovaPlugin plugin) {
+ this.activityResultCallback = plugin;
+ }
+ /**
+ * Launch an activity for which you would like a result when it finished. When this activity exits,
+ * your onActivityResult() method is called.
+ *
+ * @param command The command object
+ * @param intent The intent to start
+ * @param requestCode The request code that is passed to callback to identify the activity
+ */
+ public void startActivityForResult(CordovaPlugin command, Intent intent, int requestCode) {
+ this.activityResultCallback = command;
+ this.activityResultKeepRunning = this.keepRunning;
+
+ // If multitasking turned on, then disable it for activities that return results
+ if (command != null) {
+ this.keepRunning = false;
+ }
+
+ // Start activity
+ super.startActivityForResult(intent, requestCode);
+ }
+
+ @Override
+ /**
+ * Called when an activity you launched exits, giving you the requestCode you started it with,
+ * the resultCode it returned, and any additional data from it.
+ *
+ * @param requestCode The request code originally supplied to startActivityForResult(),
+ * allowing you to identify who this result came from.
+ * @param resultCode The integer result code returned by the child activity through its setResult().
+ * @param data An Intent, which can return result data to the caller (various data can be attached to Intent "extras").
+ */
+ protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
+ super.onActivityResult(requestCode, resultCode, intent);
+ CordovaPlugin callback = this.activityResultCallback;
+ if (callback != null) {
+ callback.onActivityResult(requestCode, resultCode, intent);
+ }
+ }
+
+1. Finally, remember to add the thread pool, otherwise plugins
+ have no threads on which to run:
+
+ @Override
+ public ExecutorService getThreadPool() {
+ return threadPool;
+ }
+
+1. Copy the application's HTML and JavaScript files to the Android
+ project's `/assets/www` directory.
+
+1. Copy the `config.xml` file from `/framework/res/xml` to the
+ project's `/res/xml` directory.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c6219cfc/docs/en/3.3.0/guide/platforms/blackberry10/config.md
----------------------------------------------------------------------
diff --git a/docs/en/3.3.0/guide/platforms/blackberry10/config.md b/docs/en/3.3.0/guide/platforms/blackberry10/config.md
new file mode 100644
index 0000000..0749eb6
--- /dev/null
+++ b/docs/en/3.3.0/guide/platforms/blackberry10/config.md
@@ -0,0 +1,51 @@
+---
+license: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+---
+
+# BlackBerry 10 Configuration
+
+The `config.xml` file controls an app's basic settings that apply
+across each application and CordovaWebView instance. This section
+details preferences that only apply to BlackBerry 10 builds. See The
+config.xml File for information on global configuration options.
+
+- `ChildBrowser` (`disable` or the default `enable`): Disables child
+ browser windows. By default, apps launch a secondary browser window
+ to display resources accessed via `window.open()` or by specifying a
+ `_blank` anchor target. Specify `disable` to override this default
+ behavior.
+
+ <preference name="ChildBrowser" value="disable"/>
+
+- `PopupBlocker` (`enable` or the default `disable`): Enables the
+ popup blocker, which prevents calls to `window.open()`. By default,
+ popups display in a child browser window. Setting the preference to
+ `enable` prevents it from displaying at all.
+
+ <preference name="PopupBlocker" value="enable"/>
+
+- `WebSecurity` (`disable` or the default `enable`): Set to `disable`
+ to override web security settings, allowing access to remote content
+ from unknown sources. This preference is intended as a development
+ convenience only, so remove it before packaging your app for
+ distribution. For the released app, all URIs should be known and
+ whitelisted using the `<access>` element, described in the Domain
+ Whitelist Guide.
+
+ <preference name="WebSecurity" value="disable"/>
+
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c6219cfc/docs/en/3.3.0/guide/platforms/blackberry10/index.md
----------------------------------------------------------------------
diff --git a/docs/en/3.3.0/guide/platforms/blackberry10/index.md b/docs/en/3.3.0/guide/platforms/blackberry10/index.md
new file mode 100644
index 0000000..73c68f1
--- /dev/null
+++ b/docs/en/3.3.0/guide/platforms/blackberry10/index.md
@@ -0,0 +1,173 @@
+---
+license: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+---
+
+# BlackBerry 10 Platform Guide
+
+This guide shows how to set up your development environment to build
+and deploy Cordova apps for BlackBerry 10 devices. For previous
+versions of BlackBerry, you need to use a different set of
+command-line tools, described in BlackBerry Platform Guide.
+
+## Requirements
+
+The development environment is available on Windows, Mac and Linux.
+
+Developers should use the `cordova` utility in conjunction with the
+Blackberry Native SDK. See The Command-Line Interface for information
+how to install `cordova`, add projects, then build and deploy for each
+platform.
+
+## Install the BlackBerry Native SDK
+
+The BlackBerry Native SDK is available from
+[developer.blackberry.com](http://developer.blackberry.com/native/download/).
+Following installation, you need to add its command-line tools to your
+system path.
+
+On Windows:
+
+* Go to __My Computer → Properties → Advanced → Environment Variables__.
+
+* Append the Native SDK's install directory to the PATH, for example:
+
+ ;C:\bbndk\host_10_2_0_132\darwin\x86\usr\bin\
+
+On Mac and Linux:
+
+* Edit the `~/.bash_profile` file, adding a line such as the
+ following, depending on where the Native SDK was installed:
+
+ $ export PATH=${PATH}:/Applications/Momentics.app/host_10_2_0_15/darwin/x86/usr/bin/
+
+* Run the following to apply the change in the current session:
+
+ $ source ~/.bash_profile
+
+## Set up for Signing
+
+If you wish to test on a device or distribute apps through BlackBerry
+World, your system must be setup for code signing.
+
+To obtain a signing key, go to the [BlackBerry Keys Order Form] (https://www.blackberry.com/SignedKeys/codesigning.html).
+
+Select the first checkbox: "for BlackBerry10 apps developed using BlackBerry
+NDK" and then sign in or create a BBID.
+
+Enter a password and click "Get Token" to download bbidtoken.csk. Save this
+file to the default location for your OS which will be displayed on the
+download page.
+
+The final step is to generate a signing certificate:
+
+ $ blackberry-keytool -genkeypair -storepass <password> -author 'Your Name’
+
+## Create a Project
+
+Use the `cordova` utility to set up a new project, as described in The
+Command-Line Interface. For example, in a source-code directory:
+
+ $ cordova create hello com.example.hello
+ $ cd hello
+ $ cordova platform add blackberry10
+ $ cordova build
+
+## Deploy to Emulator
+
+If you wish to run a device emulator, download and install the
+BlackBerry 10 Simulator.
+
+* [Download](http://developer.blackberry.com/native/download/)
+* [Getting Started](http://developer.blackberry.com/devzone/develop/simulator/blackberry_10_simulator_start.html)
+
+Before testing an app on either an emulator or a device, you need to
+enable development mode.
+
+Launch the emulator image, then choose __Settings__ from the home screen:
+
+
+
+Navigate to the __Security and Privacy → Development Mode__
+section and enable the option:
+
+
+
+Then, run the `emulate` command to view the app:
+
+ $ cordova emulate blackberry10 --devicepass <password>
+
+## Deploy to Device
+
+To deploy to a device, make sure it is plugged into your computer and
+development mode is enabled.
+
+Then, run the `run` command to view the app:
+
+ $ cordova run blackberry10 --devicepass <password>
+
+If a debug token is not yet set up for the device, an error message
+prompts you to provide the password you defined when configuring your
+computer to sign applications.
+
+ $ cordova run blackberry10 --devicepass <password> --keystorepass <signing password>
+
+## Debugging with WebInspector
+
+When debugging on the device or an emulator, you may run WebInspector
+remotely to view the application's internal state. A prompt displays
+the URL that allows you to connect to your app with a standard web
+browser. For more information, see
+[Debugging using WebInspector](http://developer.blackberry.com/html5/documentation/web_inspector_overview_1553586_11.html).
+
+## Building a Release Version
+
+By default, running the `cordova build` command creates an unsigned
+_.bar_ package file suitable for testing on a device or simulator.
+
+Use `--release` to create a release version suitable for distribution
+through BlackBerry World.
+
+ $ cordova build --release --keystorepass <signing password>
+
+The `--keystorepass` option specifies the password you defined when
+configuring your computer to sign applications.
+
+
+## Deploy to Other Locations
+
+The instructions above assume a device is plugged in via USB or a
+simulator is running on the local machine. It is also possible to
+deploy to other locations.
+
+An additional set of command-line utilities are included when you set
+up the BlackBerry 10 platform for your project. The following
+command, in this case invoked from the project top-level directory,
+associates a target named _emu_ with an IP address.
+
+* On Windows:
+
+ $ platforms\blackberry10\cordova\target.bat add emu 192.168.2.24 -t simulator
+
+* On Mac/Linux:
+
+ $ platforms/blackberry10/cordova/target add emu 192.168.2.24 -t simulator
+
+Once the target is defined, you can provide it to the run command using
+`--target`:
+
+ $ cordova run blackberry10 --target=emu
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c6219cfc/docs/en/3.3.0/guide/platforms/blackberry10/plugin.md
----------------------------------------------------------------------
diff --git a/docs/en/3.3.0/guide/platforms/blackberry10/plugin.md b/docs/en/3.3.0/guide/platforms/blackberry10/plugin.md
new file mode 100644
index 0000000..8dd06be
--- /dev/null
+++ b/docs/en/3.3.0/guide/platforms/blackberry10/plugin.md
@@ -0,0 +1,255 @@
+---
+license: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+---
+
+# BlackBerry 10 Plugins
+
+This section provides details for how to implement native plugin code
+on the BlackBerry 10 platform. Before reading this, see Application
+Plugins for an overview of the plugin's structure and its common
+JavaScript interface. This section continues to demonstrate the sample
+_echo_ plugin that communicates from the Cordova webview to the native
+platform and back.
+
+The Echo plugin basically returns whatever string the `window.echo`
+function sends from JavaScript:
+
+ window.echo = function(str, callback) {
+ cordova.exec(callback, function(err) {
+ callback('Nothing to echo.');
+ }, "Echo", "echo", [str]);
+ };
+
+A Cordova plugin for BlackBerry 10 contains both JavaScript and native
+code, which communicate with each other through a framework provided
+by JNEXT. Every plugin must also include a `plugin.xml` file.
+
+## Creating the Native Class
+
+To create the native portion of your plugin, open the BlackBerry 10
+NDK IDE and select __File → New → BlackBerry Project →
+Native Extension → BlackBerry 10__. Enter the desired
+project name and location, then press __Finish__.
+
+The project created by the IDE contains sample code for a memory
+plugin. You may replace or modify these files to implement your own
+functionality:
+
+- `*name*_js.hpp`: C++ header for the JNEXT code.
+
+- `*name*_js.cpp`: C++ code for JNEXT.
+
+The native interface for the JNEXT extension can be viewed in the
+plugin header file located in the project's public directory. It also
+features constants and utility functions available from within native
+code. The plugin must be derived from `JSExt`, which is defined in
+`plugin.h`. That is, you must implement the following class:
+
+ class JSExt
+ {
+ public:
+ virtual ~JSExt() {};
+ virtual string InvokeMethod( const string& strCommand ) = 0;
+ virtual bool CanDelete( void ) = 0;
+ private:
+ std::string m_id;
+ };
+
+The extension should include the `plugin.h` header file. In the `Echo`
+example, you use `JSExt` as follows in the `echo_js.hpp` file:
+
+ #include "../public/plugin.h"
+ #include <string>
+
+ #ifndef ECHO_JS_H_
+ #define ECHO_JS_H_
+
+ class Echo : public JSExt
+ {
+ public:
+ explicit Echo(const std::string& id);
+ virtual ~Echo();
+ virtual std::string InvokeMethod(const std::string& command);
+ virtual bool CanDelete();
+ private:
+ std::string m_id;
+ };
+
+ #endif // ECHO_JS_H_
+
+The `m_id` attribute contains the `JNEXT` id for the object, which is
+passed to the class as an argument to the constructor. It is needed
+for the native side to trigger events on the JavaScript side. The
+`CanDelete` method determines whether the native object can be
+deleted. The `InvokeMethod` function is called as a result from a
+request from JavaScript to invoke a method of this particular
+object. The only argument to this function is a string passed from
+JavaScript that this method parses to determine which of the native
+object's methods should execute. These methods are implemented in
+`echo_js.cpp`. Here is the `InvokeMethod` function for the `Echo`
+example:
+
+ string Echo::InvokeMethod(const string& command) {
+
+ //parse command and args from string
+ int index = command.find_first_of(" ");
+ string strCommand = command.substr(0, index);
+ string strValue = command.substr(index + 1, command.length());
+
+ // Determine which function should be executed
+ if (strCommand == "echo") {
+ return strValue;
+ } else {
+ return "Unsupported Method";
+ }
+ }
+
+The native plugin must also implement the following callback
+functions:
+
+- `extern char* onGetObjList( void );`
+
+- `extern JSExt* onCreateObject( const string& strClassName, const string& strObjId );`
+
+The `onGetObjList` function returns a comma-separated list of classes
+supported by JNEXT. JNEXT uses this function to determine the set of
+classes that JNEXT can instantiate. The `Echo` plugin implements the
+following in `echo_js.cpp`:
+
+ char* onGetObjList() {
+ static char name[] = "Echo";
+ return name;
+ }
+
+The `onCreateObject ` function takes two parameters. The first is the
+name of the requested class to be created from the JavaScript side,
+with valid names as those returned in `onGetObjList`. The second
+parameter is the class's unique object id. This method returns a
+pointer to the created plugin object. The `Echo` plugin implements the
+following in `echo_js.cpp`:
+
+ JSExt* onCreateObject(const string& className, const string& id) {
+ if (className == "Echo") {
+ return new Echo(id);
+ }
+ return NULL;
+ }
+
+## Creating the Plugin's JavaScript
+
+The plugin must contain the following JavaScript files:
+
+- `client.js`: This is considered the client side and contains the API
+ available to a Cordova application. The API in `client.js` calls
+ makes calls to `index.js`. The API in `client.js` also connects
+ callback functions to the events that fire the callbacks.
+
+- `index.js`: Cordova loads `index.js` and makes it accessible through
+ the cordova.exec bridge. The `client.js` file makes calls to the API
+ in the `index.js` file, which in turn makes call to JNEXT to
+ communicate with the native side.
+
+The client and server side (`client.js` and `index.js`) interacts
+through the `Cordova.exec` function. The `client.js` needs to invoke
+the `exec` function and provide the necessary arguments. The `Echo`
+plugin implements the following in the `client.js` file:
+
+ var service = "org.apache.cordova.blackberry.echo",
+ exec = cordova.require("cordova/exec");
+
+ module.exports = {
+ echo: function (data, success, fail) {
+ exec(success, fail, service, "echo", { data: data });
+ }
+ };
+
+The `index.js` component uses JNEXT to interact with the native
+side. Attaching a constructor function named `Echo` to JNEXT allows
+you to perform the following key operations using the `init` function:
+
+- Specify the required module exported by the native side. The name of
+ the required module must match the name of a shared library file
+ (`.so` file):
+
+ JNEXT.require("libecho")
+
+- Create an object by using an acquired module and save the ID that's
+ returned by the call:
+
+ self.m_id = JNEXT.createObject("libecho.Echo");
+
+ When the application calls the `echo` function in `client.js`, that
+ call in turn calls the `echo` function in `index.js`, where the
+ `PluginResult` object sends data as a response back to `client.js`.
+ Since the `args` argument passed into the functions was converted by
+ `JSON.stringfy()` and encoded as a `URIcomponent`, you must call the
+ following:
+
+ data = JSON.parse(decodeURIComponent(args.data));
+
+You can now send the data back, as in the following:
+
+ module.exports = {
+ echo: function (success, fail, args, env) {
+ var result = new PluginResult(args, env),
+ data = JSON.parse(decodeURIComponent(args.data)),
+ response = echo.getInstance().echo(data);
+ result.ok(response, false);
+ }
+ };
+
+## Plugin Architecture
+
+You can place the plugin's artifacts, including the `plugin.xml` file,
+the JavaScript and C++ source files, and the `.so` binary files within
+any directory structure, as long as you correctly specify the file
+locations in the `plugin.xml` file. Here is a typical structure:
+
+***project_directory*** (>plugin.xml)
+
+- **www** (>client.js)
+- **src**
+ - **blackberry10** (>index.js, **native** >*.cpp, *.hpp)
+ - **device** (>*binary file* *.so)
+ - **simulator** (>*binary file* *.so)
+
+The list shows the hierarchical relationship among the top-level
+folders. The parenthesis shows the contents of a given directory. All
+directory names appear in bold text. File names are preceded by the `>`
+sign.
+
+## The _plugin.xml_ file
+
+The `plugin.xml` file contains the extension's namespace and other
+metadata. Set up the `Echo` plugin as follows:
+
+ <plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
+ id="org.apache.cordova.blackberry.echo"
+ version="1.0.0">
+ <js-module src="www/client.js">
+ <merges target="navigator" />
+ </js-module>
+ <platform name="blackberry10">
+ <source-file src="src/blackberry10/index.js" />
+ <lib-file src="src/blackberry10/native/device/libecho.so" arch="device" />
+ <lib-file src="src/blackberry10/native/simulator/libecho.so" arch="simulator" />
+ <config-file target="www/config.xml" parent="/widget">
+ <feature name="org.apache.cordova.blackberry.echo" value="org.apache.cordova.blackberry.echo" />
+ </config-file>
+ </platform>
+ </plugin>
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c6219cfc/docs/en/3.3.0/guide/platforms/blackberry10/tools.md
----------------------------------------------------------------------
diff --git a/docs/en/3.3.0/guide/platforms/blackberry10/tools.md b/docs/en/3.3.0/guide/platforms/blackberry10/tools.md
new file mode 100644
index 0000000..5c364b5
--- /dev/null
+++ b/docs/en/3.3.0/guide/platforms/blackberry10/tools.md
@@ -0,0 +1,178 @@
+---
+license: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+---
+
+# BlackBerry 10 Command-line Tools
+
+The `cordova` command-line utility is a high-level tool that allows
+you to build applications across several platforms at once. An older
+version of the Cordova framework provides sets of command-line tools
+specific to each platform. To use them as an alternative to the CLI,
+you need to download this version of Cordova from
+[cordova.apache.org](http://cordova.apache.org). The download contains
+separate archives for each platform. Expand the platform you wish to
+target. The tools described here are typically available in the
+top-level `bin` directory, otherwise consult the __README__ file for
+more detailed directions.
+
+For information on the low-level command-line interface that enables
+plugins, see Using Plugman to Manage Plugins. See Application Plugins
+for an overview.
+
+If you need help with any command listed below, type the command along
+with the `-h` or `-help` arguments, which are supported by all
+commands and which provide descriptions for each of the available
+arguments.
+
+## Create an App
+
+The `create` command creates a new project:
+
+ bin/create <path-to-project> <project-package> <project-name>
+
+where
+
+- `<path-to-project>` specifies the directory you want the project created in
+
+- `<project-package>` specifies a reverse domain style identifier
+
+- `<project-name>` specifies the apps display name
+
+__NOTE__: the `create` command bootstraps dependency installation
+through the `npm install` command. Depending on the installation
+directory and system permissions, this may require administrator
+privileges. If there's problem on OSX/Linux, run `sudo npm install`
+before using the `create` command. On Windows, run `npm install` in a
+command-line utility opened with administrator privileges.
+
+## Create a Target
+
+The `target` command allows you to manage the emulator or BlackBerry
+devices that you use to test your app. You can add or remove a target,
+or set a target as the default target.
+
+### Add a Target
+
+ <path-to-project>/cordova/target add <name> <ip-address> [-t | --type <device | simulator>] [-p | --password <password>] [--pin <device-pin>]
+
+where
+
+- `<name>` specifies a unique name for the target.
+
+- `<ip-address>` specifies the ip address of the BlackBerry device or
+ simulator.
+
+- `-p | --password <password>` specifies the password for the device or
+ emulator. This is required only if the device or emulator is
+ password protected.
+
+- `--pin <device-pin>` specifies the PIN of the BlackBerry device,
+ which identifies that device as a valid host for the debug
+ token. This argument is required only when creating a debug
+ token.
+
+### Remove a Target
+
+ <path-to-project>/cordova/target remove <name>
+
+### Set a Target as the Default
+
+ <path-to-project>/cordova/target default <name>
+
+## Build the App
+
+The `build` command builds the project as a .bar file. You can build
+your app in either release mode (which produces a signed .bar file) or
+in debug mode (which produces an unsigned .bar file).
+
+### Build the App in Release Mode
+
+ <path-to-project>/cordova/build release [-k | --keystorepass <password>] [-b | --buildId <number>] [-p | --params <params-JSON-file>]
+
+where
+
+- `-k | --keystorepass <password>` specifies the password you defined when you configured your computer to sign applications.
+
+- `-b | --buildId <number>` specifies the build version number of your application. Typically, this number should be incremented from the previous signed version. This argument is optional.
+
+- `-p | --params <params-JSON-file>` specifies a JSON file containing additional parameters to pass to downstream tools. This argument is optional.
+
+### Build the Project in Debug Mode
+
+ <path-to-project>/cordova/build debug [<target>] [-k | --keystorepass <password>] [-p | --params <params-JSON-file>] [-ll | --loglevel <error|warn|verbose>]
+
+where
+
+- `<target>` specifies the name of a previously added target. If
+ `<target>` is not specified, the default target is used, if one has
+ been created. This argument is only required if you want the script
+ to deploy your app to a BlackBerry device or emulator and you have
+ not created a default target. Additionally, if `<target>` is a
+ device, then that device must be connected to your computer by USB
+ connection or be connected to the same Wi-Fi network as your
+ computer.
+
+- `-k | --keystorepass <password>` specifies the password you defined
+ when you configured your computer to sign applications. This
+ password is also used to create your debug token. This argument is
+ only required if you want the script to create and install the debug
+ token for you.
+
+- `-p | --params <params-JSON-file>` specifies a JSON file containing
+ additional parameters to pass to downstream tools.
+
+- `-ll | --loglevel <level>` specifies the log level. The log level may
+ be one of `error`, `warn`, or `verbose`.
+
+If you have previously defined a default target (and previously
+installed a debug token, if that target is a BlackBerry device), you
+can run the script with no arguments, and the script packages your
+app and deploys it to the default target. For example:
+
+ <path-to-project>/cordova/build debug
+
+## Run the App
+
+The `run` command deploys the app's most recent build on the specified
+BlackBerry device or an emulator. To deploy your app, you need to
+specify a target for the device or emulator:
+
+ <path-to-project>/cordova/run <target>
+
+...where `<target> `specifies the name of a previously added target.
+If `<target>` is a device, then it must be connected to your computer
+via USB cable, or else over the same Wi-Fi network as your computer.
+
+## Handle Plugins
+
+The `target` command allows you to add and remove plugins. To fetch a
+locally hosted plugin:
+
+ <path-to-project>/cordova/plugin fetch <path-to-plugin>
+
+View a list of installed plugins:
+
+ <path-to-project>/cordova/plugin ls
+
+Add a plugin:
+
+ <path-to-project>/cordova/plugin add <name>
+
+Remove a plugin:
+
+ <path-to-project>/cordova/plugin rm <name>
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c6219cfc/docs/en/3.3.0/guide/platforms/blackberry10/upgrading.md
----------------------------------------------------------------------
diff --git a/docs/en/3.3.0/guide/platforms/blackberry10/upgrading.md b/docs/en/3.3.0/guide/platforms/blackberry10/upgrading.md
new file mode 100644
index 0000000..1e96f67
--- /dev/null
+++ b/docs/en/3.3.0/guide/platforms/blackberry10/upgrading.md
@@ -0,0 +1,490 @@
+---
+license: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+---
+
+# Upgrading BlackBerry 10
+
+This guide shows how to modify BlackBerry projects to upgrade from older versions of Cordova.
+Most of these instructions apply to projects created with an older set
+of command-line tools that precede the `cordova` CLI utility. See The Command-Line Interface for information how to update the
+version of the CLI.
+
+## Upgrading to 3.2.0 from 3.1.0
+
+For projects that were created with the cordova CLI:
+
+1. Update the `cordova` CLI version. See The Command-Line Interface.
+
+2. Run `cordova platform update blackberry`
+
+For projects not created with the cordova CLI, run:
+
+ bin/update <project_path>
+
+## Upgrade to 3.1.0 from 3.0.0
+
+1. Create a new Apache Cordova 3.1.0 project using the cordova CLI, as
+ described in The Command-Line Interface.
+
+2. Add your platforms to the cordova project, for example: `cordova
+ platform add blackberry10`.
+
+3. Copy the contents of the original project's `www` directory to the `www` directory
+ at the root of the cordova project you just created.
+
+4. Copy or overwrite any native assets from your original project
+ (`Resources`, etc.)
+
+5. Copy the `config.xml` file into the `www` directory, and remove any
+ plugin definitions. You need to modify settings here rather than
+ within the platform directory.
+
+6. Use the cordova CLI tool to install any plugins you need. Note that
+ the CLI handles all core APIs as plugins, so they may need to be
+ added. Only plugins marked 3.0.0 and above are compatible with the CLI.
+
+7. Build and test.
+
+Please note that the CLI supports the BlackBerry10 platform exclusively. For PlayBook and BBOS, please see Cordova version 2.9.0 and below.
+
+## Upgrade to the CLI (3.0.0) from 2.9.0
+
+1. Create a new Apache Cordova 3.0.0 project using the cordova CLI, as
+ described in The Command-Line Interface.
+
+2. Add your platforms to the cordova project, for example: `cordova
+ platform add blackberry10`.
+
+3. Copy the contents of the original project's `www` directory to the `www` directory
+ at the root of the cordova project you just created.
+
+4. Copy or overwrite any native assets from your original project
+ (`Resources`, etc.)
+
+5. Copy the `config.xml` file into the `www` directory, and remove any
+ plugin definitions. You need to modify settings here rather than
+ within the platform directory.
+
+6. Use the cordova CLI tool to install any plugins you need. Note that
+ the CLI handles all core APIs as plugins, so they may need to be
+ added. Only 3.0.0 plugins are compatible with the CLI.
+
+7. Build and test.
+
+## Upgrading 2.8.0 Projects to 2.9.0
+
+For BlackBerry 10:
+
+1. Download and extract the Cordova 2.9.0 source to a permanent directory location on your hard drive, for example to `~/Cordova-2.9.0`.
+
+2. Quit any running SDK tools: Eclipse, Momentics and the like.
+
+3. Navigate to the directory where you put the downloaded source above, using a unix like terminal: Terminal.app, Bash, Cygwin, etc.
+
+4. Create a new project, as described in BlackBerry Command-line Tools. This becomes the home of your updated project.
+
+5. Copy your projects source from the old project's `/www` directory to the new project's `/www` directory.
+
+6. Update the Cordova script reference in your `www/index.html` file (and any other files that contain the script reference) to point to the new `cordova.js` file.
+
+For BlackBerryOS/Playbook:
+
+1. Download and extract the Cordova 2.9.0 source to a permanent directory location on your hard drive, for example to `~/Cordova-2.9.0`.
+
+2. Quit any running SDK tools: Eclipse, Momentics and the like.
+
+3. Navigate to the directory where you put the downloaded source above, using a unix like terminal: Terminal.app, Bash, Cygwin, etc.
+
+4. Create a new project, as described in iOS Command-line Tools. You need the assets from this new project.
+
+5. Copy the `www/cordova.js` file from the new project into your `www` directory, and delete your `www/cordova.js` file.
+
+6. Update the Cordova script reference in your `www/index.html` file (and any other files that contain the script reference) to point to the new `cordova.js` file.
+
+7. Copy the `native` directory from the new project into the existing project, overwriting the old `native` directory.
+
+8. Copy the `lib` directory from the new project into the existing project, overwriting the old `lib` directory.
+
+9. Copy the `cordova` directory from the new project into the existing project, overwriting the old `cordova` directory.
+
+## Upgrading 2.7.0 Projects to 2.8.0
+
+BlackBerry 10 uses the new CLI tooling and manages core APIs as plugins. The instructions migrate your project to a new project, rather than updating an existing project, due to the complexity of updating an old project.
+Also note that the cordova js script file is now called 'cordova.js' and no longer contains a version string.
+
+1. Download and extract the Cordova 2.8.0 source to a permanent directory location on your hard drive, for example to `~/Cordova-2.8.0`.
+
+2. Quit any running SDK tools: Eclipse, Momentics and the like.
+
+3. Navigate to the directory where you put the downloaded source above, using a unix like terminal: Terminal.app, Bash, Cygwin, etc.
+
+4. Create a new project, as described in BlackBerry Command-line Tools. This becomes the home of your updated project.
+
+5. Copy your projects source from the old project's `/www` directory to the new project's `/www` directory.
+
+6. Update the Cordova script reference in your `www/index.html` file (and any other files that contain the script reference) to point to the new `cordova.js` file.
+
+For BlackBerryOS/Playbook:
+
+1. Download and extract the Cordova 2.8.0 source to a permanent directory location on your hard drive, for example to `~/Cordova-2.8.0`.
+
+2. Quit any running SDK tools: Eclipse, Momentics and the like.
+
+3. Navigate to the directory where you put the downloaded source above, using a unix like terminal: Terminal.app, Bash, Cygwin, etc.
+
+4. Create a new project, as described in iOS Command-line Tools. You need the assets from this new project.
+
+5. Copy the `www/cordova.js` file from the new project into your `www` directory, and delete your `www/cordova.js` file.
+
+6. Update the Cordova script reference in your `www/index.html` file (and any other files that contain the script reference) to point to the new `cordova.js` file.
+
+7. Copy the `native` directory from the new project into the existing project, overwriting the old `native` directory.
+
+8. Copy the `lib` directory from the new project into the existing project, overwriting the old `lib` directory.
+
+9. Copy the `cordova` directory from the new project into the existing project, overwriting the old `cordova` directory.
+
+## Upgrading 2.6.0 Projects to 2.7.0
+
+1. Download and extract the Cordova 2.7.0 source to a permanent directory location on your hard drive, for example to `~/Cordova-2.7.0`.
+
+2. Quit any running SDK tools: Eclipse, Momentics and the like.
+
+3. Navigate to the directory where you put the downloaded source above, using a unix like terminal: Terminal.app, Bash, Cygwin, etc.
+
+4. Create a new project, as described in BlackBerry Command-line Tools. You need the assets from this new project.
+
+5. Copy the `www/cordova-2.7.0.js` file from the new project into your `www` directory, and delete your `www/cordova-2.6.0.js` file.
+
+6. Update the Cordova script reference in your `www/index.html` file (and any other files that contain the script reference) to point to the new `cordova-2.7.0.js` file.
+
+7. Copy the `native` directory from the new project into the existing project, overwriting the old `native` directory.
+
+8. Copy the `lib` directory from the new project into the existing project, overwriting the old `lib` directory.
+
+9. Copy the `cordova` directory from the new project into the existing project, overwriting the old `cordova` directory.
+
+## Upgrade to 2.6.0 from 2.5.0
+
+Updating the PhoneGap download directory:
+
+It is recommended that you download a fresh copy of the entire directory.
+
+However, here are the new parts needed for the piecemeal update:
+
+1. Update the cordova.blackberry.js file in the `Phonegap-2.6.0/lib/blackberry/javascript` directory.
+
+2. Update the `ext`, `ext-air`, and `ext-qnx` in the `Phonegap-2.6.0/lib/blackberry/framework` directory.
+
+3. Update the `build.xml` file in the `Phonegap-2.6.0/lib/blackberry` directory.
+
+4. Update the `Phonegap-2.6.0/lib/blackberry/bin` directory.
+
+5. Update the `VERSION` file in the `Phonegap-2.6.0/lib/blackberry` directory.
+
+Updating the example/ directory or migrating an existing project:
+
+1. Open your `www/` directory, which contains your app.
+
+2. Remove and update the .jar file in the `ext/` directory.
+
+3. Update the contents of the `ext-air/` directory.
+
+4. Update the contents of the `ext-qnx/` directory.
+
+4. Copy the new `cordova-2.6.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-2.6.0.js` file.
+
+## Upgrade to 2.5.0 from 2.4.0
+
+Updating the PhoneGap download directory:
+
+It is recommended that you download a fresh copy of the entire directory.
+
+However, here are the new parts needed for the piecemeal update:
+
+1. Update the cordova.blackberry.js file in the `Phonegap-2.5.0/lib/blackberry/javascript` directory.
+
+2. Update the `ext`, `ext-air`, and `ext-qnx` in the `Phonegap-2.5.0/lib/blackberry/framework` directory.
+
+3. Update the `build.xml` file in the `Phonegap-2.5.0/lib/blackberry` directory.
+
+4. Update the `Phonegap-2.5.0/lib/blackberry/bin` directory.
+
+5. Update the `VERSION` file in the `Phonegap-2.5.0/lib/blackberry` directory.
+
+Updating the example/ directory or migrating an existing project:
+
+1. Open your `www/` directory, which contains your app.
+
+2. Remove and update the .jar file in the `ext/` directory.
+
+3. Update the contents of the `ext-air/` directory.
+
+4. Update the contents of the `ext-qnx/` directory.
+
+4. Copy the new `cordova-2.5.0.js` into your project.
+
+5. Update your HTML to use the new `cordova-2.5.0.js` file.
+
+## Upgrade to 2.4.0 from 2.3.0
+
+Updating just the `www` directory:
+
+1. Open your `www/` directory, which contains your app.
+
+2. Remove and update the .jar file in the `ext/` directory.
+
+3. Update the contents of the `ext-air/` directory.
+
+4. Copy the new `cordova-2.4.0.js` into your project.
+ - If playbook, then update the .js file in the `playbook/` directory.
+ - If BlackBerry 10, then update the .js file in the `qnx/` directory.
+
+5. Update your HTML to use the new `cordova-2.4.0.js` file.
+
+Updating the sample directory (i.e., updating using the ant tools):
+
+1. Open the `sample/lib/` directory.
+
+2. Update the .jar file in the `cordova.2.3.0/ext/` directory.
+
+3. Update the contents of the `cordova.2.3.0/ext-air/` directory.
+
+4. Update the contents of the `cordova.2.3.0/ext-qnx/` directory.
+
+5. Update the .js file in the `cordova.2.3.0/javascript/` directory.
+
+6. Open the `sample/lib/` directory and rename the `cordova.2.3.0/` directory to `cordova.2.4.0/`.
+
+7. Type `ant blackberry build` or `ant playbook build` to update the `www/` directory with updated Cordova.
+
+8. Open the `www/` directory and update your HTML to use the new `cordova-2.4.0.js` file.
+
+## Upgrade to 2.3.0 from 2.2.0
+
+Updating just the `www` directory:
+
+1. Open your `www/` directory, which contains your app.
+
+2. Remove and update the .jar file in the `ext/` directory.
+
+3. Update the contents of the `ext-air/` directory.
+
+4. Copy the new `cordova-2.3.0.js` into your project.
+ - If playbook, then update the .js file in the `playbook/` directory.
+ - If BlackBerry 10, then update the .js file in the `qnx/` directory.
+
+5. Update your HTML to use the new `cordova-2.3.0.js` file.
+
+Updating the sample directory (i.e., updating using the ant tools):
+
+1. Open the `sample/lib/` directory.
+
+2. Update the .jar file in the `cordova.2.2.0/ext/` directory.
+
+3. Update the contents of the `cordova.2.2.0/ext-air/` directory.
+
+4. Update the contents of the `cordova.2.2.0/ext-qnx/` directory.
+
+5. Update the .js file in the `cordova.2.2.0/javascript/` directory.
+
+6. Open the `sample/lib/` directory and rename the `cordova.2.2.0/` directory to `cordova.2.3.0/`.
+
+7. Type `ant blackberry build` or `ant playbook build` to update the `www/` directory with updated Cordova.
+
+8. Open the `www/` directory and update your HTML to use the new `cordova-2.3.0.js` file.
+
+## Upgrade to 2.2.0 from 2.1.0
+
+Updating just the www directory:
+
+1. Open your `www/` directory, which contains your app.
+
+2. Remove and update the .jar file in the `ext/` directory.
+
+3. Update the contents of the `ext-air/` directory.
+
+4. Copy the new `cordova-2.2.0.js` into your project.
+ - If playbook, then update the .js file in the `playbook/` directory.
+ - If BlackBerry 10, then update the .js file in the `qnx/` directory.
+
+5. Update your HTML to use the new `cordova-2.2.0.js` file.
+
+Updating the sample directory (i.e., updating using the ant tools):
+
+1. Open the `sample/lib/` directory.
+
+2. Update the .jar file in the `cordova.2.1.0/ext/` directory.
+
+3. Update the contents of the `cordova.2.1.0/ext-air/` directory.
+
+4. Update the contents of the `cordova.2.1.0/ext-qnx/` directory.
+
+5. Update the .js file in the `cordova.2.1.0/javascript/` directory.
+
+6. Open the `sample/lib/` directory and rename the `cordova.2.1.0/` directory to `cordova.2.2.0/`.
+
+7. Type `ant blackberry build` or `ant playbook build` to update the `www/` directory with updated Cordova.
+
+8. Open the `www/` directory and update your HTML to use the new `cordova-2.2.0.js` file.
+
+## Upgrade to 2.1.0 from 2.0.0
+
+Updating just the `www` directory:
+
+1. Open your `www/` directory, which contains your app.
+
+2. Remove and update the .jar file in the `ext/` directory.
+
+3. Update the contents of the `ext-air/` directory.
+
+4. Copy the new `cordova-2.1.0.js` into your project.
+ - If playbook, then update the .js file in the `playbook/` directory.
+
+5. Update your HTML to use the new `cordova-2.1.0.js` file.
+
+Updating the sample directory (i.e., updating using the ant tools):
+
+1. Open the `sample/lib/` directory.
+
+2. Update the .jar file in the `cordova.2.0.0/ext/` directory.
+
+3. Update the contents of the `cordova.2.0.0/ext-air/` directory.
+
+4. Update the .js file in the `cordova.2.0.0/javascript/` directory.
+
+5. Open the `sample/lib/` directory and rename the `cordova.2.0.0/` directory to `cordova.2.1.0/`.
+
+6. Type `ant blackberry build` or `ant playbook build` to update the `www/` directory with updated Cordova.
+
+7. Open the `www/` directory and update your HTML to use the new `cordova-2.1.0.js` file.
+
+## Upgrade to 2.0.0 from 1.9.0
+
+Updating just the `www` directory:
+
+1. Open your `www/` directory, which contains your app.
+
+2. Remove and update the .jar file in the `ext/` directory.
+
+3. Update the contents of the `ext-air/` directory.
+
+4. Copy the new `cordova-2.0.0.js` into your project.
+ - If playbook, then update the .js file in the `playbook/` directory.
+
+5. Update your HTML to use the new `cordova-2.0.0.js` file.
+
+6. Update your `www/plugins.xml` file. Two plugins changed their
+ namespace/service label. Change the old entries for the Capture and
+ Contact plugins from:
+
+ <plugin name="Capture" value="org.apache.cordova.media.MediaCapture"/>
+ <plugin name="Contact" value="org.apache.cordova.pim.Contact"/>
+
+ To:
+
+ <plugin name="Capture" value="org.apache.cordova.capture.MediaCapture"/>
+ <plugin name="Contacts" value="org.apache.cordova.pim.Contact"/>
+
+Updating the sample directory (i.e., updating using the ant tools):
+
+1. Open the `sample/lib/` directory.
+
+2. Update the .jar file in the `cordova.1.9.0/ext/` directory.
+
+3. Update the contents of the `cordova.1.9.0/ext-air/` directory.
+
+4. Update the .js file in the `cordova.1.9.0/javascript/` directory.
+
+5. Open the `sample/lib/` directory and rename the `cordova.1.9.0/` directory to `cordova.2.0.0/`.
+
+6. Type `ant blackberry build` or `ant playbook build` to update the `www/` directory with updated Cordova.
+
+7. Open the `www/` directory and update your HTML to use the new `cordova-2.0.0.js` file.
+
+8. Open the `www/` directory and update the `plugins.xml` file. Two plugins
+ changed their namespace/service label. Change the old entries for the
+ Capture and Contact plugins from:
+
+ <plugin name="Capture" value="org.apache.cordova.media.MediaCapture"/>
+ <plugin name="Contact" value="org.apache.cordova.pim.Contact"/>
+
+ To:
+
+ <plugin name="Capture" value="org.apache.cordova.capture.MediaCapture"/>
+ <plugin name="Contacts" value="org.apache.cordova.pim.Contact"/>
+
+- To upgrade to 1.8.0, please go from 1.7.0
+
+## Upgrade to 1.8.0 from 1.7.0
+
+Updating just the `www` directory:
+
+1. Open your `www/` directory, which contains your app.
+
+2. Remove and update the .jar file in the `ext/` directory.
+
+3. Update the contents of the `ext-air/` directory.
+
+4. Copy the new `cordova-1.8.0.js` into your project.
+ - If playbook, then update the .js file in the `playbook/` directory.
+
+5. Update your HTML to use the new `cordova-1.8.0.js` file.
+
+6. Update your `www/plugins.xml` file. Two plugins changed their
+ namespace/service label. Change the old entries for the Capture and
+ Contact plugins from:
+
+ <plugin name="Capture" value="org.apache.cordova.media.MediaCapture"/>
+ <plugin name="Contact" value="org.apache.cordova.pim.Contact"/>
+
+ To:
+
+ <plugin name="Capture" value="org.apache.cordova.capture.MediaCapture"/>
+ <plugin name="Contacts" value="org.apache.cordova.pim.Contact"/>
+
+Updating the sample directory (i.e., updating using the ant tools):
+
+1. Open the `sample/lib/` directory.
+
+2. Update the .jar file in the `cordova.1.7.0/ext/` directory.
+
+3. Update the contents of the `cordova.1.7.0/ext-air/` directory.
+
+4. Update the .js file in the `cordova.1.7.0/javascript/` directory.
+
+5. Open the `sample/lib/` directory and rename the `cordova.1.7.0/` directory to `cordova.1.8.0/`.
+
+6. Type `ant blackberry build` or `ant playbook build` to update the `www/` directory with updated Cordova.
+
+7. Open the `www/` directory and update your HTML to use the new `cordova-1.8.0.js` file.
+
+8. Open the `www/` directory and update the `plugins.xml` file. Two plugins
+ changed their namespace/service label. Change the old entries for the
+ Capture and Contact plugins from:
+
+ <plugin name="Capture" value="org.apache.cordova.media.MediaCapture"/>
+ <plugin name="Contact" value="org.apache.cordova.pim.Contact"/>
+
+ To:
+
+ <plugin name="Capture" value="org.apache.cordova.capture.MediaCapture"/>
+ <plugin name="Contacts" value="org.apache.cordova.pim.Contact"/>
+
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c6219cfc/docs/en/3.3.0/guide/platforms/index.md
----------------------------------------------------------------------
diff --git a/docs/en/3.3.0/guide/platforms/index.md b/docs/en/3.3.0/guide/platforms/index.md
new file mode 100644
index 0000000..f477ff5
--- /dev/null
+++ b/docs/en/3.3.0/guide/platforms/index.md
@@ -0,0 +1,90 @@
+---
+license: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+---
+
+# Platform Guides
+
+Before developing for any of the platforms listed below, install
+cordova's command-line interface (CLI).
+(For details, see The Command-Line Interface.)
+
+To develop Cordova applications, you must install SDKs for each mobile
+platform you are targeting. This installation is necessary regardless
+of whether you do the majority of your work in the SDK or use the CLI
+for your build cycle.
+
+Each _Platform Guide_ listed below tells you what you need to know to
+set up each platform's development environment: where to obtain the
+SDK, how to set up device emulators, how to connect devices for direct
+testing, and how to manage signing key requirements. Additional
+guides provide information on each platform's unique set of
+configuration options, instructions to add plugins, how to upgrade
+each platform, and platform-specific command-line tools that serve as
+a lower-level alternative to the `cordova` command-line utility.
+
+## Amazon Fire OS
+
+* Amazon Fire OS Platform Guide
+* Amazon Fire OS Configuration
+* Amazon Fire OS WebViews
+* Amazon Fire OS Plugins
+
+## Android
+
+* Android Platform Guide
+* Android Configuration
+* Android WebViews
+* Android Plugins
+* Android Command-line Tools
+* Upgrading Android
+
+## BlackBerry 10
+
+* BlackBerry 10 Platform Guide
+* BlackBerry 10 Configuration
+* BlackBerry 10 Plugins
+* BlackBerry 10 Command-line Tools
+* Upgrading BlackBerry 10
+
+## iOS
+
+* iOS Platform Guide
+* iOS Configuration
+* iOS WebViews
+* iOS Plugins
+* iOS Command-line Tools
+* Upgrading iOS
+
+## Windows Phone
+
+* Windows Phone 8 Platform Guide
+* Windows Phone 7 Platform Guide
+* Windows Phone Configuration
+* Windows Phone Command-line Tools
+* Upgrading Windows Phone
+
+## Windows 8
+
+* Windows 8 Platform Guide
+* Windows 8 Command-line Tools
+* Upgrading Windows 8
+
+## Tizen
+
+* Tizen Platform Guide
+