You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2015/02/04 01:38:08 UTC
[1/6] cordova-plugin-device git commit: added package.json file
Repository: cordova-plugin-device
Updated Branches:
refs/heads/npmpub [created] 5ada7ee92
added package.json file
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/12c32f2c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/12c32f2c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/12c32f2c
Branch: refs/heads/npmpub
Commit: 12c32f2cfdec90e677fa0419d9df5d920144aa26
Parents: a0e4edc
Author: Steve Gill <st...@gmail.com>
Authored: Thu Jan 22 16:55:41 2015 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Jan 22 16:56:31 2015 -0800
----------------------------------------------------------------------
package.json | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/12c32f2c/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..fbe0000
--- /dev/null
+++ b/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "cordova-plugin-name",
+ "version": "0.2.13",
+ "id": "org.apache.cordova.device",
+ "description": "Cordova Device Plugin",
+ "license": "Apache 2.0",
+ "repository":{
+ "type": "git",
+ "url": "https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git"
+ },
+ "issue": "https://issues.apache.org/jira/browse/CB/component/12320648",
+ "keywords": [
+ "cordova",
+ "device"
+ ],
+ "platforms": [
+ "firefoxos",
+ "tizen",
+ "android",
+ "amazon-fireos",
+ "ubuntu",
+ "ios",
+ "blackberry10",
+ "wp7",
+ "wp8",
+ "windows8",
+ "windows",
+ "browser"
+ ],
+ "engines": [],
+ "author": "Steve Gill"
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[4/6] cordova-plugin-device git commit: added keyword cordovaplugin
Posted by st...@apache.org.
added keyword cordovaplugin
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/ad28db9f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/ad28db9f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/ad28db9f
Branch: refs/heads/npmpub
Commit: ad28db9fb3fba9f9060c2abcea4dd4fadba5aab2
Parents: 5c126fb
Author: Steve Gill <st...@gmail.com>
Authored: Wed Jan 28 23:17:54 2015 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Jan 28 23:17:54 2015 -0800
----------------------------------------------------------------------
package.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/ad28db9f/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index f04c58d..6dab91b 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,8 @@
"issue": "https://issues.apache.org/jira/browse/CB/component/12320648",
"keywords": [
"cordova",
- "device"
+ "device",
+ "cordovaplugin"
],
"platforms": [
"firefoxos",
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[5/6] cordova-plugin-device git commit: Merge branch 'master' into
npmpub
Posted by st...@apache.org.
Merge branch 'master' into npmpub
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/bb70d0a5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/bb70d0a5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/bb70d0a5
Branch: refs/heads/npmpub
Commit: bb70d0a5caf8473ee0b45dcfb8fd9f1ad5461a59
Parents: ad28db9 e1410aa
Author: Steve Gill <st...@gmail.com>
Authored: Tue Feb 3 16:09:18 2015 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Tue Feb 3 16:09:18 2015 -0800
----------------------------------------------------------------------
src/android/Device.java | 5 +++++
src/blackberry10/index.js | 1 +
src/ios/CDVDevice.m | 1 +
src/wp/Device.cs | 35 +++++++++++++++++++----------------
www/device.js | 2 ++
5 files changed, 28 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[3/6] cordova-plugin-device git commit: Merge branch 'master' into
npmpub
Posted by st...@apache.org.
Merge branch 'master' into npmpub
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/5c126fb9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/5c126fb9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/5c126fb9
Branch: refs/heads/npmpub
Commit: 5c126fb960e881fcd04b6ce7d26ddcf59c4adb8b
Parents: 6c7fd26 c801048
Author: Steve Gill <st...@gmail.com>
Authored: Fri Jan 23 15:42:55 2015 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Fri Jan 23 15:42:55 2015 -0800
----------------------------------------------------------------------
plugin.xml | 2 +-
src/browser/DeviceProxy.js | 6 +++++-
src/ios/CDVDevice.m | 24 +++++++++++++++++++++++-
tests/plugin.xml | 2 +-
4 files changed, 30 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[6/6] cordova-plugin-device git commit: added platforms as keywords
in package.json
Posted by st...@apache.org.
added platforms as keywords in package.json
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/5ada7ee9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/5ada7ee9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/5ada7ee9
Branch: refs/heads/npmpub
Commit: 5ada7ee92e1c665d5ccfdb0e51fb610604462aac
Parents: bb70d0a
Author: Steve Gill <st...@gmail.com>
Authored: Tue Feb 3 16:38:00 2015 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Tue Feb 3 16:38:00 2015 -0800
----------------------------------------------------------------------
package.json | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/5ada7ee9/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 6dab91b..5e05f2a 100644
--- a/package.json
+++ b/package.json
@@ -12,11 +12,19 @@
"keywords": [
"cordova",
"device",
- "cordovaplugin"
+ "cordovaplugin",
+ "cordova-firefoxos",
+ "cordova-android",
+ "cordova-amazon-fireos",
+ "cordova-ubuntu",
+ "cordova-ios",
+ "cordova-blackberry",
+ "cordova-wp8",
+ "cordova-windows",
+ "cordova-browser"
],
"platforms": [
"firefoxos",
- "tizen",
"android",
"amazon-fireos",
"ubuntu",
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[2/6] cordova-plugin-device git commit: copied index.md into readme,
updated to cordova-plugin-device
Posted by st...@apache.org.
copied index.md into readme, updated to cordova-plugin-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/6c7fd265
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/6c7fd265
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/6c7fd265
Branch: refs/heads/npmpub
Commit: 6c7fd2653c79291af942aca2659333a23f4275a5
Parents: 12c32f2
Author: Steve Gill <st...@gmail.com>
Authored: Thu Jan 22 17:02:08 2015 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Jan 22 17:02:08 2015 -0800
----------------------------------------------------------------------
README.md | 232 +++++++++++++++++++++++++++++++++++++++++++++++++-----
doc/index.md | 4 +-
package.json | 3 +-
3 files changed, 217 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/6c7fd265/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 5158f6f..e9607d5 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,218 @@
<!---
- 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
+# cordova-plugin-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 cordova-plugin-device
+
+## Properties
+
+- device.cordova
+- device.model
+- 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
+- Browser
+- Firefox OS
+- 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
+- Browser
+- 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"
+ // Browser: Google Chrome returns "Chrome"
+ // Safari returns "Safari"
+ // 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.platform
+
+Get the device's operating system name.
+
+ var string = device.platform;
+
+### Supported Platforms
+
+- Android
+- BlackBerry 10
+- Browser4
+- Firefox OS
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+### Quick Example
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - Browser: returns "MacIntel" on Mac
+ // returns "Win32" on Windows
+ // - "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
+- Browser
+- 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"
+ //
+ // Browser: Returns version number for the browser
+ //
+ // 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;
-Plugin documentation: [doc/index.md](doc/index.md)
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/6c7fd265/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index b3acc9f..e9607d5 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -17,7 +17,7 @@
under the License.
-->
-# org.apache.cordova.device
+# cordova-plugin-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.
@@ -29,7 +29,7 @@ Although the object is in the global scope, it is not available until after the
## Installation
- cordova plugin add org.apache.cordova.device
+ cordova plugin add cordova-plugin-device
## Properties
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/6c7fd265/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index fbe0000..f04c58d 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "cordova-plugin-name",
+ "name": "cordova-plugin-device",
"version": "0.2.13",
"id": "org.apache.cordova.device",
"description": "Cordova Device Plugin",
@@ -29,5 +29,4 @@
],
"engines": [],
"author": "Steve Gill"
-
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org