cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [3/6] docs commit: copied dev docsinto 6.x for english
Date Tue, 23 Aug 2016 06:04:05 GMT
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d24004ab/www/docs/en/6.x/reference/cordova-plugin-media/index.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.x/reference/cordova-plugin-media/index.md b/www/docs/en/6.x/reference/cordova-plugin-media/index.md
index f12da05..55b8aa5 100644
--- a/www/docs/en/6.x/reference/cordova-plugin-media/index.md
+++ b/www/docs/en/6.x/reference/cordova-plugin-media/index.md
@@ -1,9 +1,8 @@
 ---
 edit_link: 'https://github.com/apache/cordova-plugin-media/blob/master/README.md'
-title: Media
+title: cordova-plugin-media
 plugin_name: cordova-plugin-media
 plugin_version: master
-description: Record and play audio on the device.
 ---
 
 <!-- WARNING: This file is generated. See fetch_docs.js. -->
@@ -102,8 +101,6 @@ The following constants are reported as the only parameter to the
 
 ### Methods
 
-- `media.getCurrentAmplitude`: Returns the current position within an audio file.
-
 - `media.getCurrentPosition`: Returns the current position within an audio file.
 
 - `media.getDuration`: Returns the duration of an audio file.
@@ -112,12 +109,8 @@ The following constants are reported as the only parameter to the
 
 - `media.pause`: Pause playback of an audio file.
 
-- `media.pauseRecord`: Pause recording of an audio file.
-
 - `media.release`: Releases the underlying operating system's audio resources.
 
-- `media.resumeRecord`: Resume recording of an audio file.
-
 - `media.seekTo`: Moves the position within the audio file.
 
 - `media.setVolume`: Set the volume for audio playback.
@@ -136,47 +129,6 @@ The following constants are reported as the only parameter to the
 - __duration__: The duration of the media, in seconds.
 
 
-## media.getCurrentAmplitude
-
-Returns the current amplitude of the current recording.
-
-    media.getCurrentAmplitude(mediaSuccess, [mediaError]);
-
-### Supported Platforms
-
-- Android
-- iOS
-
-### Parameters
-
-- __mediaSuccess__: The callback that is passed the current amplitude (0.0 - 1.0).
-
-- __mediaError__: (Optional) The callback to execute if an error occurs.
-
-### Quick Example
-
-    // Audio player
-    //
-    var my_media = new Media(src, onSuccess, onError);
-
-    // Record audio
-    my_media.startRecord();
-
-    mediaTimer = setInterval(function () {
-        // get media amplitude
-        my_media.getCurrentAmplitude(
-            // success callback
-            function (amp) {
-                console.log(amp + "%");
-            },
-            // error callback
-            function (e) {
-                console.log("Error getting amp=" + e);
-            }
-        );
-    }, 1000);
-
-
 ## media.getCurrentPosition
 
 Returns the current position within an audio file.  Also updates the `Media` object's `position`
parameter.
@@ -271,44 +223,6 @@ Pauses playing an audio file.
     }
 
 
-## media.pauseRecord
-
-Pauses recording an audio file.
-
-    media.pauseRecord();
-
-
-### Supported Platforms
-
-- iOS
-
-
-### Quick Example
-
-    // Record audio
-    //
-    function recordAudio() {
-        var src = "myrecording.mp3";
-        var mediaRec = new Media(src,
-            // success callback
-            function() {
-                console.log("recordAudio():Audio Success");
-            },
-
-            // error callback
-            function(err) {
-                console.log("recordAudio():Audio Error: "+ err.code);
-            });
-
-        // Record audio
-        mediaRec.startRecord();
-
-        // Pause Recording after 5 seconds
-        setTimeout(function() {
-            my_media.pauseRecord();
-        }, 5000);
-    }
-
 ## media.play
 
 Starts or resumes playing an audio file.
@@ -381,50 +295,6 @@ function for any `Media` resource that is no longer needed.
     my_media.release();
 
 
