From 0de190a6923db338d493b6dbf8537fbd80fe176b Mon Sep 17 00:00:00 2001 From: riknoll Date: Mon, 8 Feb 2016 11:17:48 -0800 Subject: [PATCH 1/2] CB-10560: Removed amazon-fireos from dev docs --- www/docs/en/dev/config_ref/images.md | 11 - www/docs/en/dev/cordova/events/events.md | 41 ++-- .../en/dev/guide/appdev/whitelist/index.md | 7 +- www/docs/en/dev/guide/cli/index.md | 21 +- www/docs/en/dev/guide/hybrid/plugins/index.md | 1 - .../en/dev/guide/hybrid/webviews/index.md | 3 +- .../guide/platforms/amazonfireos/config.md | 85 -------- .../dev/guide/platforms/amazonfireos/index.md | 195 ------------------ .../guide/platforms/amazonfireos/plugin.md | 103 --------- .../guide/platforms/amazonfireos/webview.md | 130 ------------ www/docs/en/dev/guide/platforms/index.md | 7 - www/docs/en/dev/guide/support/index.md | 24 --- www/docs/en/dev/plugin_ref/plugman.md | 86 ++++---- www/docs/en/dev/plugin_ref/spec.md | 22 +- 14 files changed, 78 insertions(+), 658 deletions(-) delete mode 100644 www/docs/en/dev/guide/platforms/amazonfireos/config.md delete mode 100644 www/docs/en/dev/guide/platforms/amazonfireos/index.md delete mode 100644 www/docs/en/dev/guide/platforms/amazonfireos/plugin.md delete mode 100644 www/docs/en/dev/guide/platforms/amazonfireos/webview.md diff --git a/www/docs/en/dev/config_ref/images.md b/www/docs/en/dev/config_ref/images.md index 5d81eca2dcf..db016812ddf 100644 --- a/www/docs/en/dev/config_ref/images.md +++ b/www/docs/en/dev/config_ref/images.md @@ -52,15 +52,6 @@ which will be used for all platforms. For each platform you can also define a pixel-perfect icons set to fit different screen resolutions. -Amazon Fire OS - - - - - - - - Android @@ -202,5 +193,3 @@ As of now (Cordova 3.5.0 July 2014) the following platforms support splash scree Apache Cordova also offers special splash screen plugin which could be used to programmatically display and hide a splash screen during application launch https://github.com/apache/cordova-plugin-splashscreen - - diff --git a/www/docs/en/dev/cordova/events/events.md b/www/docs/en/dev/cordova/events/events.md index 2f650feec47..bb5c6ead566 100644 --- a/www/docs/en/dev/cordova/events/events.md +++ b/www/docs/en/dev/cordova/events/events.md @@ -22,7 +22,7 @@ title: Events # Events -There are various events provided by cordova to be used by the application. +There are various events provided by cordova to be used by the application. The application code could add listeners for these events. For example: **HTML File** @@ -54,7 +54,7 @@ The application code could add listeners for these events. For example: document.addEventListener("pause", onPause, false); document.addEventListener("resume", onResume, false); document.addEventListener("menubutton", onMenuKeyDown, false); - // Add similar listeners for other events + // Add similar listeners for other events } function onPause() { @@ -72,7 +72,7 @@ The application code could add listeners for these events. For example: // Add similar event handlers for other events **Note**: Applications typically should use `document.addEventListener` to -attach an event listener once the [deviceready](#link-deviceready) +attach an event listener once the [deviceready](#link-deviceready) event fires. The following table lists the cordova events and the supported platforms: @@ -84,7 +84,6 @@ The following table lists the cordova events and the supported platforms: Supported Platforms/
Events - amazon-fireos android blackberry10 ios @@ -96,7 +95,6 @@ The following table lists the cordova events and the supported platforms: deviceready - @@ -106,7 +104,6 @@ The following table lists the cordova events and the supported platforms: pause - @@ -116,7 +113,6 @@ The following table lists the cordova events and the supported platforms: resume - @@ -126,7 +122,6 @@ The following table lists the cordova events and the supported platforms: backbutton - @@ -136,7 +131,6 @@ The following table lists the cordova events and the supported platforms: menubutton - @@ -146,7 +140,6 @@ The following table lists the cordova events and the supported platforms: searchbutton - @@ -156,7 +149,6 @@ The following table lists the cordova events and the supported platforms: startcallbutton - @@ -166,7 +158,6 @@ The following table lists the cordova events and the supported platforms: endcallbutton - @@ -176,7 +167,6 @@ The following table lists the cordova events and the supported platforms: volumedownbutton - @@ -186,7 +176,6 @@ The following table lists the cordova events and the supported platforms: volumeupbutton - @@ -201,8 +190,8 @@ The following table lists the cordova events and the supported platforms: ## deviceready -The deviceready event fires when Cordova is fully loaded. This event is -essential to any application. It signals that Cordova's device APIs have +The deviceready event fires when Cordova is fully loaded. This event is +essential to any application. It signals that Cordova's device APIs have loaded and are ready to access. Cordova consists of two code bases: native and JavaScript. While the @@ -230,7 +219,7 @@ callback function called immediately. ## pause -The pause event fires when the native platform puts the application into the background, +The pause event fires when the native platform puts the application into the background, typically when the user switches to a different application. ### Quick Example @@ -288,7 +277,7 @@ iOS 5 that have multi-tasking enabled are pushed to the background. For apps to remain running when locked under iOS 5, disable the app's multi-tasking by setting [UIApplicationExitsOnSuspend][UIApplicationExitsOnSuspend] to `YES`. To run when locked on iOS 4, this setting does not matter. - + - __resume__ event When called from a `resume` event handler, interactive functions such @@ -309,7 +298,7 @@ the `resume` event. ## backbutton -The event fires when the user presses the back button. To override the default +The event fires when the user presses the back button. To override the default back-button behavior, register an event listener for the `backbutton` event. It is no longer necessary to call any other method to override the back-button behavior. @@ -324,7 +313,7 @@ back-button behavior. ## menubutton -The event fires when the user presses the menu button. Applying an event handler +The event fires when the user presses the menu button. Applying an event handler overrides the default menu button behavior. ### Quick Example @@ -337,8 +326,8 @@ overrides the default menu button behavior. ## searchbutton -The event fires when the user presses the search button on Android. If you need to -override the default search button behavior on Android you can register an event +The event fires when the user presses the search button on Android. If you need to +override the default search button behavior on Android you can register an event listener for the 'searchbutton' event. ### Quick Example @@ -351,7 +340,7 @@ listener for the 'searchbutton' event. ## startcallbutton -The event fires when the user presses the start call button. If you need to override +The event fires when the user presses the start call button. If you need to override the default start call behavior you can register an event listener for the `startcallbutton` event. ### Quick Example @@ -364,7 +353,7 @@ the default start call behavior you can register an event listener for the `star ## endcallbutton -This event fires when the user presses the end call button. The event overrides the +This event fires when the user presses the end call button. The event overrides the default end call behavior. ### Quick Example @@ -377,7 +366,7 @@ default end call behavior. ## volumedownbutton -The event fires when the user presses the volume down button. If you need to override +The event fires when the user presses the volume down button. If you need to override the default volume down behavior you can register an event listener for the `volumedownbutton` event. ### Quick Example @@ -390,7 +379,7 @@ the default volume down behavior you can register an event listener for the `vol ## volumeupbutton -The event fires when the user presses the volume up button. If you need to override +The event fires when the user presses the volume up button. If you need to override the default volume up behavior you can register an event listener for the `volumeupbutton` event. ### Quick Example diff --git a/www/docs/en/dev/guide/appdev/whitelist/index.md b/www/docs/en/dev/guide/appdev/whitelist/index.md index 16c65a076aa..f18525cc45f 100644 --- a/www/docs/en/dev/guide/appdev/whitelist/index.md +++ b/www/docs/en/dev/guide/appdev/whitelist/index.md @@ -82,11 +82,6 @@ as you are building your whitelist. Note that the whitelist applies only to the main Cordova webview, and does not apply to an InAppBrowser webview or opening links in the system web browser. -## Amazon Fire OS Whitelisting - -Platform-specific whitelisting rules are found in -`res/xml/config.xml`. - ## Android Whitelisting As above, see [cordova-plugin-whitelist][wlp] for details. For cordova-android @@ -96,7 +91,7 @@ prior to 4.0.0, see older versions of this documentation. The `` and `` tags are _new_ for cordova-ios 4.x and greater, see the [cordova-plugin-whitelist][wlp] documentation for details. cordova-ios version 4.0 and greater does **not** require the [cordova-plugin-whitelist][wlp] plugin to be installed. -For cordova-ios versions prior to 4.0.0, see the older versions of this documentation. +For cordova-ios versions prior to 4.0.0, see the older versions of this documentation. [Application Transport Security (ATS)](https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33) is new in iOS 9 (Xcode 7). This new feature acts as a whitelist for your app. The cordova cli will automatically convert `` and `` tags to the appropriate ATS directives. diff --git a/www/docs/en/dev/guide/cli/index.md b/www/docs/en/dev/guide/cli/index.md index 67208e8ef93..81d3b5cda57 100644 --- a/www/docs/en/dev/guide/cli/index.md +++ b/www/docs/en/dev/guide/cli/index.md @@ -42,7 +42,6 @@ the command-line interface from the same machine that supports the platform's SDK. The CLI supports the following combinations: * iOS (Mac) -* Amazon Fire OS (Mac, Linux, Windows) * Android (Mac, Linux, Windows) * BlackBerry 10 (Mac, Linux, Windows) * Windows Phone 8 (Windows) @@ -71,7 +70,7 @@ To install the `cordova` command-line tool, follow these steps: 1. Download and install [Node.js](http://nodejs.org/). Following installation, you should be able to invoke `node` and `npm` on your - command line. If desired, you may optionally use a tool such as `nvm` + command line. If desired, you may optionally use a tool such as `nvm` or `nave` to manage your Node.js installation. 1. Download and install a [git client](http://git-scm.com/), if you don't @@ -89,7 +88,7 @@ To install the `cordova` command-line tool, follow these steps: On OS X and Linux, prefixing the `npm` command with `sudo` may be necessary to install this development utility in - otherwise restricted directories such as + otherwise restricted directories such as `/usr/local/share`. If you are using the optional nvm/nave tool or have write access to the install directory, you may be able to omit the `sudo` prefix. There are @@ -108,7 +107,7 @@ To install the `cordova` command-line tool, follow these steps: globally installed `npm` modules. On Windows, `npm` can usually be found at `C:\Users\username\AppData\Roaming\npm`. On OS X and Linux it can usually be found at `/usr/local/share/npm`. - + The installation log may produce errors for any uninstalled platform SDKs. @@ -169,7 +168,6 @@ machine supports each SDK, and whether you have already installed each SDK. Run any of these from a Mac: $ cordova platform add ios - $ cordova platform add amazon-fireos $ cordova platform add android $ cordova platform add blackberry10 $ cordova platform add firefoxos @@ -179,7 +177,6 @@ different versions of the Windows Phone operating system: $ cordova platform add wp8 $ cordova platform add windows - $ cordova platform add amazon-fireos $ cordova platform add android $ cordova platform add blackberry10 $ cordova platform add firefoxos @@ -193,7 +190,6 @@ Run this to check your current set of platforms: Run either of the following synonymous commands to remove a platform: $ cordova platform remove blackberry10 - $ cordova platform rm amazon-fireos $ cordova platform rm android Running commands to add or remove platforms affects the contents of @@ -203,7 +199,7 @@ within each platform's subdirectory, appearing for example in `platforms/ios/www` or `platforms/android/assets/www`. Because the CLI constantly copies over files from the source _www_ folder, you should only edit these files and not the ones located under the _platforms_ subdirectories. -If you use version control software, you should add this source _www_ folder, +If you use version control software, you should add this source _www_ folder, along with the _merges_ folder, to your version control system. (More information about the _merges_ folder can be found in the Customize Each Platform section below.) @@ -220,7 +216,7 @@ to open the project you created. You will need to open the derivative set of ass from the `/platforms/` directory to develop with an SDK. This is because the SDK specific metadata files are stored within the appropriate `/platform/` subdirectory. (See the [Platform Guides](../platforms/index.html) for information on how to develop applications within each IDE.) -Use this approach if you simply want to initialize a project using the CLI and +Use this approach if you simply want to initialize a project using the CLI and then switch to an SDK for native work. Read on if you wish to use the cross-platform workflow approach (the CLI) for the entire @@ -269,7 +265,6 @@ Some mobile platforms emulate a particular device by default, such as the iPhone for iOS projects. For other platforms, you may need to first associate a device with an emulator. -__NOTE__: Emulator support is currently not available for Amazon Fire OS. (See the [Platform Guides](../platforms/index.html) for details.) For example, you may first run the `android` command to launch the @@ -291,7 +286,7 @@ app directly: Before running this command, you need to set up the device for testing, following procedures that vary for each platform. In -Android and Amazon Fire OS devices, you would have to enable a __USB debugging__ option on +Android devices, you would have to enable a __USB debugging__ option on the device, and perhaps add a USB driver depending on your development environmnent. See [Platform Guides](../platforms/index.html) for details on each platform's requirements. @@ -310,7 +305,7 @@ example when designing a hybrid app that mixes a Cordova WebView with native components. (See [Embedding WebViews](../hybrid/webviews/index.html) and [Plugin Development Guide](guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide) for details.) More commonly, you would add a plugin to enable one of Cordova's basic device-level features -detailed in the API Reference. +detailed in the API Reference. As of version 3.0, when you create a Cordova project it does not have any plugins present. This is the new default behavior. Any plugins you desire, @@ -476,7 +471,7 @@ assets to deploy on specific platforms. Each platform-specific subdirectory within `merges` mirrors the directory structure of the `www` source tree, allowing you to override or add files as needed. For example, here is how you might uses `merges` to boost the default -font size for Android and Amazon Fire OS devices: +font size for Android devices: * Edit the `www/index.html` file, adding a link to an additional CSS file, `overrides.css` in this case: diff --git a/www/docs/en/dev/guide/hybrid/plugins/index.md b/www/docs/en/dev/guide/hybrid/plugins/index.md index 1a21d532257..5a4522751e1 100644 --- a/www/docs/en/dev/guide/hybrid/plugins/index.md +++ b/www/docs/en/dev/guide/hybrid/plugins/index.md @@ -188,7 +188,6 @@ Once you define JavaScript for your plugin, you need to complement it with at least one native implementation. Details for each platform are listed below, and each builds on the simple Echo Plugin example above: -- [Amazon Fire OS Plugins](../../platforms/amazonfireos/plugin.html) - [Android Plugins](../../platforms/android/plugin.html) - [iOS Plugins](../../platforms/ios/plugin.html) - [BlackBerry 10 Plugins](../../platforms/blackberry10/plugin.html) diff --git a/www/docs/en/dev/guide/hybrid/webviews/index.md b/www/docs/en/dev/guide/hybrid/webviews/index.md index 973950df019..73ff509c249 100644 --- a/www/docs/en/dev/guide/hybrid/webviews/index.md +++ b/www/docs/en/dev/guide/hybrid/webviews/index.md @@ -33,7 +33,6 @@ To deploy a WebView, you need to be familiar with each native programming environment. The following provides instructions for supported platforms: -- [Amazon Fire OS WebViews](../../platforms/amazonfireos/webview.html) - [Android WebViews](../../platforms/android/webview.html) - [iOS WebViews](../../platforms/ios/webview.html) -- [Windows Phone 8.0 WebViews](../../platforms/wp8/webview.html) \ No newline at end of file +- [Windows Phone 8.0 WebViews](../../platforms/wp8/webview.html) diff --git a/www/docs/en/dev/guide/platforms/amazonfireos/config.md b/www/docs/en/dev/guide/platforms/amazonfireos/config.md deleted file mode 100644 index 320377b522d..00000000000 --- a/www/docs/en/dev/guide/platforms/amazonfireos/config.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -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: Amazon Fire OS Configuration ---- - -# Amazon Fire OS 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 Amazon Fire OS builds. See [The config.xml -File](config_ref_index.md.html#The%20config.xml%20File) for information on global configuration options. - -- `KeepRunning` (boolean, defaults to `true`): Determines whether the - application stays running in the background even after a [pause][PauseEvent] - event fires. Setting this to `false` does not kill the app after a - [pause][PauseEvent] event, but simply halts execution of code within the cordova - webview while the app is in the background. - - - -- `ErrorUrl` (URL, defaults to `null`): - If set, will display the referenced page upon an error in the application - instead of a dialog with the title "Application Error". - - - -- `LoadingDialog` (string, defaults to `null`): If set, displays a dialog with - the specified title and message, and a spinner, when loading the first - page of an application. The title and message are separated by a comma - in this value string, and that comma is removed before the dialog is - displayed. - - - -- `LoadingPageDialog` (string, defaults to `null`): The same as `LoadingDialog`, - but for loading every page after the first page in the application. - - - -- `LoadUrlTimeoutValue` (number, default is `20000`): When loading a - page, the amount of time to wait before throwing a timeout error. - This example specifies 10 seconds rather than 20: - - - -- `SplashScreen`: The name of the file minus its extension in the - `res/drawable` directory. Various assets must share this common - name in various subdirectories. - - - -- `SplashScreenDelay` (number, defaults to `5000`): The amount of - time the splash screen image displays. - - - -- `ShowTitle` (boolean, defaults to `false`): Show the title at the top - of the screen. - - - -- `LogLevel` (string, defaults to `ERROR`): Sets the minimum log level - through which log messages from your application will be filtered. Valid - values are `ERROR`, `WARN`, `INFO`, `DEBUG`, and `VERBOSE`. - - - -[PauseEvent]: ../../../cordova/events/events.html#link-pause diff --git a/www/docs/en/dev/guide/platforms/amazonfireos/index.md b/www/docs/en/dev/guide/platforms/amazonfireos/index.md deleted file mode 100644 index 055f249f06e..00000000000 --- a/www/docs/en/dev/guide/platforms/amazonfireos/index.md +++ /dev/null @@ -1,195 +0,0 @@ ---- -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: Amazon Fire OS Platform Guide ---- - -# Amazon Fire OS Platform Guide - -This guide shows how to set up your SDK development environment to -deploy Cordova apps for Amazon Fire OS devices, such as the Kindle Fire HDX. - -See the following for more detailed platform-specific information: - -* [Amazon Fire OS Configuration](config.html) -* [Amazon Fire OS WebViews](webview.html) -* [Amazon Fire OS Plugins](plugin.html) - -## Introduction - -By targeting the Amazon Fire OS platform, Cordova developers can create hybrid web apps that take advantage of the advanced web engine integrated into Kindle Fire devices. Amazon WebView API (AWV) is a Chromium-derived web runtime exclusive to Fire OS. A drop-in replacement for the WebView that comes with Android devices, AWV makes it possible to create better performing and more powerful hybrid web apps by providing support for a faster JavaScript engine (V8), remote debugging, and hardware optimizations for Kindle Fire devices including an accelerated 2D Canvas, and access to HTML5 features not supported by Android’s built in WebView such as: CSS Calc, Form Validation, getUserMedia, IndexedDB, Web Workers, WebSockets and WebGL. - -For more information about the Amazon WebView API, please see the Amazon Developer Portal's [HTML5 Hybrid Apps page](https://developer.amazon.com/public/solutions/platforms/android-fireos/docs/building-and-testing-your-hybrid-app). For questions about getting started and other support issues, please see the Amazon Developer Portal [Forums - HTML5 Hybrid Apps](http://forums.developer.amazon.com/forums/category.jspa?categoryID=41). - - -## Requirements and Support - -Developing Cordova apps for Amazon Fire OS requires installation of a variety of support files, including everything needed for Android development, as well as the Amazon WebView SDK. Check the list below for the required installs: - -* [The Command-Line Interface](../../cli/index.html) -* [Android SDK](http://developer.android.com/sdk/) -* [Apache Ant](http://ant.apache.org) -* [Amazon WebView SDK](https://developer.amazon.com/public/solutions/platforms/android-fireos/docs/building-and-testing-your-hybrid-app) - -## Installation - - -### Android SDK and Apache Ant - -Install the Android SDK from -[developer.android.com/sdk](http://developer.android.com/sdk/). You -may be presented with a choice of where to install the SDK, otherwise -move the downloaded `adt-bundle` tree to wherever you store -development tools. - -You'll need to run the Android SDK Manager (`android` from a command line) at least once before starting your Cordova project. Make sure to install the most recent version of the Android SDK Tools and SDK Platform **specifically API level 19**. Please see [Setting up your Development Environment](https://developer.amazon.com/public/resources/development-tools/ide-tools/tech-docs/01-setting-up-your-development-environment) on the Amazon Developer Portal for more information about setting up your development environment for Kindle Fire OS devices. - -Install the Apache Ant build tool by [downloading an Ant binary distribution](http://ant.apache.org/bindownload.cgi), unzipping into a directory you can refer to later. See the [Ant manual](http://ant.apache.org/manual/index.html) for more info. - -For Cordova command-line tools to work, you need to include the Android SDK's -`tools`, `platform-tools` and `apache-ant/bin` directories in your PATH environment. - -#### Mac/Linux Path - -On Mac, Linux or other Unix-like platforms, you can use a text editor to create or modify the -`~/.bash_profile` file, adding a line such as the following, depending -on where the SDK and Ant are installed: - - export PATH=${PATH}:/Development/adt-bundle/sdk/platform-tools:/Development/adt-bundle/sdk/tools:/Development/apache-ant/bin - -This exposes SDK tools in newly opened terminal windows. Otherwise run -this to make them available in the current session: - - $ source ~/.bash_profile - -#### Windows Path - -To modify the PATH environment on Windows: - -* Click on the __Start__ menu in the lower-left corner of the desktop, - right-click on __Computer__, then click __Properties__. - -* Click __Advanced System Settings__ in the column on the left. - -* In the resulting dialog box, press __Environment Variables__. - -* Select the __PATH__ variable and press __Edit__. - -* Append the following to the PATH based on where you installed the - SDK and Ant, for example: - - ;C:\Development\adt-bundle\sdk\platform-tools;C:\Development\adt-bundle\sdk\tools;C:\Development\apache-ant\bin - -* Save the value and close both dialog boxes. - -* You will also need to enable Java. Open a command prompt and -type `java`, if it does not run, append the location of the Java binaries to your PATH as well. Make sure %JAVA_HOME% is pointing to installed JDK directory. You might have to add JAVA_HOME environment variable seperately. - - ;%JAVA_HOME%\bin - - -### Amazon WebView SDK - -In order to create Cordova apps using the Amazon Fire OS platform target, you'll need to download, unpack and install the Amazon WebView SDK support files. This step will only need to be done for your first Amazon Fire OS project. - -* Download the Amazon WebView SDK from the [Amazon Developer Portal](https://developer.amazon.com/public/solutions/platforms/android-fireos/docs/building-and-testing-your-hybrid-app). - -* Copy `awv_interface.jar` from the downloaded SDK to Cordova's working directory. Create commonlibs(shown below) folder if it doesn't exist: - - **Mac/Linux:** - `~/.cordova/lib/commonlibs/` - - **Windows:** - `%USERPROFILE%\.cordova\lib\commonlibs` - - -## Create New Project for Amazon Fire OS - -Use the `cordova` utility to set up a new project, as described in The -Cordova [The Command-Line Interface](../../cli/index.html). For example, in a source-code directory: - - $ cordova create hello com.example.hello "HelloWorld" - $ cd hello - $ cordova platform add amazon-fireos - $ cordova build - -***Note:*** The first time the amazon-fireos platform is installed on your system, it will download the appropriate files to the Cordova working directory, but will then fail as it is missing the AWV SDK support files (see above). Follow the instructions above to install the `awv_interface.jar`, then remove and re-add the amazon-fireos platform to your project. This step will only need to be done for first Amazon Fire OS project. - - -## Deploy to Device - -To push an app directly to the device, make sure USB debugging is enabled on your device as described on the -[Android Developer Site](http://developer.android.com/tools/device.html), -and use a mini USB cable to plug it into your system. - -You can push the app to the device from the command line: - - $ cordova run amazon-fireos - -Alternately within Eclipse, right-click the project and choose __Run -As → Android Application__. - -__Note__: Currently, testing via an emulator is not supported for Amazon WebView based apps, additionally the Amazon WebView API is only available on Fire OS devices. For more information, please see the [Amazon WebView API SDK](https://developer.amazon.com/public/solutions/platforms/android-fireos/docs/building-and-testing-your-hybrid-app) documentation. - -### Run Flags - -The run command accepts optional parameters as specified in the Cordova Command Line Interface document, Fire OS also accepts an additional `--debug` flag which will enable Chromium's Developer Tools for remote web debugging. - -To use Developer Tools, enter: - - $ cordova run --debug amazon-fireos - -This will enable the tools on the running client. You can then connect to the client by port forwarding using the Android Debug Bridge (adb) referring to the app's package name. - -For example: - - adb forward tcp:9222 localabstract:com.example.helloworld.devtools - -You can then use the DevTools via a Chromium-based browser by navigating to: `http://localhost:9222`. - -### Optional Eclipse support - -Once created, you can use the Eclipse that comes along with the Android SDK to modify the project. Beware that modifications made through Eclipse will be overwritten if you continue to use Cordova command line tools. - -* Launch the __Eclipse__ application. - -* Select the __New Project__ menu item. - -* Choose __Android Project from Existing Code__ from the resulting dialog box, and press __Next__: - ![]({{ site.baseurl }}/static/img/guide/platforms/android/eclipse_new_project.png) - -* Navigate to `hello`, or whichever directory you created for the project, then to the `platforms/amazon-fireos` subdirectory. - -* Eclipse will show you hello and hello-CorddovaLib - 2 projects to be added. Add both. - -* Press __Finish__. - -Once the Eclipse window opens, a red __X__ may appear to indicate -unresolved problems. If so, follow these additional steps: - -* Right-click on the project directory. - -* In the resulting __Properties__ dialog, select __Android__ from the navigation pane. - -* For the project build target, select the highest Android API level (currently API Level 19) you have installed. - -* Click __OK__. - -* Select __Clean__ from the __Project__ menu. This should correct all the errors in the project. - diff --git a/www/docs/en/dev/guide/platforms/amazonfireos/plugin.md b/www/docs/en/dev/guide/platforms/amazonfireos/plugin.md deleted file mode 100644 index d4fdac458dd..00000000000 --- a/www/docs/en/dev/guide/platforms/amazonfireos/plugin.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -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: Amazon Fire OS Plugins ---- - -# Amazon Fire OS Plugins - -Follow the instructions provided in the [Android Plugins](../android/plugin.html) Guide for an overview of developing custom plugins. - -## Echo Amazon Fire OS 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: - - - - - - - - - -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."); - } - } - } - -If you want to reuse Android Plugin code for the Amazon Fire OS platform then modify the plugin.xml to point to the `android` specific source file. For example, - - - - - - - - - - -If you want to write a customized plugin for the Amazon Fire OS platform then create a folder named `amazon` under your plugin src/ folder and modify the plugin.xml to point to the `amazon` specific source file. For example, - - - - - - - - - - -## Using Amazon WebView in your plugin - -Cordova for Amazon Fire OS makes use of custom Amazon WebView that is built on the open-source Chromium project. It is GPU accelerated and optimized for fluid performance on Kindle Fire. - -To understand how to best use Amazon WebView in your project, check out the [Amazon Developer Portal](https://developer.amazon.com/sdk/fire/IntegratingAWV.html). diff --git a/www/docs/en/dev/guide/platforms/amazonfireos/webview.md b/www/docs/en/dev/guide/platforms/amazonfireos/webview.md deleted file mode 100644 index 4c018e544b2..00000000000 --- a/www/docs/en/dev/guide/platforms/amazonfireos/webview.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -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: Amazon Fire OS WebViews ---- - -# Amazon Fire OS WebViews - -Beginning with 3.3.0, you can use Cordova as a component in Amazon Fire OS applications. Amazon Fire OS refers to this component as `CordovaWebView`. `CordovaWebView` extends Amazon WebView that is built on the open source Chromium Project. By leveraging this feature, your web apps can utilize the latest HTML5 web standards running in a modern web runtime engine. - -If you're unfamiliar with Amazon Fire OS, you should first familiarize -yourself with the [Amazon Fire OS Platform Guide](index.html) and have the latest SDKs installed before you attempt the more unusual development option of embedding a WebView. - -## Prerequisites - -* Cordova 3.3.0 or greater - -* Android SDK updated to the latest SDK - -* Amazon WebView SDK - -## Guide to using CordovaWebView in a Amazon Fire OS Project - -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 - Amazon Fire OS package. - -2. Download and expand the [Amazon WebView SDK](https://developer.amazon.com/sdk/fire/IntegratingAWV.html#installawv) , then copy the awv_interface.jar into `/framework/libs` directory. Create a libs/ folder if it doesn't exist. - -3. Navigate to the package's `/framework` directory and run - `ant jar`. It creates the Cordova `.jar` file, formed as - `/framework/cordova-x.x.x.jar`. - -4. Copy the `.jar` file into the Android project's `/libs` directory. - -5. 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: - - - -6. Modify your activity so that it implements the `CordovaInterface`. You should implement the included methods. You may wish to copy them from `/framework/src/org/apache/cordova/CordovaActivity.java`, or implement them on your own. The code fragment below shows a basic application that uses 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()); - } - -If you use the camera, you should also implement this: - - @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); - } - } - -Finally, remember to add the thread pool, otherwise the plugins have no threads to run on: - - @Override - public ExecutorService getThreadPool() { - return threadPool; - } - -7. Copy your application's HTML and JavaScript files to your Amazon Fire OS project's `/assets/www` directory. - -8. Copy `config.xml` from `/framework/res/xml` to your project's `/res/xml` directory. diff --git a/www/docs/en/dev/guide/platforms/index.md b/www/docs/en/dev/guide/platforms/index.md index 9e19e3f2c68..ca7388b699d 100644 --- a/www/docs/en/dev/guide/platforms/index.md +++ b/www/docs/en/dev/guide/platforms/index.md @@ -40,13 +40,6 @@ 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](amazonfireos/index.html) -* [Amazon Fire OS Configuration](amazonfireos/config.html) -* [Amazon Fire OS WebViews](amazonfireos/webview.html) -* [Amazon Fire OS Plugins](amazonfireos/plugin.html) - ## Android * [Android Platform Guide](android/index.html) diff --git a/www/docs/en/dev/guide/support/index.md b/www/docs/en/dev/guide/support/index.md index 1b926eef1da..c914e4d999f 100644 --- a/www/docs/en/dev/guide/support/index.md +++ b/www/docs/en/dev/guide/support/index.md @@ -35,7 +35,6 @@ CLI's shorthand names. - amazon-fireos android blackberry10 Firefox OS @@ -50,7 +49,6 @@ CLI's shorthand names. cordova
CLI
- Mac, Windows, Linux Mac, Windows, Linux Mac, Windows Mac, Windows, Linux @@ -62,7 +60,6 @@ CLI's shorthand names. Embedded
WebView
- (see details) (see details) @@ -74,7 +71,6 @@ CLI's shorthand names. Plug-in
Interface
- (see details) (see details) (see details) @@ -91,7 +87,6 @@ CLI's shorthand names. Accelerometer - @@ -103,7 +98,6 @@ CLI's shorthand names. BatteryStatus - @@ -115,7 +109,6 @@ CLI's shorthand names. Camera - @@ -127,7 +120,6 @@ CLI's shorthand names. Capture - @@ -139,7 +131,6 @@ CLI's shorthand names. Compass - @@ -151,7 +142,6 @@ CLI's shorthand names. Connection - @@ -163,7 +153,6 @@ CLI's shorthand names. Contacts - @@ -175,7 +164,6 @@ CLI's shorthand names. Device - @@ -187,7 +175,6 @@ CLI's shorthand names. Events - @@ -199,7 +186,6 @@ CLI's shorthand names. File - @@ -211,7 +197,6 @@ CLI's shorthand names. File Transfer - * Do not support onprogress nor abort @@ -223,7 +208,6 @@ CLI's shorthand names. Geolocation - @@ -235,7 +219,6 @@ CLI's shorthand names. Globalization - @@ -247,7 +230,6 @@ CLI's shorthand names. InAppBrowser - @@ -259,7 +241,6 @@ CLI's shorthand names. Media - @@ -271,7 +252,6 @@ CLI's shorthand names. Notification - @@ -283,7 +263,6 @@ CLI's shorthand names. Splashscreen - @@ -295,7 +274,6 @@ CLI's shorthand names. Status Bar - @@ -307,7 +285,6 @@ CLI's shorthand names. Storage - @@ -319,7 +296,6 @@ CLI's shorthand names. Vibration - diff --git a/www/docs/en/dev/plugin_ref/plugman.md b/www/docs/en/dev/plugin_ref/plugman.md index eb1f8563509..a82b6047bce 100644 --- a/www/docs/en/dev/plugin_ref/plugman.md +++ b/www/docs/en/dev/plugin_ref/plugman.md @@ -68,21 +68,21 @@ with just `plugman`. Before you can use Plugman, you must create a Cordova project. You can do this with either the Command-line Interface or with the lower level shell scripts. Instructions for using the shell scripts to create your project are located in the various "Command-line Tools" guides -listed on the [Platform Guides](../guide/platforms/index.html) page. +listed on the [Platform Guides](../guide/platforms/index.html) page. ## Adding a Plugin Once you have installed Plugman and have created a Cordova project, you can start adding plugins to the platform with: - $ plugman --platform --project --plugin [--plugins_dir ] [--www ] [--variable = [--variable = ...]] + $ plugman --platform --project --plugin [--plugins_dir ] [--www ] [--variable = [--variable = ...]] Using minimum parameters, this command installs a plugin into a cordova project. You must specify a platform and cordova project location for that platform. You also must specify a plugin, with the different `--plugin` parameter forms being: * `name`: The directory name where the plugin contents exist. This must be an existing directory under the `--plugins_dir` path (see below for more info) or a plugin in the Cordova registry. * `url`: A URL starting with https:// or git://, pointing to a valid git repository that is clonable and contains a `plugin.xml` file. The contents of this repository would be copied into the `--plugins_dir`. * `path`: A path to a directory containing a valid plugin which includes a `plugin.xml` file. This path's contents will be copied into the `--plugins_dir`. - -Other parameters: + +Other parameters: * `--plugins_dir` defaults to `/cordova/plugins`, but can be any directory containing a subdirectory for each fetched plugin. * `--www` defaults to the project's `www` folder location, but can be any directory that is to be used as cordova project application web assets. @@ -92,7 +92,7 @@ Other parameters: To uninstall a plugin, you simply pass the `--uninstall` flag and provide the plugin ID. - $ plugman --uninstall --platform --project --plugin [--www ] [--plugins_dir ] + $ plugman --uninstall --platform --project --plugin [--www ] [--plugins_dir ] ## Help Commands @@ -107,7 +107,7 @@ a list of all available Plugman commands and their syntax: You can also append the `--debug|-d` flag to any Plugman command to run that command in verbose mode, which will display -any internal debugging messages as they are emitted and may help you track down problems like missing files. +any internal debugging messages as they are emitted and may help you track down problems like missing files. # Adding Android battery-status plugin to "myProject": plugman -d --platform android --project myProject --plugin cordova-plugin-battery-status @@ -115,7 +115,7 @@ any internal debugging messages as they are emitted and may help you track down Finally, you can use the `--version|-v` flag to see which version of Plugman you are using. plugman -v - + ## Registry Actions There are a number of plugman commands that can be used for interacting with the [Plugin registry](http://plugins.cordova.io). @@ -141,7 +141,7 @@ You can get information about any specific plugin stored in the plugin repositor plugman info -This will contact the plugin registry and fetch information such as the plugin's version number. +This will contact the plugin registry and fetch information such as the plugin's version number. ## Installing Core Plugins @@ -152,72 +152,72 @@ platform, and reference the platform's project directory. * cordova-plugin-battery-status - `plugman --platform --project --plugin cordova-plugin-battery-status` + `plugman --platform --project --plugin cordova-plugin-battery-status` * cordova-plugin-camera - `plugman --platform --project --plugin cordova-plugin-camera` - + `plugman --platform --project --plugin cordova-plugin-camera` + * cordova-plugin-console - `plugman --platform --project --plugin cordova-plugin-console` + `plugman --platform --project --plugin cordova-plugin-console` * cordova-plugin-contacts - - `plugman --platform --project --plugin cordova-plugin-contacts` - + + `plugman --platform --project --plugin cordova-plugin-contacts` + * cordova-plugin-device - - `plugman --platform --project --plugin cordova-plugin-device` + + `plugman --platform --project --plugin cordova-plugin-device` * cordova-plugin-device-motion (accelerometer) - - `plugman --platform --project --plugin cordova-plugin-device-motion` + + `plugman --platform --project --plugin cordova-plugin-device-motion` * cordova-plugin-device-orientation (compass) - - `plugman --platform --project --plugin cordova-plugin-device-orientation` + + `plugman --platform --project --plugin cordova-plugin-device-orientation` * cordova-plugin-dialogs - - `plugman --platform --project --plugin cordova-plugin-dialogs` + + `plugman --platform --project --plugin cordova-plugin-dialogs` * cordova-plugin-file - - `plugman --platform --project --plugin cordova-plugin-file` + + `plugman --platform --project --plugin cordova-plugin-file` * cordova-plugin-file-transfer - - `plugman --platform --project --plugin cordova-plugin-file-transfer` + + `plugman --platform --project --plugin cordova-plugin-file-transfer` * cordova-plugin-geolocation - - `plugman --platform --project --plugin cordova-plugin-geolocation` + + `plugman --platform --project --plugin cordova-plugin-geolocation` * cordova-plugin-globalization - - `plugman --platform --project --plugin cordova-plugin-globalization` + + `plugman --platform --project --plugin cordova-plugin-globalization` * cordova-plugin-inappbrowser - - `plugman --platform --project --plugin cordova-plugin-inappbrowser` + + `plugman --platform --project --plugin cordova-plugin-inappbrowser` * cordova-plugin-media - - `plugman --platform --project --plugin cordova-plugin-media` + + `plugman --platform --project --plugin cordova-plugin-media` * cordova-plugin-media-capture - - `plugman --platform --project --plugin cordova-plugin-media-capture` + + `plugman --platform --project --plugin cordova-plugin-media-capture` * cordova-plugin-network-information - - `plugman --platform --project --plugin cordova-plugin-network-information` + + `plugman --platform --project --plugin cordova-plugin-network-information` * cordova-plugin-splashscreen - - `plugman --platform --project --plugin cordova-plugin-splashscreen` + + `plugman --platform --project --plugin cordova-plugin-splashscreen` * cordova-plugin-vibration - - `plugman --platform --project --plugin cordova-plugin-vibration` + + `plugman --platform --project --plugin cordova-plugin-vibration` diff --git a/www/docs/en/dev/plugin_ref/spec.md b/www/docs/en/dev/plugin_ref/spec.md index ce862975880..c9e259110cb 100644 --- a/www/docs/en/dev/plugin_ref/spec.md +++ b/www/docs/en/dev/plugin_ref/spec.md @@ -83,7 +83,7 @@ example: -The `` tags also has default support for all of the main platforms Cordova exists on. +The `` tags also has default support for all of the main platforms Cordova exists on. Specifying the `cordova` engine tag means that all versions of Cordova on any platform must satisfy the engine version attribute. You may also list specific platforms and their versions in order to override the catch-all `cordova` engine: @@ -98,18 +98,17 @@ Here's a list of the default engines that the `` tag supports: * `cordova` * `cordova-plugman` -* `cordova-amazon-fireos` * `cordova-android` * `cordova-ios` * `cordova-blackberry10` * `cordova-wp8` * `cordova-windows8` * `android-sdk` // returns the highest Android api level installed -* `apple-xcode` // returns the xcode version +* `apple-xcode` // returns the xcode version * `apple-ios` // returns the highest iOS version installed * `apple-osx` // returns the OSX version * `blackberry-ndk` // returns the native blackberry SDK version - + Specifying custom Apache Cordova-based frameworks should be listed under the engine tag like so: @@ -118,18 +117,18 @@ Specifying custom Apache Cordova-based frameworks should be listed under the eng -A custom Apache Cordova-based framework requires that an engine element includes the following attributes: -`name`, `version`, `scriptSrc`, and `platform`. +A custom Apache Cordova-based framework requires that an engine element includes the following attributes: +`name`, `version`, `scriptSrc`, and `platform`. -* `name` (required): A human-readable name for your custom framework. +* `name` (required): A human-readable name for your custom framework. * `version` (required): The version that your framework must have in order to install. -* `scriptSrc` (required): The script file that tells plugman what version of the custom framework is. +* `scriptSrc` (required): The script file that tells plugman what version of the custom framework is. Ideally, this file should be within the top level directory of your plugin directory. * `platform` (required): Which platforms that your framework supports. You may use the wildcard `*` -to say supported for all platforms, specify multiple with a pipe character like `android|ios|blackberry10` +to say supported for all platforms, specify multiple with a pipe character like `android|ios|blackberry10` or just a single platform like `android`. plugman aborts with a non-zero code for any plugin whose target @@ -190,7 +189,7 @@ Web-only plugins contains mostly `` elements. Any `` elements that are nested within `` elements specify platform-specific web assets, as described below. Attributes include: -* `src` (required): +* `src` (required): Where the file or directory is located in the plugin package, relative to the `plugin.xml` document. If a file does not exist at the specified `src` location, plugman stops and reverses the @@ -345,7 +344,6 @@ associating the element's children with that platform. Platform names should be lowercase. Platform names, as arbitrarily chosen, are listed: -* amazon-fireos * android * blackberry10 * ios @@ -476,7 +474,7 @@ Examples of using these Windows specific attributes: -The above example will set pre-8.1 platforms (Windows 8, specifically) to require the `webcam` device capability and the `picturesLibrary` general capability, and apply the `webcam` device capability only to Windows 8.1 projects that build for Windows Phone. Windows desktop 8.1 systems are unmodified. +The above example will set pre-8.1 platforms (Windows 8, specifically) to require the `webcam` device capability and the `picturesLibrary` general capability, and apply the `webcam` device capability only to Windows 8.1 projects that build for Windows Phone. Windows desktop 8.1 systems are unmodified. ## _plugins-plist_ Element From 5f783205739e312d0a41bf9471e8f1305300ba29 Mon Sep 17 00:00:00 2001 From: riknoll Date: Mon, 8 Feb 2016 11:24:25 -0800 Subject: [PATCH 2/2] CB-10560: Removing all mention of firefoxos in dev --- www/docs/en/dev/config_ref/images.md | 6 -- www/docs/en/dev/cordova/storage/storage.md | 1 - .../en/dev/guide/appdev/whitelist/index.md | 20 ----- www/docs/en/dev/guide/cli/index.md | 3 - www/docs/en/dev/guide/next/index.md | 28 +++---- .../en/dev/guide/platforms/firefoxos/index.md | 79 ------------------- www/docs/en/dev/guide/platforms/index.md | 4 - www/docs/en/dev/guide/support/index.md | 24 ------ 8 files changed, 13 insertions(+), 152 deletions(-) delete mode 100644 www/docs/en/dev/guide/platforms/firefoxos/index.md diff --git a/www/docs/en/dev/config_ref/images.md b/www/docs/en/dev/config_ref/images.md index db016812ddf..bd5022cb583 100644 --- a/www/docs/en/dev/config_ref/images.md +++ b/www/docs/en/dev/config_ref/images.md @@ -71,12 +71,6 @@ BlackBerry10 See BlackBerry's documentation for targeting multiple sizes and locales. [http://developer.blackberry.com/html5/documentation/icon_element.html] -Firefox OS - - - - - iOS diff --git a/www/docs/en/dev/cordova/storage/storage.md b/www/docs/en/dev/cordova/storage/storage.md index 729032c6ceb..384f46a3fbb 100644 --- a/www/docs/en/dev/cordova/storage/storage.md +++ b/www/docs/en/dev/cordova/storage/storage.md @@ -55,7 +55,6 @@ than LocalStorage but fewer than WebSQL. The following platforms support IndexedDB: - BlackBerry 10 -- Firefox OS - Windows Phone 8 - Windows 8 diff --git a/www/docs/en/dev/guide/appdev/whitelist/index.md b/www/docs/en/dev/guide/appdev/whitelist/index.md index f18525cc45f..752107cf3eb 100644 --- a/www/docs/en/dev/guide/appdev/whitelist/index.md +++ b/www/docs/en/dev/guide/appdev/whitelist/index.md @@ -135,26 +135,6 @@ ways: (For more information on support, see BlackBerry's documentation on the [access element][8].) -## Firefox OS - -In Firefox OS there is no concept of whitelisting a specific domain. Instead -there is a special permission called -[SystemXHR](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#Permissions). -There is a need to add this permission to `config.xml`: - - - - - -The `XMLHttpRequest` object needs to be instantiated with two parameters -`mozAnon` and `mozSystem`: - - var request = new XMLHttpRequest({ - mozAnon: true, - mozSystem: true}); - -This solution is transparent so there is no difference for other platforms. - ## Windows Phone Whitelisting The whitelisting rules for Windows Phone 8 are found in the diff --git a/www/docs/en/dev/guide/cli/index.md b/www/docs/en/dev/guide/cli/index.md index 81d3b5cda57..c2f70316589 100644 --- a/www/docs/en/dev/guide/cli/index.md +++ b/www/docs/en/dev/guide/cli/index.md @@ -46,7 +46,6 @@ platform's SDK. The CLI supports the following combinations: * BlackBerry 10 (Mac, Linux, Windows) * Windows Phone 8 (Windows) * Windows (Windows) -* Firefox OS (Mac, Linux, Windows) On the Mac, the command-line is available via the _Terminal_ application. On the PC, it's available as _Command Prompt_ under @@ -170,7 +169,6 @@ SDK. Run any of these from a Mac: $ cordova platform add ios $ cordova platform add android $ cordova platform add blackberry10 - $ cordova platform add firefoxos Run any of these from a Windows machine, where _wp_ refers to different versions of the Windows Phone operating system: @@ -179,7 +177,6 @@ different versions of the Windows Phone operating system: $ cordova platform add windows $ cordova platform add android $ cordova platform add blackberry10 - $ cordova platform add firefoxos Run this to check your current set of platforms: diff --git a/www/docs/en/dev/guide/next/index.md b/www/docs/en/dev/guide/next/index.md index 359127d7e63..8a987edf884 100644 --- a/www/docs/en/dev/guide/next/index.md +++ b/www/docs/en/dev/guide/next/index.md @@ -33,17 +33,17 @@ This guide contains the following topics: * User Interface * Special Considerations * Keeping Up -* Getting Help +* Getting Help # Best Practices Cordova app development ## 1) SPA Is Your Friend -First and foremost - your Cordova applications should adopt the SPA (Single Page Application) design. Loosely defined, a SPA is a client-side application that is run from one request of a web page. The user loads an initial set of resources (HTML, CSS, and JavaScript) and further updates (showing a new view, loading data) is done via AJAX. SPAs are commonly used for more complex client-side applications. GMail is a great example of this. After you load GMail, mail views, editing, and organization are all done by updating the DOM instead of actually leaving the current page to load a completely new one. +First and foremost - your Cordova applications should adopt the SPA (Single Page Application) design. Loosely defined, a SPA is a client-side application that is run from one request of a web page. The user loads an initial set of resources (HTML, CSS, and JavaScript) and further updates (showing a new view, loading data) is done via AJAX. SPAs are commonly used for more complex client-side applications. GMail is a great example of this. After you load GMail, mail views, editing, and organization are all done by updating the DOM instead of actually leaving the current page to load a completely new one. -Using a SPA can help you organize your application in a more efficient manner, but it also has specific benefits for Cordova applications. A Cordova application must wait for the [deviceready][DeviceReadyEvent] event to fire before any plugins may be used. If you do not use a SPA, and your user clicks to go from one page to another, you will have to wait for [deviceready][DeviceReadyEvent] to fire again before you make use of a plugin. This is easy to forget as your application gets larger. +Using a SPA can help you organize your application in a more efficient manner, but it also has specific benefits for Cordova applications. A Cordova application must wait for the [deviceready][DeviceReadyEvent] event to fire before any plugins may be used. If you do not use a SPA, and your user clicks to go from one page to another, you will have to wait for [deviceready][DeviceReadyEvent] to fire again before you make use of a plugin. This is easy to forget as your application gets larger. -Even if you choose not to use Cordova, creating a mobile application without using a single page architecture will have serious performance implications. This is because navigating between pages will require scripts, assets, etc., to be reloaded. Even if these assets are cached, there will still be performance issues. +Even if you choose not to use Cordova, creating a mobile application without using a single page architecture will have serious performance implications. This is because navigating between pages will require scripts, assets, etc., to be reloaded. Even if these assets are cached, there will still be performance issues. Examples of SPA libraries you can use in your Cordova applications are: @@ -80,9 +80,9 @@ One of the biggest mistakes a new Cordova developer can make is to assume that t See the previous tip about networks. Not only can you be on a slow network, it is entirely possible for your application to be completely offline. Your application should handle this in an intelligent manner. If your application does not, people will think your application is broken. Given how easy it is to handle (Cordova supports listening for both an offline and online event), there is absolutely no reason for your application to not respond well when run offline. Be sure to test (see the Testing section below) your application and be sure to test how your application handles when you start in one state and then switch to another. -Note that the online and offline events, as well as the Network Connection API is not perfect. You may need to rely on using an XHR request to see if the device is truly offline or online. At the end of the day, be sure add some form of support for network issues - in fact, the Apple store (and probably other stores) will reject apps that don’t properly handle offline/online states. For more discussion on this topic, see +Note that the online and offline events, as well as the Network Connection API is not perfect. You may need to rely on using an XHR request to see if the device is truly offline or online. At the end of the day, be sure add some form of support for network issues - in fact, the Apple store (and probably other stores) will reject apps that don’t properly handle offline/online states. For more discussion on this topic, see ["Is This Thing On?"](http://blogs.telerik.com/appbuilder/posts/13-04-23/is-this-thing-on-%28part-1%29) - + # Handling Upgrades ## Upgrading Cordova Projects @@ -114,17 +114,17 @@ Be sure to check the updated plugin's documentation, as you may need to adjust y Always test your apps to ensure that installing the new plugin has not broken something that you did not anticipate. -If your project has a lot of plugins that you need updated, it might save time to create a shell or batch script that removes and adds the plugins with one command. +If your project has a lot of plugins that you need updated, it might save time to create a shell or batch script that removes and adds the plugins with one command. # Testing Cordova apps -Testing your applications is super important. The Cordova team uses Jasmine but any web friendly unit testing solution will do. +Testing your applications is super important. The Cordova team uses Jasmine but any web friendly unit testing solution will do. ## Testing on a simulator vs. on a real device It’s not uncommon to use desktop browsers and device simulators/emulators when developing a Cordova application. However, it is incredibly important that you test your app on as many physical devices as you possibly can: -* Simulators are just that: simulators. For example, your app may work in the iOS simulator without a problem, but it may fail on a real device (especially in certain circumstances, such as a low memory state). Or, your app may actually fail on the simulator while it works just fine on a real device. +* Simulators are just that: simulators. For example, your app may work in the iOS simulator without a problem, but it may fail on a real device (especially in certain circumstances, such as a low memory state). Or, your app may actually fail on the simulator while it works just fine on a real device. * Emulators are just that: emulators. They do not represent how well your app will run on a physical device. For example, some emulators may render your app with a garbled display, while a real device has no problem. (If you do encounter this problem, disable the host GPU in the emulator.) * Simulators are generally faster than your physical device. Emulators, on the other hand, are generally slower. Do not judge the performance of your app by how it performs in a simulator or an emulator. Do judge the performance of your app by how it runs on a spectrum of real devices. * It's impossible to get a good feel for how your app responds to your touch by using a simulator or an emulator. Instead, running the app on a real device can point out problems with the sizes of user interface elements, responsiveness, etc. @@ -160,8 +160,6 @@ Weinre creates a local server that can host a remote debug client for your Cordo ## Other Options * BlackBerry 10 supports debugging as well: [Documentation]( https://developer.blackberry.com/html5/documentation/v2_0/debugging_using_web_inspector.html) -* You can debug using Firefox App Manager as well, see [this blog post](https://hacks.mozilla.org/2014/02/building-cordova-apps-for-firefox-os/) and this -[MDN article](https://developer.mozilla.org/en-US/Apps/Tools_and_frameworks/Cordova_support_for_Firefox_OS#Testing_and_debugging). * For more examples and explanation of the above debugging tips, see: [http://developer.telerik.com/featured/a-concise-guide-to-remote-debugging-on-ios-android-and-windows-phone/](http://developer.telerik.com/featured/a-concise-guide-to-remote-debugging-on-ios-android-and-windows-phone/) # User Interface @@ -169,13 +167,13 @@ Weinre creates a local server that can host a remote debug client for your Cordo Building a Cordova application that looks nice on mobile can be a challenge, especially for developers. Many people chose to use a UI framework to make this easier. Here is a short list of options you may want to consider. * [jQuery Mobile](http://jquerymobile.com) - jQuery Mobile automatically enhances your layout for mobile optimization. It also handles creating a SPA for you automatically. -* [ionic](http://ionicframework.com/) - This powerful UI framework actually has its own CLI to handle project creation. -* [Ratchet](http://goratchet.com/) - Brought to you by the people who created Bootstrap. +* [ionic](http://ionicframework.com/) - This powerful UI framework actually has its own CLI to handle project creation. +* [Ratchet](http://goratchet.com/) - Brought to you by the people who created Bootstrap. * [Kendo UI](http://www.telerik.com/kendo-ui) - Open source UI and application framework from Telerik. * [Topcoat](http://topcoat.io) * [ReactJS](http://facebook.github.io/react/) -When building your user interface, it is important to think about all platforms that you are targeting and the differences between the user’s expectations. For example, an Android application that has an iOS-style UI will probably not go over well with users. This sometimes is even enforced by the various application stores. Because of this, it is important that you respect the conventions of each platform and therefore are familiar with the various Human Interface Guidelines: +When building your user interface, it is important to think about all platforms that you are targeting and the differences between the user’s expectations. For example, an Android application that has an iOS-style UI will probably not go over well with users. This sometimes is even enforced by the various application stores. Because of this, it is important that you respect the conventions of each platform and therefore are familiar with the various Human Interface Guidelines: * [iOS](https://developer.apple.com/library/ios/documentation/userexperience/conceptual/MobileHIG/index.html) * [Android](https://developer.android.com/designWP8) @@ -214,7 +212,7 @@ The following links are the best places to get help for Cordova: By using the Cordova tag, you can view and browse all Cordova questions. Note that StackOverflow automatically converts the "Phonegap" tag to "Cordova", so this way you will be able to access historical questions as well * PhoneGap Google Group: [https://groups.google.com/forum/#!forum/phonegap](https://groups.google.com/forum/#!forum/phonegap) This Google Group was the old support forum when Cordova was still called PhoneGap. While there are still a lot of Cordova users that frequently visit this group, the Cordova community has expressed an interest in focusing less on this group and instead using StackOverflow for support -* Meetup: [http://phonegap.meetup.com](http://phonegap.meetup.com) - +* Meetup: [http://phonegap.meetup.com](http://phonegap.meetup.com) - Consider finding a local Cordova/PhoneGap meetup group diff --git a/www/docs/en/dev/guide/platforms/firefoxos/index.md b/www/docs/en/dev/guide/platforms/firefoxos/index.md deleted file mode 100644 index d7d7b1df917..00000000000 --- a/www/docs/en/dev/guide/platforms/firefoxos/index.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -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: Firefox OS Platform Guide ---- - -# Firefox OS Platform Guide - -This guide describes how to set up your development environment to -create Cordova apps for Firefox OS devices, then test and publish those apps. - -## Requirements and Support - -Firefox OS apps are basically just web apps, with the addition of a manifest.webapp file that defines metadata about the app and allows it to be installed on Firefox OS devices. Any platform that Cordova supports can be used.To find out more about building web apps, consult the [App Center](https://developer.mozilla.org/en-US/Apps) on [MDN](https://developer.mozilla.org/en-US/). - -## Installation and Environment Setup - -First install [Node.js](http://nodejs.org/), then install the Cordova package like so: - - $ npm install -g cordova - -Next, create a sample Cordova app then navigate into the newly created directory: - - $ cordova create test-app - $ cd test-app - -Add Firefox OS as a supported platform to the app with the following: - - $ cordova platform add firefoxos - -This creates a Firefox OS app in platforms/firefoxos/www directory, which currently looks the same except that it has a Firefox manifest file (manifest.webapp) inside the www directory. - -## Developing your app - -At this point you are ready to go — change the code inside test-app/www to whatever you want your app to be. You can add [supported plugins]() to the app using "cordova plugin add", for example: - - cordova plugin add cordova-plugin-device - cordova plugin add cordova-plugin-vibration - -When your app code is written, deploy your changes to the Firefox OS app you've added to your project with - - $ cordova prepare firefoxos - -To create a packaged app one can zip the platforms/firefoxos/www directory. You can also simply build it using - - $ cordova build firefoxos - -The Firefox OS packaged app will be built in platforms/firefoxos/build/package.zip - -## Testing and Debugging - -The app can be tested using the Firefox OS [Web IDE](https://developer.mozilla.org/en-US/docs/Tools/WebIDE). - -When you have connected the Web IDE to your test device/simulator, select the "Open Packaged App" option, then make sure you point to the test-app/platforms/firefoxos/www/ directory to include the App in the Manager interface. - -For here you can install the app on your test device/simulator (with the "Play" button). Using the "Pause" button you can then debug the app and edit its code live. - -Note: Before attempting to publish your app you should consider validating it using the [App validator](https://marketplace.firefox.com/developers/validator). - -## Publishing your app on the Firefox Marketplace - -You can submit your app to the Firefox Marketplace, or publish it yourself. Visit the [Firefox Marketplace Zone](https://developer.mozilla.org/en-US/Marketplace) on MDN to find out more about how to do this; [App publishing options](https://developer.mozilla.org/en-US/Marketplace/Publishing/Publish_options) is the best place to start. - diff --git a/www/docs/en/dev/guide/platforms/index.md b/www/docs/en/dev/guide/platforms/index.md index ca7388b699d..e88a6fe7d57 100644 --- a/www/docs/en/dev/guide/platforms/index.md +++ b/www/docs/en/dev/guide/platforms/index.md @@ -58,10 +58,6 @@ a lower-level alternative to the `cordova` command-line utility. * [BlackBerry 10 Plugins](blackberry10/plugin.html) * [Upgrading BlackBerry](blackberry/upgrade.html) 10 -## Firefox OS - -* [Firefox OS Platform Guide](firefoxos/index.html) - ## iOS * [iOS Platform Guide](ios/index.html) diff --git a/www/docs/en/dev/guide/support/index.md b/www/docs/en/dev/guide/support/index.md index c914e4d999f..24dc32b3707 100644 --- a/www/docs/en/dev/guide/support/index.md +++ b/www/docs/en/dev/guide/support/index.md @@ -37,7 +37,6 @@ CLI's shorthand names. android blackberry10 - Firefox OS ios Ubuntu wp8
(Windows Phone 8) @@ -51,7 +50,6 @@ CLI's shorthand names. cordova
CLI
Mac, Windows, Linux Mac, Windows - Mac, Windows, Linux Mac Ubuntu Windows @@ -62,7 +60,6 @@ CLI's shorthand names. Embedded
WebView
(see details) - (see details) @@ -73,7 +70,6 @@ CLI's shorthand names. Plug-in
Interface
(see details) (see details) - (see details) (see details) @@ -89,7 +85,6 @@ CLI's shorthand names. Accelerometer - @@ -100,7 +95,6 @@ CLI's shorthand names. BatteryStatus - @@ -111,7 +105,6 @@ CLI's shorthand names. Camera - @@ -122,7 +115,6 @@ CLI's shorthand names. Capture - @@ -133,7 +125,6 @@ CLI's shorthand names. Compass - (3GS+) @@ -144,7 +135,6 @@ CLI's shorthand names. Connection - @@ -155,7 +145,6 @@ CLI's shorthand names. Contacts - @@ -166,7 +155,6 @@ CLI's shorthand names. Device - @@ -177,7 +165,6 @@ CLI's shorthand names. Events - @@ -188,7 +175,6 @@ CLI's shorthand names. File - @@ -199,7 +185,6 @@ CLI's shorthand names. File Transfer * Do not support onprogress nor abort - * Do not support onprogress nor abort @@ -210,7 +195,6 @@ CLI's shorthand names. Geolocation - @@ -221,7 +205,6 @@ CLI's shorthand names. Globalization - @@ -232,7 +215,6 @@ CLI's shorthand names. InAppBrowser - @@ -243,7 +225,6 @@ CLI's shorthand names. Media - @@ -254,7 +235,6 @@ CLI's shorthand names. Notification - @@ -265,7 +245,6 @@ CLI's shorthand names. Splashscreen - @@ -276,7 +255,6 @@ CLI's shorthand names. Status Bar - @@ -287,7 +265,6 @@ CLI's shorthand names. Storage - localStorage & indexedDB @@ -298,7 +275,6 @@ CLI's shorthand names. Vibration -