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 2013/04/10 00:34:33 UTC
svn commit: r1466271 [5/41] - in /cordova/site: bin/ public/
public/docs/en/2.6.0/ public/docs/en/2.6.0/img/
public/docs/en/2.6.0/img/guide/
public/docs/en/2.6.0/img/guide/getting-started/
public/docs/en/2.6.0/img/guide/getting-started/android/ public/...
Added: cordova/site/public/docs/en/2.6.0/cordova_device_device.md.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/2.6.0/cordova_device_device.md.html?rev=1466271&view=auto
==============================================================================
--- cordova/site/public/docs/en/2.6.0/cordova_device_device.md.html (added)
+++ cordova/site/public/docs/en/2.6.0/cordova_device_device.md.html Tue Apr 9 22:34:28 2013
@@ -0,0 +1,706 @@
+<!DOCTYPE html>
+<!--
+ 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.
+--><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
+<meta name="generator" content="joDoc">
+<title>Apache Cordova API Documentation</title>
+<link rel="stylesheet" type="text/css" href="index.css">
+<link rel="stylesheet" type="text/css" href="mobile.css" media="only screen and (max-device-width: 1024px)">
+<link rel="stylesheet" type="text/css" href="prettify/prettify.css">
+</head>
+<body>
+ <div id="header">
+ <h1><a href="index.html">Apache <strong>Cordova</strong> Documentation</a></h1>
+ <small>
+ <select><optgroup label="English" value="en">
+<option value="edge">edge</option>
+<option value="2.6.0rc1">2.6.0rc1</option>
+<option selected value="2.6.0">2.6.0</option>
+<option value="2.5.0rc1">2.5.0rc1</option>
+<option value="2.5.0">2.5.0</option>
+<option value="2.4.0rc1">2.4.0rc1</option>
+<option value="2.4.0">2.4.0</option>
+<option value="2.3.0rc2">2.3.0rc2</option>
+<option value="2.3.0rc1">2.3.0rc1</option>
+<option value="2.3.0">2.3.0</option>
+<option value="2.2.0rc2">2.2.0rc2</option>
+<option value="2.2.0rc1">2.2.0rc1</option>
+<option value="2.2.0">2.2.0</option>
+<option value="2.1.0rc2">2.1.0rc2</option>
+<option value="2.1.0rc1">2.1.0rc1</option>
+<option value="2.1.0">2.1.0</option>
+<option value="2.0.0rc1">2.0.0rc1</option>
+<option value="2.0.0">2.0.0</option>
+<option value="1.9.0rc1">1.9.0rc1</option>
+<option value="1.9.0">1.9.0</option>
+<option value="1.8.1">1.8.1</option>
+<option value="1.8.0rc1">1.8.0rc1</option>
+<option value="1.8.0">1.8.0</option>
+<option value="1.7.0rc1">1.7.0rc1</option>
+<option value="1.7.0">1.7.0</option>
+<option value="1.6.1">1.6.1</option>
+<option value="1.6.0rc1">1.6.0rc1</option>
+<option value="1.6.0">1.6.0</option>
+<option value="1.5.0rc1">1.5.0rc1</option>
+<option value="1.5.0">1.5.0</option>
+</optgroup>
+<optgroup label="Japanese" value="jp">
+<option value="2.2.0">2.2.0</option>
+<option value="2.1.0">2.1.0</option>
+<option value="2.0.0">2.0.0</option>
+<option value="1.9.0">1.9.0</option>
+<option value="1.8.1">1.8.1</option>
+<option value="1.7.0">1.7.0</option>
+</optgroup>
+<optgroup label="Korean" value="kr"><option value="2.0.0">2.0.0</option></optgroup></select></small>
+ </div>
+ <div id="subheader">
+ <h1>Device</h1>
+ <small><select><option value="Device">Device</option>
+<option value="Device_properties">Â Â Â Â Â Â - Properties</option>
+<option value="Device_variable_scope">Â Â Â Â Â Â - Variable Scope</option>
+<option value="Device_permissions">Â Â Â Â Â Â - Permissions</option>
+<option value="device.name">device.name</option>
+<option value="device.name_description">Â Â Â Â Â Â - Description</option>
+<option value="device.name_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="device.name_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="device.name_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="device.name_android_quirks">Â Â Â Â Â Â - Android Quirks</option>
+<option value="device.name_windows_phone_7_and_8_quirks">Â Â Â Â Â Â - Windows Phone 7 and 8 Quirks</option>
+<option value="device.name_bada_quirks">Â Â Â Â Â Â - Bada Quirks</option>
+<option value="device.name_tizen_quirks">Â Â Â Â Â Â - Tizen Quirks</option>
+<option value="device.cordova">device.cordova</option>
+<option value="device.cordova_description">Â Â Â Â Â Â - Description</option>
+<option value="device.cordova_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="device.cordova_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="device.cordova_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="device.platform">device.platform</option>
+<option value="device.platform_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="device.platform_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="device.platform_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="device.platform_blackberry_quirks">Â Â Â Â Â Â - BlackBerry Quirks</option>
+<option value="device.platform_windows_phone_7_quirks">Â Â Â Â Â Â - Windows Phone 7 Quirks</option>
+<option value="device.platform_windows_phone_8_quirks">Â Â Â Â Â Â - Windows Phone 8 Quirks</option>
+<option value="device.uuid">device.uuid</option>
+<option value="device.uuid_description">Â Â Â Â Â Â - Description</option>
+<option value="device.uuid_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="device.uuid_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="device.uuid_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="device.uuid_ios_quirk">Â Â Â Â Â Â - iOS Quirk</option>
+<option value="device.uuid_windows_phone_7_and_8_quirks">Â Â Â Â Â Â - Windows Phone 7 and 8 Quirks</option>
+<option value="device.version">device.version</option>
+<option value="device.version_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="device.version_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="device.version_full_example">Â Â Â Â Â Â - Full Example</option></select></small>
+ </div>
+
+ <div id="sidebar">
+ <div class="vertical_divider"></div>
+ <h1>API Reference</h1>
+<ul>
+<li><a href="cordova_accelerometer_accelerometer.md.html#Accelerometer">Accelerometer</a></li>
+<li><a href="cordova_camera_camera.md.html#Camera">Camera</a></li>
+<li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li>
+<li><a href="cordova_compass_compass.md.html#Compass">Compass</a></li>
+<li><a href="cordova_connection_connection.md.html#Connection">Connection</a></li>
+<li><a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></li>
+<li><a href="cordova_device_device.md.html#Device">Device</a></li>
+<li><a href="cordova_events_events.md.html#Events">Events</a></li>
+<li><a href="cordova_file_file.md.html#File">File</a></li>
+<li><a href="cordova_geolocation_geolocation.md.html#Geolocation">Geolocation</a></li>
+<li><a href="cordova_globalization_globalization.md.html#Globalization">Globalization</a></li>
+<li><a href="cordova_inappbrowser_inappbrowser.md.html#InAppBrowser">InAppBrowser</a></li>
+<li><a href="cordova_media_media.md.html#Media">Media</a></li>
+<li><a href="cordova_notification_notification.md.html#Notification">Notification</a></li>
+<li><a href="cordova_splashscreen_splashscreen.md.html#Splashscreen">Splashscreen</a></li>
+<li><a href="cordova_storage_storage.md.html#Storage">Storage</a></li>
+</ul>
+<h1>Guides</h1>
+<ul>
+<li><a href="guide_getting-started_index.md.html#Getting%20Started%20Guides">Getting Started Guides</a></li>
+<li><a href="guide_command-line_index.md.html#Command-Line%20Usage">Command-Line Usage</a></li>
+<li><a href="guide_upgrading_index.md.html#Upgrading%20Guides">Upgrading Guides</a></li>
+<li><a href="guide_project-settings_index.md.html#Project%20Settings">Project Settings</a></li>
+<li><a href="guide_plugin-development_index.md.html#Plugin%20Development%20Guide">Plugin Development Guide</a></li>
+<li><a href="guide_whitelist_index.md.html#Domain%20Whitelist%20Guide">Domain Whitelist Guide</a></li>
+<li><a href="guide_cordova-webview_index.md.html#Embedding%20WebView">Embedding WebView</a></li>
+<li><a href="_index.html">Keyword Index</a></li>
+</ul>
+</div>
+
+ <div id="scrollable">
+ <div id="content">
+ <h1><a name="Device">Device</a></h1>
+
+<blockquote>
+ <p>The <code>device</code> object describes the device's hardware and software.</p>
+</blockquote>
+
+<h2>
+<a name="Device_properties">Properties</a>
+</h2>
+
+<ul>
+<li><a href="cordova_device_device.md.html#device.name">device.name</a></li>
+<li><a href="cordova_device_device.md.html#device.cordova">device.cordova</a></li>
+<li><a href="cordova_device_device.md.html#device.platform">device.platform</a></li>
+<li><a href="cordova_device_device.md.html#device.uuid">device.uuid</a></li>
+<li><a href="cordova_device_device.md.html#device.version">device.version</a></li>
+<li><a href="cordova_device_device.model.md.html#device.model">device.model</a></li>
+</ul>
+<h2>
+<a name="Device_variable_scope">Variable Scope</a>
+</h2>
+
+<p>Since <code>device</code> is assigned to the <code>window</code> object, it is implicitly in the global scope.</p>
+
+<pre class="prettyprint"><code>// These reference the same `device`
+var phoneName = window.<a href="cordova_device_device.md.html#device.name">device.name</a>;
+var phoneName = <a href="cordova_device_device.md.html#device.name">device.name</a>;
+</code></pre>
+
+<h2>
+<a name="Device_permissions">Permissions</a>
+</h2>
+
+<h3>Android</h3>
+
+<h4>app/res/xml/config.xml</h4>
+
+<pre class="prettyprint"><code><plugin name="<a href="cordova_device_device.md.html#Device">Device</a>" value="org.apache.cordova.<a href="cordova_device_device.md.html#Device">Device</a>" />
+</code></pre>
+
+<h4>app/AndroidManifest.xml</h4>
+
+<pre class="prettyprint"><code><uses-permission android:name="android.permission.READ_PHONE_STATE" />
+</code></pre>
+
+<h3>Bada</h3>
+
+<h4>manifest.xml</h4>
+
+<pre class="prettyprint"><code><Privilege>
+ <Name>SYSTEM_SERVICE</Name>
+</Privilege>
+</code></pre>
+
+<h3>BlackBerry WebWorks</h3>
+
+<h4>www/plugins.xml</h4>
+
+<pre class="prettyprint"><code><plugin name="<a href="cordova_device_device.md.html#Device">Device</a>" value="org.apache.cordova.device.<a href="cordova_device_device.md.html#Device">Device</a>" />
+</code></pre>
+
+<h4>www/config.xml</h4>
+
+<pre class="prettyprint"><code><feature id="blackberry.app" required="true" version="1.0.0.0" />
+<rim:permissions>
+ <rim:permit>read_device_identifying_information</rim:permit>
+</rim:permissions>
+</code></pre>
+
+<h3>iOS</h3>
+
+<pre class="prettyprint"><code>No permissions are required.
+</code></pre>
+
+<h3>webOS</h3>
+
+<pre class="prettyprint"><code>No permissions are required.
+</code></pre>
+
+<h3>Windows Phone</h3>
+
+<h4>Properties/WPAppManifest.xml</h4>
+
+<pre class="prettyprint"><code><Capabilities>
+ <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
+ <Capability Name="ID_CAP_IDENTITY_DEVICE" />
+ <Capability Name="ID_CAP_IDENTITY_USER" />
+</Capabilities>
+</code></pre>
+
+<p>Reference: <a class="external" href="http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx">Application Manifest for Windows Phone</a></p>
+
+<h3>Tizen</h3>
+
+<h4>config.xml</h4>
+
+<pre class="prettyprint"><code><feature name="http://tizen.org/api/systeminfo" required="true"/>
+</code></pre>
+
+<p>Reference: <a class="external" href="https://developer.tizen.org/help/topic/org.tizen.help.gs/Creating%20a%20Project.html?path=0_1_1_3#8814682_CreatingaProject-EditingconfigxmlFeatures">Application Manifest for Tizen Web Application</a></p>
+
+<hr>
+<h1><a name="device.name">device.name</a></h1>
+
+<p>WARNING: <a href="cordova_device_device.md.html#device.name">device.name</a> is deprecated as of version 2.3.0, use <a href="cordova_device_device.model.md.html#device.model">device.model</a> instead</p>
+
+<p>Get the device's model name.</p>
+
+<pre class="prettyprint"><code>var string = <a href="cordova_device_device.md.html#device.name">device.name</a>;
+</code></pre>
+
+<h2>
+<a name="device.name_description">Description</a>
+</h2>
+
+<p><code><a href="cordova_device_device.md.html#device.name">device.name</a></code> 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.</p>
+
+<h2>
+<a name="device.name_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Bada 1.2 & 2.x</li>
+<li>webOS</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="device.name_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// 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 = <a href="cordova_device_device.md.html#device.name">device.name</a>;
+</code></pre>
+
+<h2>
+<a name="device.name_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_device_device.md.html#Device">Device</a> Properties Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova-2.6.0.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for Cordova to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // Cordova is ready
+ //
+ function onDeviceReady() {
+ var element = document.getElementById('deviceProperties');
+
+ element.innerHTML = '<a href="cordova_device_device.md.html#Device">Device</a> Name: ' + <a href="cordova_device_device.md.html#device.name">device.name</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Cordova: ' + <a href="cordova_device_device.md.html#device.cordova">device.cordova</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Platform: ' + <a href="cordova_device_device.md.html#device.platform">device.platform</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> UUID: ' + <a href="cordova_device_device.md.html#device.uuid">device.uuid</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Model: ' + <a href="cordova_device_device.model.md.html#device.model">device.model</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Version: ' + <a href="cordova_device_device.md.html#device.version">device.version</a> + '<br />';
+ }
+
+ </script>
+ </head>
+ <body>
+ <p id="deviceProperties">Loading device properties...</p>
+ </body>
+</html>
+</code></pre>
+
+<h2>
+<a name="device.name_android_quirks">Android Quirks</a>
+</h2>
+
+<ul>
+<li>Gets the <a class="external" href="http://developer.android.com/reference/android/os/Build.html#PRODUCT">product name</a> instead of the <a class="external" href="http://developer.android.com/reference/android/os/Build.html#MODEL">model name</a>.
+<ul>
+<li>The product name is often the code name given during production.</li>
+<li>e.g. Nexus One returns "Passion", Motorola Droid returns "voles"</li>
+</ul>
+</li>
+</ul>
+<h2>
+<a name="device.name_windows_phone_7_and_8_quirks">Windows Phone 7 and 8 Quirks</a>
+</h2>
+
+<ul>
+<li>returns the manufacturer specified <a href="#device%20name">device name</a>, for example, the Samsung Focus returns 'SGH-i917'</li>
+</ul>
+<h2>
+<a name="device.name_bada_quirks">Bada Quirks</a>
+</h2>
+
+<ul>
+<li>returns the manufacturer model name. For example 'Samsung Wave S8500'</li>
+</ul>
+<h2>
+<a name="device.name_tizen_quirks">Tizen Quirks</a>
+</h2>
+
+<ul>
+<li>returns the <a href="#device%20model">device model</a> assigned by the vendor. For example 'TIZEN'</li>
+</ul>
+<hr>
+<h1><a name="device.cordova">device.cordova</a></h1>
+
+<p>Get the version of Cordova running on the device.</p>
+
+<pre class="prettyprint"><code>var string = <a href="cordova_device_device.md.html#device.cordova">device.cordova</a>;
+</code></pre>
+
+<h2>
+<a name="device.cordova_description">Description</a>
+</h2>
+
+<p><code><a href="cordova_device_device.md.html#device.cordova">device.cordova</a></code> returns the version of Cordova running on the device.</p>
+
+<h2>
+<a name="device.cordova_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iPhone</li>
+<li>Windows Phone 7 and 8</li>
+<li>Bada 1.2 & 2.x</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="device.cordova_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>var name = <a href="cordova_device_device.md.html#device.cordova">device.cordova</a>;
+</code></pre>
+
+<h2>
+<a name="device.cordova_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_device_device.md.html#Device">Device</a> Properties Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova-2.6.0.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for Cordova to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // Cordova is ready
+ //
+ function onDeviceReady() {
+ var element = document.getElementById('deviceProperties');
+
+ element.innerHTML = '<a href="cordova_device_device.md.html#Device">Device</a> Name: ' + <a href="cordova_device_device.md.html#device.name">device.name</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Cordova: ' + <a href="cordova_device_device.md.html#device.cordova">device.cordova</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Platform: ' + <a href="cordova_device_device.md.html#device.platform">device.platform</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> UUID: ' + <a href="cordova_device_device.md.html#device.uuid">device.uuid</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Version: ' + <a href="cordova_device_device.md.html#device.version">device.version</a> + '<br />';
+ }
+
+ </script>
+ </head>
+ <body>
+ <p id="deviceProperties">Loading device properties...</p>
+ </body>
+</html>
+</code></pre>
+
+<hr>
+<h1><a name="device.platform">device.platform</a></h1>
+
+<p>Get the device's operating system name.</p>
+
+<pre class="prettyprint"><code>var string = <a href="cordova_device_device.md.html#device.platform">device.platform</a>;
+</code></pre>
+
+<h2>
+<a name="device.platform_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Bada 1.2 & 2.x</li>
+<li>webOS</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="device.platform_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Depending on the device, a few examples are:
+// - "Android"
+// - "BlackBerry"
+// - "iOS"
+// - "webOS"
+// - "WinCE"
+// - "Tizen"
+var devicePlatform = <a href="cordova_device_device.md.html#device.platform">device.platform</a>;
+</code></pre>
+
+<h2>
+<a name="device.platform_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_device_device.md.html#Device">Device</a> Properties Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova-2.6.0.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for Cordova to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // Cordova is ready
+ //
+ function onDeviceReady() {
+ var element = document.getElementById('deviceProperties');
+
+ element.innerHTML = '<a href="cordova_device_device.md.html#Device">Device</a> Name: ' + <a href="cordova_device_device.md.html#device.name">device.name</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Cordova: ' + <a href="cordova_device_device.md.html#device.cordova">device.cordova</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Platform: ' + <a href="cordova_device_device.md.html#device.platform">device.platform</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> UUID: ' + <a href="cordova_device_device.md.html#device.uuid">device.uuid</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Version: ' + <a href="cordova_device_device.md.html#device.version">device.version</a> + '<br />';
+ }
+
+ </script>
+ </head>
+ <body>
+ <p id="deviceProperties">Loading device properties...</p>
+ </body>
+</html>
+</code></pre>
+
+<h2>
+<a name="device.platform_blackberry_quirks">BlackBerry Quirks</a>
+</h2>
+
+<p>Devices may return the <a href="#device%20platform">device platform</a> version instead of the platform name. For example, the Storm2 9550 would return '2.13.0.95' or similar.</p>
+
+<h2>
+<a name="device.platform_windows_phone_7_quirks">Windows Phone 7 Quirks</a>
+</h2>
+
+<p>Windows Phone 7 devices report platform as 'WinCE'</p>
+
+<h2>
+<a name="device.platform_windows_phone_8_quirks">Windows Phone 8 Quirks</a>
+</h2>
+
+<p>Windows Phone 8 devices report platform as 'Win32NT'</p>
+
+<hr>
+<h1><a name="device.uuid">device.uuid</a></h1>
+
+<p>Get the device's Universally Unique Identifier (<a class="external" href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier">UUID</a>).</p>
+
+<pre class="prettyprint"><code>var string = <a href="cordova_device_device.md.html#device.uuid">device.uuid</a>;
+</code></pre>
+
+<h2>
+<a name="device.uuid_description">Description</a>
+</h2>
+
+<p>The details of how a UUID is generated are determined by the device manufacturer and specific to the device's platform or model.</p>
+
+<h2>
+<a name="device.uuid_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iPhone</li>
+<li>Windows Phone 7 and 8</li>
+<li>Bada 1.2 & 2.x</li>
+<li>webOS</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="device.uuid_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// 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 = <a href="cordova_device_device.md.html#device.uuid">device.uuid</a>;
+</code></pre>
+
+<h2>
+<a name="device.uuid_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_device_device.md.html#Device">Device</a> Properties Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova-2.6.0.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for Cordova to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // Cordova is ready
+ //
+ function onDeviceReady() {
+ var element = document.getElementById('deviceProperties');
+
+ element.innerHTML = '<a href="cordova_device_device.md.html#Device">Device</a> Name: ' + <a href="cordova_device_device.md.html#device.name">device.name</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Cordova: ' + <a href="cordova_device_device.md.html#device.cordova">device.cordova</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Platform: ' + <a href="cordova_device_device.md.html#device.platform">device.platform</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> UUID: ' + <a href="cordova_device_device.md.html#device.uuid">device.uuid</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Version: ' + <a href="cordova_device_device.md.html#device.version">device.version</a> + '<br />';
+ }
+
+ </script>
+ </head>
+ <body>
+ <p id="deviceProperties">Loading device properties...</p>
+ </body>
+</html>
+</code></pre>
+
+<h2>
+<a name="device.uuid_ios_quirk">iOS Quirk</a>
+</h2>
+
+<p>The uuid for iOS is not unique for a device, but is unique per application per install. This will change if you delete the app and re-install, and possibly also when you upgrade your iOS version, or even upgrade your app per version (as we've seen in iOS 5.1). Not a reliable value.</p>
+
+<h2>
+<a name="device.uuid_windows_phone_7_and_8_quirks">Windows Phone 7 and 8 Quirks</a>
+</h2>
+
+<p>The uuid for Windows Phone 7 requires the permission ID<em>CAP</em>IDENTITY_DEVICE. Microsoft will likely be deprecating this property in the near future. If the capability is not available, the application generates a persistent guid, that will be maintained for the install-lifetime of the application on the device.</p>
+
+<hr>
+<h1><a name="device.version">device.version</a></h1>
+
+<p>Get the operating system version.</p>
+
+<pre class="prettyprint"><code>var string = <a href="cordova_device_device.md.html#device.version">device.version</a>;
+</code></pre>
+
+<h2>
+<a name="device.version_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android 2.1+</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iPhone</li>
+<li>Windows Phone 7 and 8</li>
+<li>Bada 1.2 & 2.x</li>
+<li>webOS</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="device.version_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// 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 = <a href="cordova_device_device.md.html#device.version">device.version</a>;
+</code></pre>
+
+<h2>
+<a name="device.version_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_device_device.md.html#Device">Device</a> Properties Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova-2.6.0.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for Cordova to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // Cordova is ready
+ //
+ function onDeviceReady() {
+ var element = document.getElementById('deviceProperties');
+
+ element.innerHTML = '<a href="cordova_device_device.md.html#Device">Device</a> Name: ' + <a href="cordova_device_device.md.html#device.name">device.name</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Cordova: ' + <a href="cordova_device_device.md.html#device.cordova">device.cordova</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Platform: ' + <a href="cordova_device_device.md.html#device.platform">device.platform</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> UUID: ' + <a href="cordova_device_device.md.html#device.uuid">device.uuid</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Version: ' + <a href="cordova_device_device.md.html#device.version">device.version</a> + '<br />';
+ }
+
+ </script>
+ </head>
+ <body>
+ <p id="deviceProperties">Loading device properties...</p>
+ </body>
+</html>
+</code></pre>
+
+ </div>
+ </div>
+
+ <!-- Functionality and Syntax Highlighting -->
+ <script type="text/javascript" src="index.js"></script><script type="text/javascript" src="prettify/prettify.js"></script>
+</body>
+</html>
Added: cordova/site/public/docs/en/2.6.0/cordova_device_device.model.md.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/2.6.0/cordova_device_device.model.md.html?rev=1466271&view=auto
==============================================================================
--- cordova/site/public/docs/en/2.6.0/cordova_device_device.model.md.html (added)
+++ cordova/site/public/docs/en/2.6.0/cordova_device_device.model.md.html Tue Apr 9 22:34:28 2013
@@ -0,0 +1,239 @@
+<!DOCTYPE html>
+<!--
+ 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.
+--><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
+<meta name="generator" content="joDoc">
+<title>Apache Cordova API Documentation</title>
+<link rel="stylesheet" type="text/css" href="index.css">
+<link rel="stylesheet" type="text/css" href="mobile.css" media="only screen and (max-device-width: 1024px)">
+<link rel="stylesheet" type="text/css" href="prettify/prettify.css">
+</head>
+<body>
+ <div id="header">
+ <h1><a href="index.html">Apache <strong>Cordova</strong> Documentation</a></h1>
+ <small>
+ <select><optgroup label="English" value="en">
+<option value="edge">edge</option>
+<option value="2.6.0rc1">2.6.0rc1</option>
+<option selected value="2.6.0">2.6.0</option>
+<option value="2.5.0rc1">2.5.0rc1</option>
+<option value="2.5.0">2.5.0</option>
+<option value="2.4.0rc1">2.4.0rc1</option>
+<option value="2.4.0">2.4.0</option>
+<option value="2.3.0rc2">2.3.0rc2</option>
+<option value="2.3.0rc1">2.3.0rc1</option>
+<option value="2.3.0">2.3.0</option>
+<option value="2.2.0rc2">2.2.0rc2</option>
+<option value="2.2.0rc1">2.2.0rc1</option>
+<option value="2.2.0">2.2.0</option>
+<option value="2.1.0rc2">2.1.0rc2</option>
+<option value="2.1.0rc1">2.1.0rc1</option>
+<option value="2.1.0">2.1.0</option>
+<option value="2.0.0rc1">2.0.0rc1</option>
+<option value="2.0.0">2.0.0</option>
+<option value="1.9.0rc1">1.9.0rc1</option>
+<option value="1.9.0">1.9.0</option>
+<option value="1.8.1">1.8.1</option>
+<option value="1.8.0rc1">1.8.0rc1</option>
+<option value="1.8.0">1.8.0</option>
+<option value="1.7.0rc1">1.7.0rc1</option>
+<option value="1.7.0">1.7.0</option>
+<option value="1.6.1">1.6.1</option>
+<option value="1.6.0rc1">1.6.0rc1</option>
+<option value="1.6.0">1.6.0</option>
+<option value="1.5.0rc1">1.5.0rc1</option>
+<option value="1.5.0">1.5.0</option>
+</optgroup>
+<optgroup label="Japanese" value="jp">
+<option value="2.2.0">2.2.0</option>
+<option value="2.1.0">2.1.0</option>
+<option value="2.0.0">2.0.0</option>
+<option value="1.9.0">1.9.0</option>
+<option value="1.8.1">1.8.1</option>
+<option value="1.7.0">1.7.0</option>
+</optgroup>
+<optgroup label="Korean" value="kr"><option value="2.0.0">2.0.0</option></optgroup></select></small>
+ </div>
+ <div id="subheader">
+ <h1>device.model</h1>
+ <small><select><option value="device.model">device.model</option>
+<option value="device.model_description">Â Â Â Â Â Â - Description</option>
+<option value="device.model_supported_platforms">Â Â Â Â Â Â - Supported Platforms</option>
+<option value="device.model_quick_example">Â Â Â Â Â Â - Quick Example</option>
+<option value="device.model_full_example">Â Â Â Â Â Â - Full Example</option>
+<option value="device.model_android_quirks">Â Â Â Â Â Â - Android Quirks</option>
+<option value="device.model_windows_phone_7_and_8_quirks">Â Â Â Â Â Â - Windows Phone 7 and 8 Quirks</option>
+<option value="device.model_bada_quirks">Â Â Â Â Â Â - Bada Quirks</option>
+<option value="device.model_tizen_quirks">Â Â Â Â Â Â - Tizen Quirks</option></select></small>
+ </div>
+
+ <div id="sidebar">
+ <div class="vertical_divider"></div>
+ <h1>API Reference</h1>
+<ul>
+<li><a href="cordova_accelerometer_accelerometer.md.html#Accelerometer">Accelerometer</a></li>
+<li><a href="cordova_camera_camera.md.html#Camera">Camera</a></li>
+<li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li>
+<li><a href="cordova_compass_compass.md.html#Compass">Compass</a></li>
+<li><a href="cordova_connection_connection.md.html#Connection">Connection</a></li>
+<li><a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></li>
+<li><a href="cordova_device_device.md.html#Device">Device</a></li>
+<li><a href="cordova_events_events.md.html#Events">Events</a></li>
+<li><a href="cordova_file_file.md.html#File">File</a></li>
+<li><a href="cordova_geolocation_geolocation.md.html#Geolocation">Geolocation</a></li>
+<li><a href="cordova_globalization_globalization.md.html#Globalization">Globalization</a></li>
+<li><a href="cordova_inappbrowser_inappbrowser.md.html#InAppBrowser">InAppBrowser</a></li>
+<li><a href="cordova_media_media.md.html#Media">Media</a></li>
+<li><a href="cordova_notification_notification.md.html#Notification">Notification</a></li>
+<li><a href="cordova_splashscreen_splashscreen.md.html#Splashscreen">Splashscreen</a></li>
+<li><a href="cordova_storage_storage.md.html#Storage">Storage</a></li>
+</ul>
+<h1>Guides</h1>
+<ul>
+<li><a href="guide_getting-started_index.md.html#Getting%20Started%20Guides">Getting Started Guides</a></li>
+<li><a href="guide_command-line_index.md.html#Command-Line%20Usage">Command-Line Usage</a></li>
+<li><a href="guide_upgrading_index.md.html#Upgrading%20Guides">Upgrading Guides</a></li>
+<li><a href="guide_project-settings_index.md.html#Project%20Settings">Project Settings</a></li>
+<li><a href="guide_plugin-development_index.md.html#Plugin%20Development%20Guide">Plugin Development Guide</a></li>
+<li><a href="guide_whitelist_index.md.html#Domain%20Whitelist%20Guide">Domain Whitelist Guide</a></li>
+<li><a href="guide_cordova-webview_index.md.html#Embedding%20WebView">Embedding WebView</a></li>
+<li><a href="_index.html">Keyword Index</a></li>
+</ul>
+</div>
+
+ <div id="scrollable">
+ <div id="content">
+ <h1><a name="device.model">device.model</a></h1>
+
+<p>Get the device's model name.</p>
+
+<pre class="prettyprint"><code>var string = <a href="cordova_device_device.model.md.html#device.model">device.model</a>;
+</code></pre>
+
+<h2>
+<a name="device.model_description">Description</a>
+</h2>
+
+<p><code><a href="cordova_device_device.model.md.html#device.model">device.model</a></code> 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.</p>
+
+<h2>
+<a name="device.model_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Bada 1.2 & 2.x</li>
+<li>webOS</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="device.model_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Android: Nexus One returns "Passion" (Nexus One code name)
+// Motorola Droid returns "voles"
+// BlackBerry: Torch 9800 returns "9800"
+// iOS: for the iPad Mini, will return iPad2,5. iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
+//
+var model = <a href="cordova_device_device.model.md.html#device.model">device.model</a>;
+</code></pre>
+
+<h2>
+<a name="device.model_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code><!DOCTYPE html>
+<html>
+ <head>
+ <title><a href="cordova_device_device.md.html#Device">Device</a> Properties Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova-2.6.0.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for Cordova to load
+ //
+ document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+ // Cordova is ready
+ //
+ function onDeviceReady() {
+ var element = document.getElementById('deviceProperties');
+
+ element.innerHTML = '<a href="cordova_device_device.md.html#Device">Device</a> Name: ' + <a href="cordova_device_device.md.html#device.name">device.name</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Cordova: ' + <a href="cordova_device_device.md.html#device.cordova">device.cordova</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Platform: ' + <a href="cordova_device_device.md.html#device.platform">device.platform</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> UUID: ' + <a href="cordova_device_device.md.html#device.uuid">device.uuid</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Model: ' + <a href="cordova_device_device.model.md.html#device.model">device.model</a> + '<br />' +
+ '<a href="cordova_device_device.md.html#Device">Device</a> Version: ' + <a href="cordova_device_device.md.html#device.version">device.version</a> + '<br />';
+ }
+
+ </script>
+ </head>
+ <body>
+ <p id="deviceProperties">Loading device properties...</p>
+ </body>
+</html>
+</code></pre>
+
+<h2>
+<a name="device.model_android_quirks">Android Quirks</a>
+</h2>
+
+<ul>
+<li>Gets the <a class="external" href="http://developer.android.com/reference/android/os/Build.html#PRODUCT">product name</a> instead of the <a class="external" href="http://developer.android.com/reference/android/os/Build.html#MODEL">model name</a>.
+<ul>
+<li>The product name is often the code name given during production.</li>
+<li>e.g. Nexus One returns "Passion", Motorola Droid returns "voles"</li>
+</ul>
+</li>
+</ul>
+<h2>
+<a name="device.model_windows_phone_7_and_8_quirks">Windows Phone 7 and 8 Quirks</a>
+</h2>
+
+<ul>
+<li>returns the manufacturer specified <a href="#device%20model">device model</a>, for example, the Samsung Focus returns 'SGH-i917'</li>
+</ul>
+<h2>
+<a name="device.model_bada_quirks">Bada Quirks</a>
+</h2>
+
+<ul>
+<li>returns the manufacturer model name. For example 'Samsung Wave S8500'</li>
+</ul>
+<h2>
+<a name="device.model_tizen_quirks">Tizen Quirks</a>
+</h2>
+
+<ul>
+<li>returns the <a href="#device%20model">device model</a> assigned by the vendor. For example 'TIZEN'</li>
+</ul>
+</div>
+ </div>
+
+ <!-- Functionality and Syntax Highlighting -->
+ <script type="text/javascript" src="index.js"></script><script type="text/javascript" src="prettify/prettify.js"></script>
+</body>
+</html>