-## media.resumeRecord
-
-Resume recording an audio file.
-
-    media.resumeRecord();
-
-
-### Supported Platforms
-
-- iOS
-
-
-### Quick Example
-
-    // Record audio
-    //
-    function recordAudio() {
-        var src = "myrecording.mp3";
-        var mediaRec = new Media(src,
-            // success callback
-            function() {
-                console.log("recordAudio():Audio Success");
-            },
-
-            // error callback
-            function(err) {
-                console.log("recordAudio():Audio Error: "+ err.code);
-            });
-
-        // Record audio
-        mediaRec.startRecord();
-
-        // Pause Recording after 5 seconds
-        setTimeout(function() {
-            my_media.pauseRecord();
-        }, 5000);
-
-        // Resume Recording after 10 seconds
-        setTimeout(function() {
-            my_media.resumeRecord();
-        }, 10000);
-    }
-
-
 ## media.seekTo
 
 Sets the current position within an audio file.

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d24004ab/www/docs/en/6.x/reference/cordova-plugin-network-information/index.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.x/reference/cordova-plugin-network-information/index.md b/www/docs/en/6.x/reference/cordova-plugin-network-information/index.md
index 42067f7..0e9a5f2 100644
--- a/www/docs/en/6.x/reference/cordova-plugin-network-information/index.md
+++ b/www/docs/en/6.x/reference/cordova-plugin-network-information/index.md
@@ -1,9 +1,8 @@
 ---
 edit_link: 'https://github.com/apache/cordova-plugin-network-information/blob/master/README.md'
-title: Network Information
+title: cordova-plugin-network-information
 plugin_name: cordova-plugin-network-information
 plugin_version: master
-description: Get information about wireless connectivity.
 ---
 
 <!-- WARNING: This file is generated. See fetch_docs.js. -->
@@ -37,12 +36,8 @@ This plugin provides an implementation of an old version of the
 It provides information about the device's cellular and
 wifi connection, and whether the device has an internet connection.
 
