You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/01/02 19:07:28 UTC
[1/6] git commit: [CB-5565] Incremented plugin version on dev branch.
Updated Branches:
refs/heads/master a4be9f8e3 -> 109525257
[CB-5565] Incremented plugin version on dev branch.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/495f94ae
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/495f94ae
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/495f94ae
Branch: refs/heads/master
Commit: 495f94ae2f3f03f536ecf7830ebcfeeb4c66c5f0
Parents: a4be9f8
Author: Steven Gill <st...@gmail.com>
Authored: Wed Dec 4 15:32:03 2013 -0800
Committer: Steven Gill <st...@gmail.com>
Committed: Wed Dec 4 15:32:03 2013 -0800
----------------------------------------------------------------------
plugin.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/495f94ae/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 17f714d..e548a4f 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -4,7 +4,7 @@
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.device"
- version="0.2.5">
+ version="0.2.6-dev">
<name>Device</name>
<description>Cordova Device Plugin</description>
<license>Apache 2.0</license>
[3/6] git commit: CB-5658 Delete stale snapshot of plugin docs
Posted by ag...@apache.org.
CB-5658 Delete stale snapshot of plugin docs
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/fdf42192
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/fdf42192
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/fdf42192
Branch: refs/heads/master
Commit: fdf421929a31375624a849972f5d50f77a094b23
Parents: 695272e
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Dec 17 20:49:39 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Dec 17 20:49:39 2013 -0500
----------------------------------------------------------------------
docs/device.cordova.md | 80 ------------------------------
docs/device.md | 104 --------------------------------------
docs/device.model.md | 106 ---------------------------------------
docs/device.name.md | 108 ----------------------------------------
docs/device.platform.md | 99 -------------------------------------
docs/device.uuid.md | 115 -------------------------------------------
docs/device.version.md | 86 --------------------------------
7 files changed, 698 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/fdf42192/docs/device.cordova.md
----------------------------------------------------------------------
diff --git a/docs/device.cordova.md b/docs/device.cordova.md
deleted file mode 100644
index b29e24f..0000000
--- a/docs/device.cordova.md
+++ /dev/null
@@ -1,80 +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.
----
-
-device.cordova
-===============
-
-Get the version of Cordova running on the device.
-
- var string = device.cordova;
-
-Description
------------
-
-`device.cordova` returns the version of Cordova running on the device.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
- var name = device.cordova;
-
-Full Example
-------------
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Device Properties Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- var element = document.getElementById('deviceProperties');
- element.innerHTML = 'Device Name: ' + device.name + '<br />' +
- 'Device Cordova: ' + device.cordova + '<br />' +
- 'Device Platform: ' + device.platform + '<br />' +
- 'Device UUID: ' + device.uuid + '<br />' +
- 'Device Version: ' + device.version + '<br />';
- }
-
- </script>
- </head>
- <body>
- <p id="deviceProperties">Loading device properties...</p>
- </body>
- </html>
-
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/fdf42192/docs/device.md
----------------------------------------------------------------------
diff --git a/docs/device.md b/docs/device.md
deleted file mode 100644
index 3748d36..0000000
--- a/docs/device.md
+++ /dev/null
@@ -1,104 +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.
----
-
-Device
-======
-
-> The `device` object describes the device's hardware and software.
-
-Properties
-----------
-
-- device.name
-- device.cordova
-- device.platform
-- device.uuid
-- device.version
-- device.model
-
-Variable Scope
---------------
-
-Since `device` is assigned to the `window` object, it is implicitly in the global scope.
-
- // These reference the same `device`
- var phoneName = window.device.name;
- var phoneName = device.name;
-
-Permissions
------------
-
-### Android
-
-#### app/res/xml/config.xml
-
- <plugin name="Device" value="org.apache.cordova.Device" />
-
-#### app/AndroidManifest.xml
-
- <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-
-### Bada
-
-#### manifest.xml
-
- <Privilege>
- <Name>SYSTEM_SERVICE</Name>
- </Privilege>
-
-### BlackBerry WebWorks
-
-#### www/plugins.xml
-
- <plugin name="Device" value="org.apache.cordova.device.Device" />
-
-#### www/config.xml
-
- <feature id="blackberry.app" required="true" version="1.0.0.0" />
- <rim:permissions>
- <rim:permit>read_device_identifying_information</rim:permit>
- </rim:permissions>
-
-### iOS
-
- No permissions are required.
-
-### webOS
-
- No permissions are required.
-
-### Windows Phone
-
-#### Properties/WPAppManifest.xml
-
- <Capabilities>
- <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
- <Capability Name="ID_CAP_IDENTITY_DEVICE" />
- <Capability Name="ID_CAP_IDENTITY_USER" />
- </Capabilities>
-
-Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
-
-### Tizen
-
-#### config.xml
-
- <feature name="http://tizen.org/api/systeminfo" required="true"/>
-
-Reference: [Application Manifest for Tizen Web Application](https://developer.tizen.org/help/topic/org.tizen.help.gs/Creating%20a%20Project.html?path=0_1_1_3#8814682_CreatingaProject-EditingconfigxmlFeatures)
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/fdf42192/docs/device.model.md
----------------------------------------------------------------------
diff --git a/docs/device.model.md b/docs/device.model.md
deleted file mode 100644
index e5238e4..0000000
--- a/docs/device.model.md
+++ /dev/null
@@ -1,106 +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.
----
-
-device.model
-===========
-
-Get the device's model name.
-
- var string = device.model;
-
-Description
------------
-
-The `device.model` returns the name of the device's model or
-product. The value is set by the device manufacturer and may be
-different across versions of the same product.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- webOS
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
- //
- var model = device.model;
-
-Full Example
-------------
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Device Properties Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- var element = document.getElementById('deviceProperties');
- element.innerHTML = 'Device Name: ' + device.name + '<br />' +
- 'Device Cordova: ' + device.cordova + '<br />' +
- 'Device Platform: ' + device.platform + '<br />' +
- 'Device UUID: ' + device.uuid + '<br />' +
- 'Device Model: ' + device.model + '<br />' +
- 'Device Version: ' + device.version + '<br />';
- }
-
- </script>
- </head>
- <body>
- <p id="deviceProperties">Loading device properties...</p>
- </body>
- </html>
-
-Android Quirks
---------------
-
-- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.
-
-Windows Phone 7 and 8 Quirks
--------------
-
-- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.
-
-Bada Quirks
------------
-- Returns the manufacturer model name, for example, `Samsung Wave S8500`
-
-Tizen Quirks
------------
-- Returns the device model assigned by the vendor, for example, `TIZEN`
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/fdf42192/docs/device.name.md
----------------------------------------------------------------------
diff --git a/docs/device.name.md b/docs/device.name.md
deleted file mode 100644
index a70648f..0000000
--- a/docs/device.name.md
+++ /dev/null
@@ -1,108 +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.
----
-
-device.name
-===========
-
-__WARNING:__ `device.name` is deprecated as of version 2.3.0. Use `device.model` instead.
-
-Get the device's model name.
-
- var string = device.name;
-
-Description
------------
-
-`device.name` returns the name of the device's model or product. This
-value is set by the device manufacturer and may be different across
-versions of the same product.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- webOS
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
- // Android: Nexus One returns "Passion" (Nexus One code name)
- // Motorola Droid returns "voles"
- // BlackBerry: Torch 9800 returns "9800"
- // iOS: All devices returns either "iPhone", "iPod Touch", "iPhone Simulator", "iPad", "iPad Simulator"
- //
- var name = device.name;
-
-Full Example
-------------
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Device Properties Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- var element = document.getElementById('deviceProperties');
- element.innerHTML = 'Device Name: ' + device.name + '<br />' +
- 'Device Cordova: ' + device.cordova + '<br />' +
- 'Device Platform: ' + device.platform + '<br />' +
- 'Device UUID: ' + device.uuid + '<br />' +
- 'Device Model: ' + device.model + '<br />' +
- 'Device Version: ' + device.version + '<br />';
- }
-
- </script>
- </head>
- <body>
- <p id="deviceProperties">Loading device properties...</p>
- </body>
- </html>
-
-Android Quirks
---------------
-
-- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.
-
-Windows Phone 7 and 8 Quirks
--------------
-
-- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.
-
-Bada Quirks
------------
-- Returns the manufacturer model name, for example, `Samsung Wave S8500`
-
-Tizen Quirks
------------
-- Returns the device model assigned by the vendor, for example, `TIZEN`
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/fdf42192/docs/device.platform.md
----------------------------------------------------------------------
diff --git a/docs/device.platform.md b/docs/device.platform.md
deleted file mode 100644
index 0d2cacb..0000000
--- a/docs/device.platform.md
+++ /dev/null
@@ -1,99 +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.
----
-
-device.platform
-===============
-
-Get the device's operating system name.
-
- var string = device.platform;
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- webOS
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
- // Depending on the device, a few examples are:
- // - "Android"
- // - "BlackBerry"
- // - "iOS"
- // - "webOS"
- // - "WinCE"
- // - "Tizen"
- var devicePlatform = device.platform;
-
-Full Example
-------------
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Device Properties Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- var element = document.getElementById('deviceProperties');
- element.innerHTML = 'Device Name: ' + device.name + '<br />' +
- 'Device Cordova: ' + device.cordova + '<br />' +
- 'Device Platform: ' + device.platform + '<br />' +
- 'Device UUID: ' + device.uuid + '<br />' +
- 'Device Version: ' + device.version + '<br />';
- }
-
- </script>
- </head>
- <body>
- <p id="deviceProperties">Loading device properties...</p>
- </body>
- </html>
-
-BlackBerry Quirks
------------------
-
-Devices may return the device platform version number instead of the
-platform name. For example, the Storm2 9550 returns a value such as
-`2.13.0.95`.
-
-Windows Phone 7 Quirks
------------------
-
-Windows Phone 7 devices report the platform as `WinCE`.
-
-Windows Phone 8 Quirks
------------------
-
-Windows Phone 8 devices report the platform as `Win32NT`.
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/fdf42192/docs/device.uuid.md
----------------------------------------------------------------------
diff --git a/docs/device.uuid.md b/docs/device.uuid.md
deleted file mode 100644
index 76abf73..0000000
--- a/docs/device.uuid.md
+++ /dev/null
@@ -1,115 +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.
----
-
-device.uuid
-===========
-
-Get the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
-
- var string = device.uuid;
-
-Description
------------
-
-The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- webOS
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
- // Android: Returns a random 64-bit integer (as a string, again!)
- // The integer is generated on the device's first boot
- //
- // BlackBerry: Returns the PIN number of the device
- // This is a nine-digit unique integer (as a string, though!)
- //
- // iPhone: (Paraphrased from the UIDevice Class documentation)
- // Returns a string of hash values created from multiple hardware identifies.
- // It is guaranteed to be unique for every device and cannot be tied
- // to the user account.
- // Windows Phone 7 : Returns a hash of device+current user,
- // if the user is not defined, a guid is generated and will persist until the app is uninstalled
- //
- // webOS: returns the device NDUID
- //
- // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
- // unique to every GSM and UMTS mobile phone.
- var deviceID = device.uuid;
-
-Full Example
-------------
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Device Properties Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- var element = document.getElementById('deviceProperties');
- element.innerHTML = 'Device Name: ' + device.name + '<br />' +
- 'Device Cordova: ' + device.cordova + '<br />' +
- 'Device Platform: ' + device.platform + '<br />' +
- 'Device UUID: ' + device.uuid + '<br />' +
- 'Device Version: ' + device.version + '<br />';
- }
-
- </script>
- </head>
- <body>
- <p id="deviceProperties">Loading device properties...</p>
- </body>
- </html>
-
-iOS Quirk
--------------
-
-The `uuid` on iOS is not unique to a device, but varies for each
-application, for each installation. It changes if you delete and
-re-install the app, and possibly also when you upgrade iOS, or even
-upgrade your app per version (apparent in iOS 5.1). The `uuid` is not
-a reliable value.
-
-Windows Phone 7 and 8 Quirks
--------------
-
-The `uuid` for Windows Phone 7 requires the permission
-`ID_CAP_IDENTITY_DEVICE`. Microsoft will likely deprecate this
-property soon. If the capability is not available, the application
-generates a persistent guid that is maintained for the duration of the
-application's installation on the device.
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/fdf42192/docs/device.version.md
----------------------------------------------------------------------
diff --git a/docs/device.version.md b/docs/device.version.md
deleted file mode 100644
index ecd4733..0000000
--- a/docs/device.version.md
+++ /dev/null
@@ -1,86 +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.
----
-
-device.version
-==============
-
-Get the operating system version.
-
- var string = device.version;
-
-Supported Platforms
--------------------
-
-- Android 2.1+
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- webOS
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
- // Android: Froyo OS would return "2.2"
- // Eclair OS would return "2.1", "2.0.1", or "2.0"
- // Version can also return update level "2.1-update1"
- //
- // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
- //
- // iPhone: iOS 3.2 returns "3.2"
- //
- // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
- // webOS: webOS 2.2.4 return 2.2.4
- // Tizen: returns "TIZEN_20120425_2"
- var deviceVersion = device.version;
-
-Full Example
-------------
-
- <!DOCTYPE html>
- <html>
- <head>
- <title>Device Properties Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // Wait for device API libraries to load
- //
- document.addEventListener("deviceready", onDeviceReady, false);
-
- // device APIs are available
- //
- function onDeviceReady() {
- var element = document.getElementById('deviceProperties');
- element.innerHTML = 'Device Name: ' + device.name + '<br />' +
- 'Device Cordova: ' + device.cordova + '<br />' +
- 'Device Platform: ' + device.platform + '<br />' +
- 'Device UUID: ' + device.uuid + '<br />' +
- 'Device Version: ' + device.version + '<br />';
- }
-
- </script>
- </head>
- <body>
- <p id="deviceProperties">Loading device properties...</p>
- </body>
- </html>
[5/6] git commit: CB-5658 Update license comment formatting of
doc/index.md
Posted by ag...@apache.org.
CB-5658 Update license comment formatting of doc/index.md
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/a10a2b26
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/a10a2b26
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/a10a2b26
Branch: refs/heads/master
Commit: a10a2b26f9fb951c513552bb08d87614d9994d87
Parents: 15b5b31
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Dec 18 21:11:02 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Dec 18 21:11:02 2013 -0500
----------------------------------------------------------------------
doc/index.md | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/a10a2b26/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index 464703b..f900ab9 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -1,20 +1,20 @@
<!---
- 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.
+ 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.
-->
# org.apache.cordova.device
[6/6] git commit: CB-5719 Updated version and RELEASENOTES.md for
release 0.2.6
Posted by ag...@apache.org.
CB-5719 Updated version and RELEASENOTES.md for release 0.2.6
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/10952525
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/10952525
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/10952525
Branch: refs/heads/master
Commit: 109525257b68663897a877910d6629a7b81a629f
Parents: a10a2b2
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Jan 2 12:24:02 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Jan 2 12:24:02 2014 -0500
----------------------------------------------------------------------
RELEASENOTES.md | 4 ++++
plugin.xml | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/10952525/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 741b66d..27a7164 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -45,3 +45,7 @@
* add ubuntu platform
* Modify Device.platform logic to use amazon-fireos as the platform for Amazon Devices
* 1. Added amazon-fireos platform. 2. Change to use cordova-amazon-fireos as the platform if user agent contains 'cordova-amazon-fireos'
+
+### 0.2.6 (Jan 02, 2014)
+* CB-5658 Add doc/index.md for Device plugin
+* CB-5504 Moving Telephony Logic out of Device
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/10952525/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index e548a4f..db50add 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -4,7 +4,7 @@
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.device"
- version="0.2.6-dev">
+ version="0.2.6">
<name>Device</name>
<description>Cordova Device Plugin</description>
<license>Apache 2.0</license>
[4/6] git commit: CB-5658 Add doc.index.md for Device plugin
Posted by ag...@apache.org.
CB-5658 Add doc.index.md for Device plugin
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/15b5b315
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/15b5b315
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/15b5b315
Branch: refs/heads/master
Commit: 15b5b3152b97092e32b95f2ce17d58823b2f57ac
Parents: fdf4219
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Dec 18 12:07:20 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Dec 18 12:07:20 2013 -0500
----------------------------------------------------------------------
README.md | 25 +++++--
doc/index.md | 211 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 232 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/15b5b315/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index e07ef89..5158f6f 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,22 @@
-cordova-plugin-device
------------------------
-To install this plugin, follow the [Command-line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface).
+<!---
+ 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
-If you are not using the Cordova Command-line Interface, follow [Using Plugman to Manage Plugins](http://cordova.apache.org/docs/en/edge/plugin_ref_plugman.md.html).
+ 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.
+-->
+
+# org.apache.cordova.device
+
+Plugin documentation: [doc/index.md](doc/index.md)
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/15b5b315/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
new file mode 100644
index 0000000..464703b
--- /dev/null
+++ b/doc/index.md
@@ -0,0 +1,211 @@
+<!---
+ 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.
+-->
+
+# org.apache.cordova.device
+
+This plugin defines a global `device` object, which describes the device's hardware and software.
+Although the object is in the global scope, it is not available until after the `deviceready` event.
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(device.cordova);
+ }
+
+## Installation
+
+ cordova plugin add org.apache.cordova.device
+
+## Properties
+
+- device.cordova
+- device.model
+- device.name
+- device.platform
+- device.uuid
+- device.version
+
+## device.cordova
+
+Get the version of Cordova running on the device.
+
+### Supported Platforms
+
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+## device.model
+
+The `device.model` returns the name of the device's model or
+product. The value is set by the device manufacturer and may be
+different across versions of the same product.
+
+### Supported Platforms
+
+- Android
+- BlackBerry 10
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+### Quick Example
+
+ // Android: Nexus One returns "Passion" (Nexus One code name)
+ // Motorola Droid returns "voles"
+ // BlackBerry: Torch 9800 returns "9800"
+ // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
+ //
+ var model = device.model;
+
+### Android Quirks
+
+- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.
+
+### Tizen Quirks
+
+- Returns the device model assigned by the vendor, for example, `TIZEN`
+
+### Windows Phone 7 and 8 Quirks
+
+- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.
+
+## device.name
+
+__WARNING__: `device.name` is deprecated as of version 2.3.0. Use `device.model` instead.
+
+## device.platform
+
+Get the device's operating system name.
+
+ var string = device.platform;
+
+### Supported Platforms
+
+- Android
+- BlackBerry 10
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+### Quick Example
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - "iOS"
+ // - "WinCE"
+ // - "Tizen"
+ var devicePlatform = device.platform;
+
+### Windows Phone 7 Quirks
+
+Windows Phone 7 devices report the platform as `WinCE`.
+
+### Windows Phone 8 Quirks
+
+Windows Phone 8 devices report the platform as `Win32NT`.
+
+## device.uuid
+
+Get the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
+
+ var string = device.uuid;
+
+### Description
+
+The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
+
+### Supported Platforms
+
+- Android
+- BlackBerry 10
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+### Quick Example
+
+ // Android: Returns a random 64-bit integer (as a string, again!)
+ // The integer is generated on the device's first boot
+ //
+ // BlackBerry: Returns the PIN number of the device
+ // This is a nine-digit unique integer (as a string, though!)
+ //
+ // iPhone: (Paraphrased from the UIDevice Class documentation)
+ // Returns a string of hash values created from multiple hardware identifies.
+ // It is guaranteed to be unique for every device and can't be tied
+ // to the user account.
+ // Windows Phone 7 : Returns a hash of device+current user,
+ // if the user is not defined, a guid is generated and will persist until the app is uninstalled
+ // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
+ // unique to every GSM and UMTS mobile phone.
+ var deviceID = device.uuid;
+
+### iOS Quirk
+
+The `uuid` on iOS is not unique to a device, but varies for each
+application, for each installation. It changes if you delete and
+re-install the app, and possibly also when you upgrade iOS, or even
+upgrade the app per version (apparent in iOS 5.1). The `uuid` is not
+a reliable value.
+
+### Windows Phone 7 and 8 Quirks
+
+The `uuid` for Windows Phone 7 requires the permission
+`ID_CAP_IDENTITY_DEVICE`. Microsoft will likely deprecate this
+property soon. If the capability is not available, the application
+generates a persistent guid that is maintained for the duration of the
+application's installation on the device.
+
+## device.version
+
+Get the operating system version.
+
+ var string = device.version;
+
+### Supported Platforms
+
+- Android 2.1+
+- BlackBerry 10
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+### Quick Example
+
+ // Android: Froyo OS would return "2.2"
+ // Eclair OS would return "2.1", "2.0.1", or "2.0"
+ // Version can also return update level "2.1-update1"
+ //
+ // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+ //
+ // iPhone: iOS 3.2 returns "3.2"
+ //
+ // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+ // Tizen: returns "TIZEN_20120425_2"
+ var deviceVersion = device.version;
+
[2/6] git commit: CB-5504: Moving Telephony Logic out of Device
Posted by ag...@apache.org.
CB-5504: Moving Telephony Logic out of Device
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/695272e6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/695272e6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/695272e6
Branch: refs/heads/master
Commit: 695272e6da9c168decdb6dd9f7a9383b65ad058c
Parents: 495f94a
Author: Joe Bowser <bo...@apache.org>
Authored: Mon Dec 9 14:05:34 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Mon Dec 9 14:05:34 2013 -0800
----------------------------------------------------------------------
src/android/Device.java | 40 ----------------------------------------
1 file changed, 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/695272e6/src/android/Device.java
----------------------------------------------------------------------
diff --git a/src/android/Device.java b/src/android/Device.java
index fe5dd14..603ea37 100644
--- a/src/android/Device.java
+++ b/src/android/Device.java
@@ -65,7 +65,6 @@ public class Device extends CordovaPlugin {
public void initialize(CordovaInterface cordova, CordovaWebView webView) {
super.initialize(cordova, webView);
Device.uuid = getUuid();
- this.initTelephonyReceiver();
}
/**
@@ -104,45 +103,6 @@ public class Device extends CordovaPlugin {
//--------------------------------------------------------------------------
/**
- * Listen for telephony events: RINGING, OFFHOOK and IDLE
- * Send these events to all plugins using
- * CordovaActivity.onMessage("telephone", "ringing" | "offhook" | "idle")
- */
- private void initTelephonyReceiver() {
- IntentFilter intentFilter = new IntentFilter();
- intentFilter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
- //final CordovaInterface mycordova = this.cordova;
- this.telephonyReceiver = new BroadcastReceiver() {
-
- @Override
- public void onReceive(Context context, Intent intent) {
-
- // If state has changed
- if ((intent != null) && intent.getAction().equals(TelephonyManager.ACTION_PHONE_STATE_CHANGED)) {
- if (intent.hasExtra(TelephonyManager.EXTRA_STATE)) {
- String extraData = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
- if (extraData.equals(TelephonyManager.EXTRA_STATE_RINGING)) {
- LOG.i(TAG, "Telephone RINGING");
- webView.postMessage("telephone", "ringing");
- }
- else if (extraData.equals(TelephonyManager.EXTRA_STATE_OFFHOOK)) {
- LOG.i(TAG, "Telephone OFFHOOK");
- webView.postMessage("telephone", "offhook");
- }
- else if (extraData.equals(TelephonyManager.EXTRA_STATE_IDLE)) {
- LOG.i(TAG, "Telephone IDLE");
- webView.postMessage("telephone", "idle");
- }
- }
- }
- }
- };
-
- // Register the receiver
- this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter);
- }
-
- /**
* Get the OS name.
*
* @return