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 2016/01/28 19:11:14 UTC
[37/51] [abbrv] [partial] docs commit: added cordova 6.0.0 docs
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/a201cf64/www/docs/en/6.0.0/guide/platforms/android/upgrade.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.0.0/guide/platforms/android/upgrade.md b/www/docs/en/6.0.0/guide/platforms/android/upgrade.md
new file mode 100644
index 0000000..33b2bee
--- /dev/null
+++ b/www/docs/en/6.0.0/guide/platforms/android/upgrade.md
@@ -0,0 +1,521 @@
+---
+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.
+
+title: Upgrading Android
+---
+
+# 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](../../cli/index.html) for information how to update the
+version of the CLI.
+
+## Upgrading to 4.0.0
+
+There are specific upgrade steps required to take advantage of the significant
+changes in 4.0.0. First, the common upgrade steps are needed as below.
+
+For non-CLI projects, run:
+
+ bin/update path/to/project
+
+For CLI projects:
+
+1. Update the `cordova` CLI version. See [The Command-Line Interface](../../cli/index.html).
+
+2. Run `cordova platform update android` in your existing projects.
+
+### Upgrading the Whitelist
+All whitelist functionality is now implemented via plugin. Without a plugin,
+your app is no longer protected by a whitelist after upgrading to 4.0.0. Cordova
+has two whitelist plugins, which provide different levels of protection.
+
+1. The `cordova-plugin-whitelist` plugin *(RECOMMENDED)*
+ * This plugin is highly recommended, as it is more secure and configurable
+ than the whitelist in previous versions
+ * See [cordova-plugin-whitelist](https://github.com/apache/cordova-plugin-whitelist)
+ for details on the configuration changes required
+ * Run: `cordova plugin add cordova-plugin-crosswalk-webview`
+
+2. The `cordova-plugin-legacy-whitelist` plugin
+ * This plugin provides the same whitelist behaviour as previous versions. See
+ [cordova-plugin-legacy-whitelist](https://github.com/apache/cordova-plugin-legacy-whitelist)
+ * No configuration changes are required, but it provides less protection than
+ the recommended plugin
+ * Run: `cordova plugin add cordova-plugin-legacy-whitelist`
+
+### Using the Crosswalk WebView
+By default, your app will continue to use the system WebView provided by the
+device. If you wish to use the Crosswalk WebView instead, simply add the
+Crosswalk plugin:
+
+ cordova plugin add cordova-plugin-crosswalk-webview
+
+Upon adding the plugin, your app will get the Crosswalk WebView installed and
+configured correctly.
+
+### Upgrading to the Splashscreen Plugin
+If your app makes use of a splash screen, that functionality has been moved to
+a plugin. The configuration options for splash screens are unchanged. The only
+upgrade step required is to add the plugin:
+
+ cordova plugin add cordova-plugin-splashscreen
+
+## Upgrading to 3.7.1 from 3.6.0
+
+For non-CLI projects, run:
+
+ bin/update path/to/project
+
+For CLI projects:
+
+1. Update the `cordova` CLI version. See [The Command-Line Interface](../../cli/index.html).
+
+2. Run `cordova platform update android` in your existing projects.
+
+
+## Upgrading to 3.3.0 from 3.2.0
+
+Follow the same instructions as for `3.2.0`.
+
+Starting with 3.3.0, the Cordova runtime is now compiled as an Android Library
+instead of a Jar. This should have no effect for command-line usage, but IDE
+users will need to import the newly added `MyProject-CordovaLib` project into
+their workspace.
+
+## 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](../../cli/index.html).
+
+2. Run `cordova platform update android`
+
+For projects not created with the cordova CLI, run:
+
+ bin/update <project_path>
+
+**WARNING:** On Android 4.4 - Android 4.4.3, creating a file input element with type="file" will not open the file picker dialog.
+This is a regression with Chromium on Android and the problem can be reproduced in the standalone Chrome browser on Android (see http://code.google.com/p/android/issues/detail?id=62220) The suggested workaround is to use the FileTransfer and File plugins for Android 4.4. You can listen for an onClick event from the input type="file" and then pop up a file picker UI. In order to tie the form data with the upload, you can use JavaScript to attach form values to the multi-part POST request that FileTransfer makes.
+
+
+## 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](../../cli/index.html).
+
+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](../../cli/index.html).
+
+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 the `www` directory to the new project.
+
+3. Copy any native Android assets from the `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](../../../plugin_ref/plugman.html) 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/a201cf64/www/docs/en/6.0.0/guide/platforms/android/webview.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.0.0/guide/platforms/android/webview.md b/www/docs/en/6.0.0/guide/platforms/android/webview.md
new file mode 100644
index 0000000..24bcf12
--- /dev/null
+++ b/www/docs/en/6.0.0/guide/platforms/android/webview.md
@@ -0,0 +1,134 @@
+---
+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.
+
+title: Android WebViews
+---
+
+# Android WebViews
+
+This guide 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](index.html) 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-x.x.x.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/a201cf64/www/docs/en/6.0.0/guide/platforms/blackberry/upgrade.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.0.0/guide/platforms/blackberry/upgrade.md b/www/docs/en/6.0.0/guide/platforms/blackberry/upgrade.md
new file mode 100644
index 0000000..c608bb8
--- /dev/null
+++ b/www/docs/en/6.0.0/guide/platforms/blackberry/upgrade.md
@@ -0,0 +1,434 @@
+---
+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.
+
+title: Upgrading BlackBerry
+---
+
+# Upgrading BlackBerry
+
+This guide shows how to modify BlackBerry projects to upgrade from
+older versions of Cordova. 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](../../cli/index.html) for information
+how to update the version of the CLI.
+
+## Upgrading 2.8.0 projects to 2.9.0 ##
+
+BlackBerry 10:
+
+1. Download and extract the Cordova 2.9.0 source to a permanent 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 Shell Tool Guide. This becomes the home of your updated project.
+
+5. Copy your project's source from the old project's `/www` directory to the new project's `/www` directory.
+
+6. Update the Cordova script reference in the `www/index.html` file (and any other files that contain the script reference) to point to the new `cordova.js` file.
+
+### BlackBerryOS/Playbook ###
+
+1. Download and extract the Cordova 2.9.0 source to a permanent 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 Shell Tool Guide. You need the assets from this new project.
+
+5. Copy the `www/cordova.js` file from the new project into the `www` directory, and delete the `www/cordova.js` file.
+
+6. Update the Cordova script reference in the `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:
+
+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 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 Shell Tool Guide. This becomes the home of your updated project.
+
+5. Copy your project's source from the old project's `/www` directory to the new project's `/www` directory.
+
+6. Update the Cordova script reference in the `www/index.html` file (and any other files that contain the script reference) to point to the new `cordova.js` file.
+
+BlackBerryOS/Playbook:
+
+1. Download and extract the Cordova 2.8.0 source to a permanent 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 Shell Tool Guide. You need the assets from this new project.
+
+5. Copy the `www/cordova.js` file from the new project into the `www` directory, and delete the `www/cordova.js` file.
+
+6. Update the Cordova script reference in the `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 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 Shell Tool Guide. You need the assets from this new project.
+
+5. Copy the `www/cordova-2.7.0.js` file from the new project into the `www` directory, and delete the `www/cordova-2.6.0.js` file.
+
+6. Update the Cordova script reference in the `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 the `www` directory, which contains the 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 the `www` directory, which contains the 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 the `www` directory, which contains the 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 (ie, 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 the `www` directory, which contains the 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 (ie, 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 the `www` directory, which contains the 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 (ie, 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 the `www` directory, which contains the 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 (ie, 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 the `www` directory, which contains the 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 the `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 (ie, 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 the `www` directory, which contains the 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 the `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 (ie, 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/a201cf64/www/docs/en/6.0.0/guide/platforms/blackberry10/config.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.0.0/guide/platforms/blackberry10/config.md b/www/docs/en/6.0.0/guide/platforms/blackberry10/config.md
new file mode 100644
index 0000000..9ffa87f
--- /dev/null
+++ b/www/docs/en/6.0.0/guide/platforms/blackberry10/config.md
@@ -0,0 +1,54 @@
+---
+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.
+
+title: BlackBerry 10 Configuration
+---
+
+# 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](config_ref_index.md.html#The%20config.xml%20File) 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 the app for
+ distribution. For the released app, all URIs should be known and
+ whitelisted using the `<access>` element, described in the Domain
+ [Whitelist Guide](../../appdev/whitelist/index.html).
+
+ <preference name="WebSecurity" value="disable"/>
+
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/a201cf64/www/docs/en/6.0.0/guide/platforms/blackberry10/index.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.0.0/guide/platforms/blackberry10/index.md b/www/docs/en/6.0.0/guide/platforms/blackberry10/index.md
new file mode 100644
index 0000000..7bdcdbc
--- /dev/null
+++ b/www/docs/en/6.0.0/guide/platforms/blackberry10/index.md
@@ -0,0 +1,270 @@
+---
+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.
+
+title: BlackBerry 10 Platform Guide
+---
+
+# BlackBerry 10 Platform Guide
+
+This guide shows how to set up your SDK environment to deploy
+Cordova apps for BlackBerry 10 devices. For previous versions of
+BlackBerry, you need to use a different SDK environment and set of
+command-line tools, described in the BlackBerry Platform Guide.
+For BlackBerry 10, you need to install the SDK regardless of whether
+you want to use the cross-platform Cordova CLI for development, or a
+narrower set of platform-centered command-line tools. For a
+comparison of the two development paths, see the [Overview](../../overview/index.html). For
+details on each, see [The Command-Line Interface](../../cli/index.html) and the BlackBerry 10
+Shell Tool Guide.
+
+## Requirements
+
+The development environment is available on Windows, Mac and Linux.
+
+Developers should use the `cordova` utility in conjunction with the
+BlackBerry WebWorks SDK or BlackBerry Native SDK. See The Command-Line
+Interface for information how to install `cordova`, add projects, then
+build and deploy for each platform.
+
+BlackBerry 10 Device Simulator:
+
+* Processor: Intel dual core 2.0 GHz/AMD Athlon 4200+ or higher
+* Disk space: 10 GB
+* RAM Memory: 4 GB
+* Virtualization: one of the following:
+ * __Intel Virtualization Technology__ (VT, VT-x, vmx) → [Intel VT-x supported processor list](http://ark.intel.com/products/virtualizationtechnology)
+ * __AMD Virtualization__ (AMD-V, SVM) (Since May 2006 all AMD CPUs include AMD-V except Sempron).
+
+More information about requirements: [BB10 Simulator requeriments](http://developer.blackberry.com/devzone/develop/simulator/simulator_systemrequirements.html).
+
+## Install the BlackBerry WebWorks SDK
+
+Download and install the BlackBerry WebWorks SDK from [developer.blackberry.com](https://developer.blackberry.com/html5/download/)
+
+The installer will add command-line tools to your path. Depending on your OS,
+you may need to open a new terminal window or re-log in.
+
+## Install the BlackBerry Native SDK
+
+If you need to compile native code, for example when developing a native plugin, you
+will need to install the BlackBerry Native SDK.
+
+In order to get the BlackBerry Native SDK, download and install the IDE for BlackBerry available from
+[developer.blackberry.com](http://developer.blackberry.com/native/download/), then using the IDE, install the BlackBerry Native SDK.
+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_1_0_132\win32\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/bbndk/host_10_1_0_132/darwin/x86/usr/bin/
+
+ or for the 10.2 Native SDK:
+
+ $ 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
+
+If you got any environmental problem, using the Native SDK from the command line, execute the appropriate file for your platform, located within the installation path:
+
+* On Windows → MS-DOS shell:
+
+ C:\> \bbndk\bbndk-env_xx_xx_xx_xxxx.bat
+
+* On Windows → git bash shell:
+
+ $ `\bbndk\bbndk-env_xx_xx_xx_xxxx.bat`
+
+* On Linux → Installed as root user:
+
+ $ `./opt/bbndk/bbndk-env_xx_xx_xx_xxxx.sh`
+
+* On Linux → Installed as non-root user:
+
+ $ `./home/username/bbndk/bbndk-env_xx_xx_xx_xxxx.sh`
+
+* On Mac:
+
+ $ `/Developer/SDKs/bbndk/bbndk-env_xx_xx_xx_xxxx.sh`
+
+
+## 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](../../cli/index.html). 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:
+
+
+
+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 the IP address displayed above.
+
+* On Windows:
+
+ $ platforms\blackberry10\cordova\target.bat add emu 169.254.0.1 -t simulator
+
+* On Mac/Linux:
+
+ $ platforms/blackberry10/cordova/target add emu 169.254.0.1 -t simulator
+
+Then, run the `emulate` command to view the app:
+
+ $ cordova emulate blackberry10
+
+## Deploy to Device
+
+To deploy to a device, make sure it is plugged into your computer.
+Enable development mode and obtain the IP address as desribed in the
+emulator section above. You will also need to obtain the PIN from the
+the __Settings__ application under __About → Hardware__:
+
+
+
+Run the target command-line utility to associate a name with an IP
+address, device password and PIN.
+
+* On Windows:
+
+ $ platforms\blackberry10\cordova\target.bat add mydevice 169.254.0.1 -t device --password 123456 --pin FFFF972E
+
+* On Mac/Linux:
+
+ $ platforms/blackberry10/cordova/target add mydevice 169.254.0.1 -t device --password 123456 --pin FFFF972E
+
+where:
+
+* `--password` refers to the password to unlock the device.
+
+* `--pin` refers to the device PIN obtained from the __Settings__ application.
+
+Then, run the `run` command to view the app:
+
+ $ cordova run blackberry10
+
+If a debug token is not yet set up for the device, an error message
+prompts you to use the platform run script with the password you
+provided when registering for signing keys.
+
+* On Windows:
+
+ $ platforms\blackberry10\cordova\run.bat --device --keystorepass mysecret
+
+* On Mac/Linux:
+
+ $ platforms/blackberry10/cordova/run --device --keystorepass mysecret
+
+## 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 the 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\build.bat --release --keystorepass mysecret
+
+* On Mac/Linux:
+
+ $ platforms/blackberry10/cordova/build --release --keystorepass mysecret
+
+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/a201cf64/www/docs/en/6.0.0/guide/platforms/blackberry10/plugin.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.0.0/guide/platforms/blackberry10/plugin.md b/www/docs/en/6.0.0/guide/platforms/blackberry10/plugin.md
new file mode 100644
index 0000000..c6d02d5
--- /dev/null
+++ b/www/docs/en/6.0.0/guide/platforms/blackberry10/plugin.md
@@ -0,0 +1,258 @@
+---
+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.
+
+title: BlackBerry 10 Plugins
+---
+
+# 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/a201cf64/www/docs/en/6.0.0/guide/platforms/blackberry10/tools.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.0.0/guide/platforms/blackberry10/tools.md b/www/docs/en/6.0.0/guide/platforms/blackberry10/tools.md
new file mode 100644
index 0000000..197d1dd
--- /dev/null
+++ b/www/docs/en/6.0.0/guide/platforms/blackberry10/tools.md
@@ -0,0 +1,181 @@
+---
+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.
+
+title: BlackBerry 10 Shell Tool Guide
+---
+
+# BlackBerry 10 Shell Tool Guide
+
+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](../../../plugin_ref/plugman.html). See Application Plugins
+for details on how to develop plugins.
+
+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 the 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
+the 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 the 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>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org