-> To get a few ideas how to use the plugin, check out the [sample](#sample) at the bottom
of this page or go straight to the [reference](#reference) content.
-
 Report issues with this plugin on the [Apache Cordova issue tracker][Apache Cordova issue
tracker].
 
-##<a name="reference"></a>Reference
-
 ## Installation
 
     cordova plugin add cordova-plugin-network-information
@@ -224,120 +219,4 @@ When running in the Emulator, the `connection.status` is always unknown,
so this
 
 The Emulator reports the connection type as `Cellular`, which does not change, so events
does _not_ fire.
 
-## Sample: Upload a File Depending on your Network State <a name="sample"></a>
-
-The code examples in this section show examples of changing app behavior using the online
and offline events and your network connection status.
-
-To start with, create a new FileEntry object (data.txt) to use for sample data. Call this
function from the `deviceready` handler.
-
->*Note* This code example requires the File plugin.
-
-```js
-
-var dataFileEntry;
-
-function createSomeData() {
-
-    window.requestFileSystem(window.TEMPORARY, 5 * 1024 * 1024, function (fs) {
-
-        console.log('file system open: ' + fs.name);
-        // Creates a new file or returns an existing file.
-        fs.root.getFile("data.txt", { create: true, exclusive: false }, function (fileEntry)
{
-
-          dataFileEntry = fileEntry;
-
-        }, onErrorCreateFile);
-
-    }, onErrorLoadFs);
-}
-```
-
-Next, add listeners for the online and offline events in the `deviceready` handler.
-
-```js
-document.addEventListener("offline", onOffline, false);
-document.addEventListener("online", onOnline, false);
-```
-
-The app's `onOnline` function handles the online event. In the event handler, check the current
network state. In this app, treat any connection type as good except Connection.NONE. If you
have a connection, you try to upload a file.
-
-```js
-function onOnline() {
-    // Handle the online event
-    var networkState = navigator.connection.type;
-
-    if (networkState !== Connection.NONE) {
-        if (dataFileEntry) {
-            tryToUploadFile();
-        }
-    }
-    display('Connection type: ' + networkState);
-}
-```
-
-When the online event fires in the preceding code, call the app's `tryToUploadFile` function.
-
-If the FileTransfer object's upload function fails, call the app's `offlineWrite` function
to save the current data somewhere.
-
->*Note* This example requires the FileTransfer plugin.
-
-```js
-function tryToUploadFile() {
-    // !! Assumes variable fileURL contains a valid URL to a text file on the device,
-    var fileURL = getDataFileEntry().toURL();
-
-    var success = function (r) {
-        console.log("Response = " + r.response);
-        display("Uploaded. Response: " + r.response);
-    }
-
-    var fail = function (error) {
-        console.log("An error has occurred: Code = " + error.code);
-        offlineWrite("Failed to upload: some offline data");
-    }
-
-    var options = new FileUploadOptions();
-    options.fileKey = "file";
-    options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
-    options.mimeType = "text/plain";
-
-    var ft = new FileTransfer();
-    // Make sure you add the domain of your server URL to the
-    // Content-Security-Policy <meta> element in index.html.
-    ft.upload(fileURL, encodeURI(SERVER), success, fail, options);
-};
-```
-
-Here is the code for the `offlineWrite` function.
-
->*Note* This code examples requires the File plugin.
-
-```js
-function offlineWrite(offlineData) {
-    // Create a FileWriter object for our FileEntry.
-    dataFileEntry.createWriter(function (fileWriter) {
-
-        fileWriter.onwriteend = function () {
-            console.log("Successful file write...");
-            display(offlineData);
-        };
-
-        fileWriter.onerror = function (e) {
-            console.log("Failed file write: " + e.toString());
-        };
-
-        fileWriter.write(offlineData);
-    });
-}
-```
-
-If the offline event occurs, just do something like notify the user (for this example, just
log it).
-
-```js
-function onOffline() {
-    // Handle the offline event
-    console.log("lost connection");
-}
-```
-
 [Apache Cordova issue tracker]: https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Network%20Information%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d24004ab/www/docs/en/6.x/reference/cordova-plugin-splashscreen/index.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.x/reference/cordova-plugin-splashscreen/index.md b/www/docs/en/6.x/reference/cordova-plugin-splashscreen/index.md
index 890551e..acda36c 100644
--- a/www/docs/en/6.x/reference/cordova-plugin-splashscreen/index.md
+++ b/www/docs/en/6.x/reference/cordova-plugin-splashscreen/index.md
@@ -1,9 +1,8 @@
 ---
 edit_link: 'https://github.com/apache/cordova-plugin-splashscreen/blob/master/README.md'
-title: Splashscreen
+title: cordova-plugin-splashscreen
 plugin_name: cordova-plugin-splashscreen
 plugin_version: master
-description: Control the splash screen for your app.
 ---
 
 <!-- WARNING: This file is generated. See fetch_docs.js. -->
@@ -50,33 +49,14 @@ Report issues with this plugin on the [Apache Cordova issue tracker][Apache
Cord
 - BlackBerry 10
 - iOS
 - Windows Phone 7 and 8
-- Windows (`cordova-windows` version >= 4.4.0 is required)
+- Windows 8
+- Windows
 - Browser
 
-__Note__: Extended splashscreen does not require the plugin on Windows (as opposed to Android
and iOS) in case you don't use the plugin API, i.e. programmatic hide/show.
-
 ## Example Configuration
 In the top-level `config.xml` file (not the one in `platforms`), add configuration elements
like those specified here.
 
-Please notice that the value of the "src" attribute is relative to the project root directory
and not to the www directory (see `Directory structure` below). You can name the source image
whatever you like. The internal name in the app is determined by Cordova.
-
-Directory structure:
-
-```
-projectRoot
-    hooks
-    platforms
-    plugins
-    www
-        css
-        img
-        js
-    res
-        screen
-            android
-            ios
-            windows
-```
+Please notice that the value of the "src" attribute is relative to the project directory
and not to the www directory. You can name the source image whatever you like. The internal
name in the app is determined by Cordova.
 
 ```xml
 <platform name="android">
@@ -125,75 +105,30 @@ projectRoot
 
 #### config.xml
 
-- `AutoHideSplashScreen` (boolean, default to `true`). Indicates whether to hide splash screen
automatically or not. Splash screen hidden after amount of time specified in the `SplashScreenDelay`
preference.
+-  __AutoHideSplashScreen__ (boolean, default to `true`). Indicates wherether hide splash
screen automatically or not. Splash screen hidden after amount of time specified in the `SplashScreenDelay`
preference.
 
 ```xml
     <preference name="AutoHideSplashScreen" value="true" />
 ```
 
-- `SplashScreenDelay` (number, default to 3000). Amount of time in milliseconds to wait before
automatically hide splash screen.
+-  __SplashScreenDelay__ (number, default to 3000). Amount of time in milliseconds to wait
before automatically hide splash screen.
 
 ```xml
     <preference name="SplashScreenDelay" value="3000" />
 ```
 
-Note also that this value used to be seconds, and not milliseconds, so values less than 30
will still be treated as seconds. ( Consider this a deprecated patch that will disapear in
some future version. )
-
-To disable the splashscreen add the following preference to `config.xml`: 
-```xml
-<preference name="SplashScreenDelay" value="0"/>
-```
-
-**iOS Quirk**: to disable the splashscreen on `ios` platform you should also add `<preference
name="FadeSplashScreenDuration" value="0"/>` to `config.xml`.
-
-- `FadeSplashScreen` (boolean, defaults to `true`): Set to `false` to
-  prevent the splash screen from fading in and out when its display
-  state changes.
-
-```xml
-    <preference name="FadeSplashScreen" value="false"/>
-```
-
-- `FadeSplashScreenDuration` (float, defaults to `500`): Specifies the
-  number of milliseconds for the splash screen fade effect to execute.
-
-```xml
-    <preference name="FadeSplashScreenDuration" value="750"/>
-```
-
-_Note_: `FadeSplashScreenDuration` is included into `SplashScreenDelay`, for example if you
have `<preference name="SplashScreenDelay" value="3000" />` and `<preference name="FadeSplashScreenDuration"
value="1000"/>` defined in `config.xml`:
-
-- 00:00 - splashscreen is shown
-- 00:02 - fading has started
-- 00:03 - splashscreen is hidden
-
-Turning the fading off via `<preference name="FadeSplashScreen" value="false"/>` technically
means fading duration to be `0` so that in this example the overall splash delay will still
be 3 seconds.
-
-_Note_: This only applies to the app startup - you need to take the fading timeout into account
when manually showing/hiding the splashscreen in the code:
-
-```javascript
-navigator.splashscreen.show();
-window.setTimeout(function () {
-    navigator.splashscreen.hide();
-}, splashDuration - fadeDuration);
-```
-
-- `ShowSplashScreenSpinner` (boolean, defaults to `true`): Set to `false`
-  to hide the splash-screen spinner.
-
-```xml
-    <preference name="ShowSplashScreenSpinner" value="false"/>
-```
-
 ### Android Quirks
 
-In your `config.xml`, you can add the following preferences:
+In your `config.xml`, you need to add the following preferences:
 
 ```xml
+<preference name="SplashScreenDelay" value="3000" />
 <preference name="SplashMaintainAspectRatio" value="true|false" />
 <preference name="SplashShowOnlyFirstTime" value="true|false" />
 ```
 
+The first parameter represents how long the splashscreen will appear in milliseconds. It
defaults to 3000 ms.
+
 "SplashMaintainAspectRatio" preference is optional. If set to true, splash screen drawable
is not stretched to fit screen, but instead simply "covers" the screen, like CSS "background-size:cover".
This is very useful when splash screen images cannot be distorted in any way, for example
when they contain scenery or text. This setting works best with images that have large margins
(safe areas) that can be safely cropped on screens with different aspect ratios.
 
 The plugin reloads splash drawable whenever orientation changes, so you can specify different
drawables for portrait and landscape orientations.
@@ -217,24 +152,49 @@ You can use the following preferences in your `config.xml`:
 
 __Note__: `SplashScreen` value should be absolute in order to work in a sub-page. The `SplashScreen`
value is used only for the browser platform. The value will be ignored for other platforms.
 
-### iOS Quirks
+### Android and iOS Quirks
 
 - In iOS, the splashscreen images are called launch images. These images are mandatory on
iOS.
 
-### Windows Quirks
+- `FadeSplashScreen` (boolean, defaults to `true`): Set to `false` to
+  prevent the splash screen from fading in and out when its display
+  state changes.
+
+```xml
+    <preference name="FadeSplashScreen" value="false"/>
+```
 
-- `SplashScreenSpinnerColor` (string, defaults to system accent color): hash, rgb notation
or CSS color name.
+- `FadeSplashScreenDuration` (float, defaults to `3000`): Specifies the
+  number of milliseconds for the splash screen fade effect to execute.
 
 ```xml
-<preference name="SplashScreenSpinnerColor" value="#242424"/>
-<preference name="SplashScreenSpinnerColor" value="DarkRed"/>
-<preference name="SplashScreenSpinnerColor" value="rgb(50,128,128)"/>
+    <preference name="FadeSplashScreenDuration" value="3000"/>
 ```
 
-- `SplashScreenBackgroundColor` (string, defaults to #464646): hex notation.
+Note also that this value used to be seconds, and not milliseconds, so values less than 30
will still be treated as seconds. ( Consider this a deprecated patch that will disapear in
some future version. )
+
+_Note_: `FadeSplashScreenDuration` is included into `SplashScreenDelay`, for example if you
have `<preference name="SplashScreenDelay" value="3000" />` and `<preference name="FadeSplashScreenDuration"
value="1000"/>` defined in `config.xml`:
+
+- 00:00 - splashscreen is shown
+- 00:02 - fading has started
+- 00:03 - splashscreen is hidden
+
+Turning the fading off via `<preference name="FadeSplashScreen" value="false"/>` technically
means fading duration to be `0` so that in this example the overall splash delay will still
be 3 seconds.
+
+_Note_: This only applies to the app startup - you need to take the fading timeout into account
when manually showing/hiding the splashscreen in the code:
+
+```javascript
+navigator.splashscreen.show();
+window.setTimeout(function () {
+    navigator.splashscreen.hide();
+}, splashDuration - fadeDuration);
+```
+
+- `ShowSplashScreenSpinner` (boolean, defaults to `true`): Set to `false`
+  to hide the splash-screen spinner.
 
 ```xml
-<preference name="SplashScreenBackgroundColor" value="0xFFFFFFFF"/>
+    <preference name="ShowSplashScreenSpinner" value="false"/>
 ```
 
 ## Methods

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d24004ab/www/docs/en/6.x/reference/cordova-plugin-statusbar/index.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.x/reference/cordova-plugin-statusbar/index.md b/www/docs/en/6.x/reference/cordova-plugin-statusbar/index.md
index 4071532..16ac56b 100644
--- a/www/docs/en/6.x/reference/cordova-plugin-statusbar/index.md
+++ b/www/docs/en/6.x/reference/cordova-plugin-statusbar/index.md
@@ -1,9 +1,8 @@
 ---
 edit_link: 'https://github.com/apache/cordova-plugin-statusbar/blob/master/README.md'
-title: Statusbar
+title: cordova-plugin-statusbar
 plugin_name: cordova-plugin-statusbar
 plugin_version: master
-description: Control the device status bar.
 ---
 
 <!-- WARNING: This file is generated. See fetch_docs.js. -->

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d24004ab/www/docs/en/6.x/reference/cordova-plugin-vibration/index.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.x/reference/cordova-plugin-vibration/index.md b/www/docs/en/6.x/reference/cordova-plugin-vibration/index.md
index d3a7f75..551f98c 100644
--- a/www/docs/en/6.x/reference/cordova-plugin-vibration/index.md
+++ b/www/docs/en/6.x/reference/cordova-plugin-vibration/index.md
@@ -1,9 +1,8 @@
 ---
 edit_link: 'https://github.com/apache/cordova-plugin-vibration/blob/master/README.md'
-title: Vibration
+title: cordova-plugin-vibration
 plugin_name: cordova-plugin-vibration
 plugin_version: master
-description: Vibrate the device.
 ---
 
 <!-- WARNING: This file is generated. See fetch_docs.js. -->

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d24004ab/www/docs/en/6.x/reference/cordova-plugin-whitelist/index.md
----------------------------------------------------------------------
diff --git a/www/docs/en/6.x/reference/cordova-plugin-whitelist/index.md b/www/docs/en/6.x/reference/cordova-plugin-whitelist/index.md
index 9fadb56..342bc57 100644
--- a/www/docs/en/6.x/reference/cordova-plugin-whitelist/index.md
+++ b/www/docs/en/6.x/reference/cordova-plugin-whitelist/index.md
@@ -1,9 +1,8 @@
 ---
 edit_link: 'https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md'
-title: Whitelist
+title: cordova-plugin-whitelist
 plugin_name: cordova-plugin-whitelist
 plugin_version: master
-description: Whitelist external content accessible by your app.
 ---
 
 <!-- WARNING: This file is generated. See fetch_docs.js. -->


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message