summaryrefslogtreecommitdiffstats
path: root/docs/html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html')
-rw-r--r--docs/html/about/versions/android-2.3.jd13
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_10/land_back.pngbin0 -> 265276 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_10/land_fore.pngbin0 -> 33741 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_10/land_shadow.pngbin0 -> 31761 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_10/port_back.pngbin0 -> 508801 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_10/port_fore.pngbin0 -> 31737 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_10/port_shadow.pngbin0 -> 36240 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_10/thumb.pngbin0 -> 17663 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_4/land_back.pngbin0 -> 816742 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_4/land_fore.pngbin0 -> 34120 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_4/land_shadow.pngbin0 -> 31820 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_4/port_back.pngbin0 -> 849499 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_4/port_fore.pngbin0 -> 28044 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_4/port_shadow.pngbin0 -> 37737 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_4/thumb.pngbin0 -> 11736 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_7/land_back.pngbin29977 -> 158936 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.pngbin30153 -> 33274 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.pngbin33797 -> 31186 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_7/port_back.pngbin30267 -> 177565 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.pngbin32982 -> 30824 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.pngbin41554 -> 29482 bytes
-rw-r--r--docs/html/distribute/promote/device-art-resources/nexus_7/thumb.pngbin8163 -> 7754 bytes
-rw-r--r--docs/html/distribute/promote/device-art.jd152
-rw-r--r--docs/html/guide/faq/security.jd4
-rw-r--r--docs/html/guide/google/gcm/gcm.jd6
-rw-r--r--docs/html/guide/practices/security.jd4
-rw-r--r--docs/html/guide/topics/manifest/activity-element.jd10
-rw-r--r--docs/html/guide/topics/manifest/application-element.jd18
-rw-r--r--docs/html/guide/topics/manifest/permission-element.jd2
-rw-r--r--docs/html/guide/topics/manifest/provider-element.jd161
-rw-r--r--docs/html/guide/topics/manifest/uses-feature-element.jd8
-rw-r--r--docs/html/guide/topics/providers/content-provider-basics.jd147
-rw-r--r--docs/html/guide/topics/resources/providing-resources.jd33
-rw-r--r--docs/html/guide/topics/resources/string-resource.jd24
-rw-r--r--docs/html/images/tools/dev-options-inmilk.pngbin0 -> 105845 bytes
-rw-r--r--docs/html/tools/building/building-cmdline.jd14
-rw-r--r--docs/html/tools/building/building-eclipse.jd14
-rw-r--r--docs/html/tools/device.jd16
-rw-r--r--docs/html/tools/index.jd71
-rw-r--r--docs/html/training/basics/firstapp/running-app.jd23
40 files changed, 463 insertions, 257 deletions
diff --git a/docs/html/about/versions/android-2.3.jd b/docs/html/about/versions/android-2.3.jd
index 8715973..89bf432 100644
--- a/docs/html/about/versions/android-2.3.jd
+++ b/docs/html/about/versions/android-2.3.jd
@@ -406,17 +406,6 @@ notification style.</li>
</ul>
</li>
-<li>WebView
-<ul>
-<li>New {@link
-android.webkit.WebSettings#setUseWebViewBackgroundForOverscrollBackground(
-boolean) setUseWebViewBackgroundForOverscrollBackground()} method lets a {@link
-android.webkit.WebView} specify whether to use its own background for the
-overscroll background. </li>
-</ul>
-</li>
-</ul>
-
<h3 id="extralargescreens">Extra Large Screens</h3>
<p>The platform now supports extra large screen sizes, such as those that might
@@ -707,4 +696,4 @@ declaring the attribute prevents the application from being installed on earlier
versions of the platform.</p>
<p>For more information, read <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
-Level?</a></p> \ No newline at end of file
+Level?</a></p>
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_10/land_back.png b/docs/html/distribute/promote/device-art-resources/nexus_10/land_back.png
new file mode 100644
index 0000000..d082d50
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_10/land_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_10/land_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_10/land_fore.png
new file mode 100644
index 0000000..d29f818
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_10/land_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_10/land_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_10/land_shadow.png
new file mode 100644
index 0000000..af1a249
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_10/land_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_10/port_back.png b/docs/html/distribute/promote/device-art-resources/nexus_10/port_back.png
new file mode 100644
index 0000000..501690b
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_10/port_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_10/port_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_10/port_fore.png
new file mode 100644
index 0000000..689a72a
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_10/port_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_10/port_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_10/port_shadow.png
new file mode 100644
index 0000000..b2265ef
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_10/port_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_10/thumb.png b/docs/html/distribute/promote/device-art-resources/nexus_10/thumb.png
new file mode 100644
index 0000000..8d8dee9
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_10/thumb.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_4/land_back.png b/docs/html/distribute/promote/device-art-resources/nexus_4/land_back.png
new file mode 100644
index 0000000..57a011a
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_4/land_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_4/land_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_4/land_fore.png
new file mode 100644
index 0000000..72c9654
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_4/land_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_4/land_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_4/land_shadow.png
new file mode 100644
index 0000000..d80a5fd
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_4/land_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_4/port_back.png b/docs/html/distribute/promote/device-art-resources/nexus_4/port_back.png
new file mode 100644
index 0000000..e64fae4
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_4/port_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_4/port_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_4/port_fore.png
new file mode 100644
index 0000000..c9fb062
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_4/port_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_4/port_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_4/port_shadow.png
new file mode 100644
index 0000000..b2064a3
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_4/port_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_4/thumb.png b/docs/html/distribute/promote/device-art-resources/nexus_4/thumb.png
new file mode 100644
index 0000000..2988dc9
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_4/thumb.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png
index 2999f35..697fb7d 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png
index cefdd35..735262f 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png
index 8f7aec7..cfb7952 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png
index b2908a8..5bb815a 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png
index 7f4b0b4..1be3b21 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png
index c10bd53..7e8aff2 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png b/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png
index 8b5cc5a..b5db82e 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art.jd b/docs/html/distribute/promote/device-art.jd
index 93f772a..55b846e 100644
--- a/docs/html/distribute/promote/device-art.jd
+++ b/docs/html/distribute/promote/device-art.jd
@@ -18,7 +18,9 @@ feature image or screenshots for your Google Play app listing.</p>
<p>Drag a screenshot from your desktop onto a device to the right.</p>
</div>
<div class="layout-content-col span-10">
- <ul id="device-list"></ul>
+ <ul class="device-list primary"></ul>
+ <a href="#" id="archive-expando">Older devices</a>
+ <ul class="device-list archive"></ul>
</div>
</div>
@@ -57,12 +59,12 @@ feature image or screenshots for your Google Play app listing.</p>
text-transform: uppercase;
}
- #device-list {
+ .device-list {
padding: 0;
margin: 0;
}
- #device-list li {
+ .device-list li {
display: inline-block;
vertical-align: bottom;
margin: 0;
@@ -70,11 +72,11 @@ feature image or screenshots for your Google Play app listing.</p>
text-align: center;
}
- #device-list li .thumb-container {
+ .device-list li .thumb-container {
display: inline-block;
}
- #device-list li .thumb-container img {
+ .device-list li .thumb-container img {
margin-bottom: 8px;
opacity: 0.6;
@@ -83,7 +85,7 @@ feature image or screenshots for your Google Play app listing.</p>
transition: transform 0.2s, opacity 0.2s;
}
- #device-list li.drag-hover .thumb-container img {
+ .device-list li.drag-hover .thumb-container img {
opacity: 1;
-webkit-transform: scale(1.1);
@@ -91,16 +93,35 @@ feature image or screenshots for your Google Play app listing.</p>
transform: scale(1.1);
}
- #device-list li .device-details {
+ .device-list li .device-details {
font-size: 13px;
line-height: 16px;
color: #888;
}
- #device-list li .device-url {
+ .device-list li .device-url {
font-weight: bold;
}
+ #archive-expando {
+ display: block;
+ font-size: 13px;
+ font-weight: bold;
+ color: #333;
+ text-transform: uppercase;
+ margin-top: 16px;
+ padding-top: 16px;
+ padding-left: 28px;
+ border-top: 1px solid transparent;
+ background: transparent url({@docRoot}assets/images/styles/disclosure_down.png)
+ no-repeat scroll 0 8px;
+ }
+
+ #archive-expando.expanded {
+ background-image: url({@docRoot}assets/images/styles/disclosure_up.png);
+ border-top: 1px solid #ccc;
+ }
+
#output {
color: #f44;
font-style: italic;
@@ -117,7 +138,7 @@ feature image or screenshots for your Google Play app listing.</p>
// Global constants
var MSG_INVALID_INPUT_IMAGE = 'Invalid screenshot provided. Screenshots must be PNG files '
- + 'matching the target device\'s screen resolution in either portrait or landscape.';
+ + 'matching the target device\'s screen aspect ratio in either portrait or landscape.';
var MSG_NO_INPUT_IMAGE = 'Drag a screenshot (in PNG format) from your desktop onto a '
+ 'target device above.'
var MSG_GENERATING_IMAGE = 'Generating device art&hellip;';
@@ -127,17 +148,44 @@ feature image or screenshots for your Google Play app listing.</p>
// Device manifest.
var DEVICES = [
{
+ id: 'nexus_4',
+ title: 'Nexus 4',
+ url: 'http://www.google.com/nexus/4/',
+ physicalSize: 4.7,
+ physicalHeight: 5.23,
+ density: 'XHDPI',
+ landRes: ['shadow', 'back', 'fore'],
+ landOffset: [349,214],
+ portRes: ['shadow', 'back', 'fore'],
+ portOffset: [213,350],
+ portSize: [768,1280]
+ },
+ {
id: 'nexus_7',
title: 'Nexus 7',
- url: 'http://www.android.com/devices/detail/nexus-7',
+ url: 'http://www.google.com/nexus/7/',
physicalSize: 7,
physicalHeight: 7.81,
- density: 213,
+ density: '213dpi',
landRes: ['shadow', 'back', 'fore'],
- landOffset: [363,260],
+ landOffset: [315,270],
portRes: ['shadow', 'back', 'fore'],
- portOffset: [265,341],
- portSize: [800,1280],
+ portOffset: [264,311],
+ portSize: [800,1280]
+ },
+ {
+ id: 'nexus_10',
+ title: 'Nexus 10',
+ url: 'http://www.google.com/nexus/10/',
+ physicalSize: 10,
+ physicalHeight: 7,
+ actualResolution: [1600,2560],
+ density: 'XHDPI',
+ landRes: ['shadow', 'back', 'fore'],
+ landOffset: [227,217],
+ portRes: ['shadow', 'back', 'fore'],
+ portOffset: [217,223],
+ portSize: [800,1280]
},
{
id: 'xoom',
@@ -145,12 +193,13 @@ feature image or screenshots for your Google Play app listing.</p>
url: 'http://www.google.com/phone/detail/motorola-xoom',
physicalSize: 10,
physicalHeight: 6.61,
- density: 160,
+ density: 'MDPI',
landRes: ['shadow', 'back', 'fore'],
landOffset: [218,191],
portRes: ['shadow', 'back', 'fore'],
portOffset: [199,200],
portSize: [800,1280],
+ archived: true
},
{
id: 'galaxy_nexus',
@@ -158,12 +207,13 @@ feature image or screenshots for your Google Play app listing.</p>
url: 'http://www.android.com/devices/detail/galaxy-nexus',
physicalSize: 4.65,
physicalHeight: 5.33,
- density: 320,
+ density: 'XHDPI',
landRes: ['shadow', 'back', 'fore'],
landOffset: [371,199],
portRes: ['shadow', 'back', 'fore'],
portOffset: [216,353],
portSize: [720,1280],
+ archived: true
},
{
id: 'nexus_s',
@@ -171,12 +221,13 @@ feature image or screenshots for your Google Play app listing.</p>
url: 'http://www.google.com/phone/detail/nexus-s',
physicalSize: 4.0,
physicalHeight: 4.88,
- density: 240,
+ density: 'HDPI',
landRes: ['shadow', 'back', 'fore'],
landOffset: [247,135],
portRes: ['shadow', 'back', 'fore'],
portOffset: [134,247],
portSize: [480,800],
+ archived: true
}
];
@@ -250,13 +301,23 @@ feature image or screenshots for your Google Play app listing.</p>
$('#output').html(MSG_NO_INPUT_IMAGE);
$('#frame-customizations').hide();
+ $('.device-list.archive').hide();
$('#output-shadow, #output-glare').click(function() {
- createFrame(g_currentDevice, g_currentImage);
+ createFrame();
});
// Build device list.
$.each(DEVICES, function() {
+ var resolution = this.actualResolution || this.portSize;
+ var scaleFactorText = '';
+ if (resolution[0] != this.portSize[0]) {
+ scaleFactorText = '<br>' + (100 * (this.portSize[0] / resolution[0])).toFixed(0) +
+ '% size output';
+ } else {
+ scaleFactorText = '<br>&nbsp;';
+ }
+
$('<li>')
.append($('<div>')
.addClass('thumb-container')
@@ -269,14 +330,26 @@ feature image or screenshots for your Google Play app listing.</p>
.html((this.url
? ('<a class="device-url" href="' + this.url + '">' + this.title + '</a>')
: this.title) +
- '<br>' + this.physicalSize + '" @ ' + this.density + 'dpi' +
- '<br>' + this.portSize[0] + 'x' + this.portSize[1]))
+ '<br>' + this.physicalSize + '" @ ' + this.density +
+ '<br>' + (resolution[0] + 'x' + resolution[1]) + scaleFactorText))
.data('deviceId', this.id)
- .appendTo('#device-list');
+ .appendTo(this.archived ? '.device-list.archive' : '.device-list.primary');
+ });
+
+ // Set up "older devices" expando.
+ $('#archive-expando').click(function() {
+ if ($(this).hasClass('expanded')) {
+ $(this).removeClass('expanded');
+ $('.device-list.archive').hide();
+ } else {
+ $(this).addClass('expanded');
+ $('.device-list.archive').show();
+ }
+ return false;
});
// Set up drag and drop.
- $('#device-list li')
+ $('.device-list li')
.live('dragover', function(evt) {
$(this).addClass('drag-hover');
evt.dataTransfer.dropEffect = 'link';
@@ -335,27 +408,19 @@ feature image or screenshots for your Google Play app listing.</p>
*/
function createFrame() {
var port;
- if (g_currentImage.naturalWidth == g_currentDevice.portSize[0] &&
- g_currentImage.naturalHeight == g_currentDevice.portSize[1]) {
- if (!g_currentDevice.portRes) {
- alert('No portrait frame is currently available for this device.');
- $('#output').html(MSG_NO_INPUT_IMAGE);
- return;
- }
+
+ var aspect1 = g_currentImage.naturalWidth / g_currentImage.naturalHeight;
+ var aspect2 = g_currentDevice.portSize[0] / g_currentDevice.portSize[1];
+
+ if (aspect1 == aspect2) {
port = true;
- } else if (g_currentImage.naturalWidth == g_currentDevice.portSize[1] &&
- g_currentImage.naturalHeight == g_currentDevice.portSize[0]) {
- if (!g_currentDevice.landRes) {
- alert('No landscape frame is currently available for this device.');
- $('#output').html(MSG_NO_INPUT_IMAGE);
- return;
- }
+ } else if (aspect1 == 1 / aspect2) {
port = false;
} else {
- alert('Screenshots for ' + g_currentDevice.title + ' must be ' +
- g_currentDevice.portSize[0] + 'x' + g_currentDevice.portSize[1] +
- ' or ' +
- g_currentDevice.portSize[1] + 'x' + g_currentDevice.portSize[0] + '.');
+ alert('The screenshot must have an aspect ratio of ' +
+ aspect2.toFixed(3) + ' or ' + (1 / aspect2).toFixed(3) +
+ ' (ideally ' + g_currentDevice.portSize[0] + 'x' + g_currentDevice.portSize[1] +
+ ' or ' + g_currentDevice.portSize[1] + 'x' + g_currentDevice.portSize[0] + ').');
$('#output').html(MSG_INVALID_INPUT_IMAGE);
return;
}
@@ -378,6 +443,9 @@ feature image or screenshots for your Google Play app listing.</p>
var width = resourceImages['back'].naturalWidth;
var height = resourceImages['back'].naturalHeight;
var offset = port ? g_currentDevice.portOffset : g_currentDevice.landOffset;
+ var size = port
+ ? g_currentDevice.portSize
+ : [g_currentDevice.portSize[1], g_currentDevice.portSize[0]];
var canvas = document.createElement('canvas');
canvas.width = width;
@@ -388,7 +456,9 @@ feature image or screenshots for your Google Play app listing.</p>
ctx.drawImage(resourceImages['shadow'], 0, 0);
}
ctx.drawImage(resourceImages['back'], 0, 0);
- ctx.drawImage(g_currentImage, offset[0], offset[1]);
+ ctx.fillStyle = '#000';
+ ctx.fillRect(offset[0], offset[1], size[0], size[1]);
+ ctx.drawImage(g_currentImage, offset[0], offset[1], size[0], size[1]);
if (resourceImages['fore'] && $('#output-glare').is(':checked')) {
ctx.drawImage(resourceImages['fore'], 0, 0);
}
diff --git a/docs/html/guide/faq/security.jd b/docs/html/guide/faq/security.jd
index 52ee0d9..a6e07c8 100644
--- a/docs/html/guide/faq/security.jd
+++ b/docs/html/guide/faq/security.jd
@@ -57,9 +57,7 @@ key</a>.</p>
<p>We appreciate researchers practicing responsible disclosure by emailing us
with a detailed summary of the issue and keeping the issue confidential while
users are at risk. In return, we will make sure to keep the researcher informed
-of our progress in issuing a fix and will properly credit the reporter(s) when
-we provide the patch. We will always move swiftly to mitigate or fix an
-externally-reported flaw and provide updates to users. </p>
+of our progress in issuing a fix. </p>
<a name="informed" id="informed"></a><h2>How can I stay informed about Android security?</h2>
diff --git a/docs/html/guide/google/gcm/gcm.jd b/docs/html/guide/google/gcm/gcm.jd
index f6fd697..edf285c 100644
--- a/docs/html/guide/google/gcm/gcm.jd
+++ b/docs/html/guide/google/gcm/gcm.jd
@@ -659,8 +659,10 @@ message sent by the application server. See <a href="adv.html#collapsible">Advan
<td><code>data</code></td>
<td>A JSON object whose fields represents the key-value pairs of the message's payload data. If present, the payload data it will be
included in the Intent as application data, with the key being the extra's name. For instance, <code>"data":{"score":"3x1"}</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>.
+
There is no limit on the number of key/value pairs, though there is a limit on the total size of the message (4kb). The values could be any JSON object, but we recommend using strings, since the values will be converted to strings in the GCM server anyway. If you want to include objects or other non-string data types (such as integers or booleans), you have to do the conversion to string yourself. Also note that the key cannot be a reserved word (<code>from</code> or any word starting with <code>google.</code>). To complicate things slightly, there are some reserved words (such as <code>collapse_key</code>) that are technically allowed in payload data. However, if the request also contains the word, the value in the request will overwrite the value in the payload data. Hence using words that are defined as field names in this table is not recommended, even in cases where they are technically allowed. Optional.</td>
+
</tr>
<tr>
<td><code>delay_while_idle</code></td>
@@ -701,8 +703,10 @@ sent. Optional. The default value is <code>false</code>, and must be a JSON bool
</tr>
<tr>
<td><code>data.&lt;key&gt;</code></td>
+
<td>Payload data, expressed as parameters prefixed with <code>data.</code> and suffixed as the key. For instance, a parameter of <code>data.score=3x1</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>. There is no limit on the number of key/value parameters, though there is a limit on the total size of the message. Also note that the key cannot be a reserved word (<code>from</code> or any word starting with
<code>google.</code>). To complicate things slightly, there are some reserved words (such as <code>collapse_key</code>) that are technically allowed in payload data. However, if the request also contains the word, the value in the request will overwrite the value in the payload data. Hence using words that are defined as field names in this table is not recommended, even in cases where they are technically allowed. Optional.</td>
+
</tr>
<tr>
<td><code>delay_while_idle</code></td>
@@ -912,13 +916,11 @@ Happens when the error code is <code>InvalidDataKey</code>.</dd>
</ul>
Check that the token you're sending inside the <code>Authorization</code> header is the correct API key associated with your project. You can check the validity of your API key by running the following command:<br/>
-
<pre># api_key=YOUR_API_KEY
# curl --header "Authorization: key=$api_key" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send -d "{\"registration_ids\":[\"ABC\"]}"</pre>
-
If you receive a 401 HTTP status code, your API key is not valid. Otherwise you should see something like this:<br/>
<pre>
diff --git a/docs/html/guide/practices/security.jd b/docs/html/guide/practices/security.jd
index ce59a9d..36eeff8 100644
--- a/docs/html/guide/practices/security.jd
+++ b/docs/html/guide/practices/security.jd
@@ -1,11 +1,11 @@
-page.title=Designing for Security
+page.title=Designing for Security
@jd:body
<div id="qv-wrapper">
<div id="qv">
<h2>In this document</h2>
<ol>
-<li><a href="#Dalvik">Using Davlik Code</a></li>
+<li><a href="#Dalvik">Using Dalvik Code</a></li>
<li><a href="#Native">Using Native Code</a></li>
<li><a href="#Data">Storing Data</a></li>
<li><a href="#IPC">Using IPC</a></li>
diff --git a/docs/html/guide/topics/manifest/activity-element.jd b/docs/html/guide/topics/manifest/activity-element.jd
index 844be11..2aedaec 100644
--- a/docs/html/guide/topics/manifest/activity-element.jd
+++ b/docs/html/guide/topics/manifest/activity-element.jd
@@ -218,7 +218,8 @@ separated by '{@code |}' &mdash; for example, "{@code locale|navigation|orientat
<td>"{@code uiMode}"</td>
<td>The user interface mode has changed &mdash; this can be caused when the user places the
device into a desk/car dock or when the the night mode changes. See {@link
-android.app.UiModeManager}. <em>Introduced in API Level 8</em>.</td>
+android.app.UiModeManager}.
+ <em>Added in API level 8</em>.</td>
</tr><tr>
<td>"{@code orientation}"</td>
<td>The screen orientation has changed &mdash; the user has rotated the device.
@@ -246,7 +247,12 @@ smallestWidth configuration</a>. However, if your application targets API level
your activity always handles this configuration change itself (this configuration change does not
restart your activity, even when running on an Android 3.2 or higher device).
<p><em>Added in API level 13.</em></p></td>
- </tr>
+ </tr><tr>
+ <td>"{@code layoutDirection}"</td>
+ <td>The layout direction has changed. For example, changing from left-to-right (LTR)
+ to right-to-left (RTL).
+ <em>Added in API level 17.</em></td>
+ </tr>
</table>
<p>
diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd
index 2105a50..42cfdd5 100644
--- a/docs/html/guide/topics/manifest/application-element.jd
+++ b/docs/html/guide/topics/manifest/application-element.jd
@@ -23,6 +23,7 @@ parent.link=manifest-intro.html
android:<a href="#persistent">persistent</a>=["true" | "false"]
android:<a href="#proc">process</a>="<i>string</i>"
android:<a href="#restoreany">restoreAnyVersion</a>=["true" | "false"]
+ android:<a href="#supportsrtl">supportsRtl</a>=["true" | "false"]
android:<a href="#aff">taskAffinity</a>="<i>string</i>"
android:<a href="#theme">theme</a>="<i>resource or theme</i>"
android:<a href="#uioptions">uiOptions</a>=["none" | "splitActionBarWhenNarrow"] &gt;
@@ -271,7 +272,7 @@ applications, reducing resource usage.
</p></dd>
<dt><a name="restoreany"></a>{@code android:restoreAnyVersion}</dt>
-<dd>Indicate that the application is prepared to attempt a restore of any
+<dd>Indicates that the application is prepared to attempt a restore of any
backed-up data set, even if the backup was stored by a newer version
of the application than is currently installed on the device. Setting
this attribute to {@code true} will permit the Backup Manager to
@@ -281,6 +282,21 @@ incompatible. <em>Use with caution!</em>
<p>The default value of this attribute is {@code false}.
</p></dd>
+<dt><a name="supportsrtl"></a>{@code android:supportsRtl}</dt>
+<dd>Declares whether your application is willing to support right-to-left (RTL) layouts.
+<p>If set to {@code true} and <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
+>{@code targetSdkVersion}</a> is set to 17 or higher, various RTL APIs will be
+activated and used by the system so your app can display RTL layouts.
+If set to {@code false} or if <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
+>{@code targetSdkVersion}</a> is set to 16 or lower, the RTL APIs will be ignored
+or will have no effect and your app will behave the same regardless of the layout
+direction associated to the user's Locale choice (your layouts will always be left-to-right).
+
+<p>The default value of this attribute is {@code false}.</p>
+
+<p>This attribute was added in API level 17.</p>
+</dd>
+
<dt><a name="aff"></a>{@code android:taskAffinity}</dt>
<dd>An affinity name that applies to all activities within the application,
except for those that set a different affinity with their own
diff --git a/docs/html/guide/topics/manifest/permission-element.jd b/docs/html/guide/topics/manifest/permission-element.jd
index c256fb1..a23fb4b 100644
--- a/docs/html/guide/topics/manifest/permission-element.jd
+++ b/docs/html/guide/topics/manifest/permission-element.jd
@@ -111,7 +111,7 @@ The value can be set to one of the following strings:
<td>"{@code signatureOrSystem}"</td>
<td>A permission that the system grants only to applications that are
in the Android system image <em>or</em> that are signed with the same
- certificates as those in the system image. Please avoid using this
+ certificate as the application that declared the permission. Please avoid using this
option, as the {@code signature} protection level should be sufficient
for most needs and works regardless of exactly where applications are
installed. The "{@code signatureOrSystem}"
diff --git a/docs/html/guide/topics/manifest/provider-element.jd b/docs/html/guide/topics/manifest/provider-element.jd
index 4558800..6cf6843 100644
--- a/docs/html/guide/topics/manifest/provider-element.jd
+++ b/docs/html/guide/topics/manifest/provider-element.jd
@@ -5,7 +5,9 @@ parent.link=manifest-intro.html
<dl class="xml">
<dt>syntax:</dt>
-<dd><pre class="stx">&lt;provider android:<a href="#auth">authorities</a>="<i>list</i>"
+<dd>
+<pre class="stx">
+&lt;provider android:<a href="#auth">authorities</a>="<i>list</i>"
android:<a href="#enabled">enabled</a>=["true" | "false"]
android:<a href="#exported">exported</a>=["true" | "false"]
android:<a href="#gprmsn">grantUriPermissions</a>=["true" | "false"]
@@ -20,10 +22,13 @@ parent.link=manifest-intro.html
android:<a href="#sync">syncable</a>=["true" | "false"]
android:<a href="#wprmsn">writePermission</a>="<i>string</i>" &gt;
. . .
-&lt;/provider&gt;</pre></dd>
+&lt;/provider&gt;</pre>
+</dd>
<dt>contained in:</dt>
-<dd><code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code></dd>
+<dd>
+ <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code>
+</dd>
<dt>can contain:</dt>
<dd><code><a href="{@docRoot}guide/topics/manifest/meta-data-element.html">&lt;meta-data&gt;</a></code>
@@ -31,58 +36,67 @@ parent.link=manifest-intro.html
<br/><code><a href="{@docRoot}guide/topics/manifest/path-permission-element.html">&lt;path-permission&gt;</a></code></dd>
<dt>description:</dt>
-<dd>Declares a content provider &mdash; a subclass of
-{@link android.content.ContentProvider} &mdash; that supplies structured
-access to data managed by the application. All content providers that
-are part of the application must be represented by {@code &lt;provider&gt;}
-elements in the manifest file. The system cannot see, and therefore will
-not run, any that are not declared. (You need to declare only
-those content providers that you develop as part of your application,
-not those developed by others that your application uses.)
-
-<p>
-The Android system identifies content providers by the authority part
- of a {@code content:} URI. For example, suppose that the following URI
-is passed to <code>{@link android.content.ContentResolver#query
-ContentResolver.query()}</code>:
-
-<p style="margin-left: 2em">{@code content://com.example.project.healthcareprovider/nurses/rn}</p>
-
-<p>
-The {@code content:} scheme identifies the data as belonging to a content
-provider and the authority ({@code com.example.project.healthcareprovider})
-identifies the particular provider. The authority therefore must be unique.
-Typically, as in this example, it's the fully qualified name of a
-ContentProvider subclass. The path part of a URI may be used by a content
-provider to identify particular data subsets, but those paths are not
-declared in the manifest.
-</p>
-
-<p>
-For information on using and developing content providers, see a separate document,
-<a href="{@docRoot}guide/topics/providers/content-providers.html">Content Providers</a>.
-</p></dd>
+<dd>
+ Declares a content provider component. A content provider is a subclass of
+ {@link android.content.ContentProvider} that supplies structured access to data managed by the
+ application. All content providers in your application must be defined in a
+ {@code &lt;provider&gt;} element in the manifest file; otherwise, the system is unaware of them
+ and doesn't run them.
+ <p>
+ You only declare content providers that are part of your application. Content providers in
+ other applications that you use in your application should not be declared.
+ </p>
+ <p>
+ The Android system stores references to content providers according to an <b>authority</b>
+ string, part of the provider's <b>content URI</b>. For example, suppose you want to
+ access a content provider that stores information about health care professionals. To do
+ this, you call the method
+ {@link android.content.ContentResolver#query ContentResolver.query()}, which among other
+ arguments takes a URI that identifies the provider:
+ </p>
+<pre>
+content://com.example.project.healthcareprovider/nurses/rn
+</pre>
+ <p>
+ The <code>content:</code> <b>scheme</b> identifies the URI as a content URI pointing to
+ an Android content provider. The authority
+ <code>com.example.project.healthcareprovider</code> identifies the provider itself; the
+ Android system looks up the authority in its list of known providers and their authorities.
+ The substring <code>nurses/rn</code> is a <b>path</b>, which the content provider can use
+ to identify subsets of the provider data.
+ </p>
+ <p>
+ Notice that when you define your provider in the <code>&lt;provider&gt;</code> element, you
+ don't include the scheme or the path in the <code>android:name</code> argument, only the
+ authority.
+ </p>
+ <p>
+ For information on using and developing content providers, see the API Guide,
+ <a href="{@docRoot}guide/topics/providers/content-providers.html">Content Providers</a>.
+ </p>
+</dd>
<dt>attributes:</dt>
-<dd><dl class="attr">
-<dt><a name="auth"></a>{@code android:authorities}</dt>
-<dd>A list of one or more URI authorities that identify data under the purview
-of the content provider.
-Multiple authorities are listed by separating their names with a semicolon.
-To avoid conflicts, authority names should use a Java-style naming convention
-(such as {@code com.example.provider.cartoonprovider}). Typically, it's the name
-of the ContentProvider subclass.
-
-<p>
-There is no default. At least one authority must be specified.
-</p></dd>
-
-<dt><a name="enabled"></a>{@code android:enabled}</dt>
-<dd>Whether or not the content provider can be instantiated by the system &mdash;
-"{@code true}" if it can be, and "{@code false}" if not. The default value
-is "{@code true}".
-
-<p>
+<dd>
+ <dl class="attr">
+ <dt><a name="auth"></a>{@code android:authorities}</dt>
+ <dd>
+ A list of one or more URI authorities that identify data offered by the content provider.
+ Multiple authorities are listed by separating their names with a semicolon.
+ To avoid conflicts, authority names should use a Java-style naming convention
+ (such as {@code com.example.provider.cartoonprovider}). Typically, it's the name
+ of the {@link android.content.ContentProvider} subclass that implements the provider
+ <p>
+ There is no default. At least one authority must be specified.
+ </p>
+ </dd>
+
+ <dt><a name="enabled"></a>{@code android:enabled}</dt>
+ <dd>Whether or not the content provider can be instantiated by the system &mdash;
+ "{@code true}" if it can be, and "{@code false}" if not. The default value
+ is "{@code true}".
+
+ <p>
The <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> element has its own
<code><a href="{@docRoot}guide/topics/manifest/application-element.html#enabled">enabled</a></code> attribute that applies to all
application components, including content providers. The
@@ -93,16 +107,37 @@ are by default) for the content provider to be enabled. If either is
</p></dd>
<dt><a name="exported"></a>{@code android:exported}</dt>
-<dd>Whether or not the content provider can be used by components of other
-applications &mdash; "{@code true}" if it can be, and "{@code false}" if not.
-If "{@code false}", the provider is available only to components of the
-same application or applications with the same user ID. The default value
-is "{@code true}".
-
-<p>
-You can export a content provider but still limit access to it with the
-<code><a href="{@docRoot}guide/topics/manifest/provider-element.html#prmsn">permission</a></code> attribute.
-</p></dd>
+<dd>
+ Whether the content provider is available for other applications to use:
+ <ul>
+ <li>
+ <code>true</code>: The provider is available to other applications. Any application can
+ use the provider's content URI to access it, subject to the permissions specified for
+ the provider.
+ </li>
+ <li>
+ <code>false</code>: The provider is not available to other applications. Set
+ <code>android:exported="false"</code> to limit access to the provider to your
+ applications. Only applications that have the same user ID (UID) as the provider will
+ have access to it.
+ </li>
+ </ul>
+ <p>
+ The default value is <code>"true"</code> for applications that set either
+<code><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">android:minSdkVersion</a></code>
+ or
+<code><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">android:targetSdkVersion</a></code> to
+ <code>"16"</code> or lower. For applications that
+ set either of these attributes to <code>"17"</code> or higher, the default is
+ <code>"false"</code>.
+ </p>
+ <p>
+ You can set <code>android:exported="false"</code> and still limit access to your
+ provider by setting permissions with the
+ <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#prmsn">permission</a></code>
+ attribute.
+ </p>
+</dd>
<dt><a name="gprmsn"></a>{@code android:grantUriPermissions}</dt>
<dd>Whether or not those who ordinarily would not have permission to
diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd
index a111356..10b5a33 100644
--- a/docs/html/guide/topics/manifest/uses-feature-element.jd
+++ b/docs/html/guide/topics/manifest/uses-feature-element.jd
@@ -561,7 +561,7 @@ is sensitive to delays or lag in sound input or output.</td>
</td>
</tr>
<tr>
- <td rowspan="4">Camera</td>
+ <td rowspan="5">Camera</td>
<td><code>android.hardware.camera</code></td>
<td>The application uses the device's camera. If the device supports
multiple cameras, the application uses the camera that facing
@@ -583,6 +583,12 @@ is sensitive to delays or lag in sound input or output.</td>
<td><code>android.hardware.camera.front</code></td>
<td>Subfeature. The application uses a front-facing camera on the device.</td>
</tr>
+<tr>
+ <td><code>android.hardware.camera.any</code></td>
+ <td>The application uses at least one camera facing in any direction. Use this
+in preference to <code>android.hardware.camera</code> if a back-facing camera is
+not required.</td>
+</tr>
<tr>
<td rowspan="3">Location</td>
diff --git a/docs/html/guide/topics/providers/content-provider-basics.jd b/docs/html/guide/topics/providers/content-provider-basics.jd
index 8c47ad7..527e713 100644
--- a/docs/html/guide/topics/providers/content-provider-basics.jd
+++ b/docs/html/guide/topics/providers/content-provider-basics.jd
@@ -2,9 +2,7 @@ page.title=Content Provider Basics
@jd:body
<div id="qv-wrapper">
<div id="qv">
-
-
- <!-- In this document -->
+<!-- In this document -->
<h2>In this document</h2>
<ol>
<li>
@@ -238,15 +236,11 @@ page.title=Content Provider Basics
</p>
<p>
For example, to get a list of the words and their locales from the User Dictionary Provider,
- you call {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
- ContentResolver.query()}.
- The {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
- query()} method calls the
- {@link android.content.ContentProvider#query(Uri, String[], String, String[], String)
- ContentProvider.query()} method defined by the User Dictionary Provider. The following lines
- of code show a
- {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
- ContentResolver.query()} call:
+ you call {@link android.content.ContentResolver#query ContentResolver.query()}.
+ The {@link android.content.ContentResolver#query query()} method calls the
+ {@link android.content.ContentProvider#query ContentProvider.query()} method defined by the
+ User Dictionary Provider. The following lines of code show a
+ {@link android.content.ContentResolver#query ContentResolver.query()} call:
<p>
<pre>
// Queries the user dictionary and returns results
@@ -259,7 +253,7 @@ mCursor = getContentResolver().query(
</pre>
<p>
Table 2 shows how the arguments to
- {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
+ {@link android.content.ContentResolver#query
query(Uri,projection,selection,selectionArgs,sortOrder)} match an SQL SELECT statement:
</p>
<p class="table-caption">
@@ -344,7 +338,7 @@ content://user_dictionary/words
<code>4</code> from user dictionary, you can use this content URI:
</p>
<pre>
-Uri singleUri = ContentUri.withAppendedId(UserDictionary.Words.CONTENT_URI,4);
+Uri singleUri = ContentUris.withAppendedId(UserDictionary.Words.CONTENT_URI,4);
</pre>
<p>
You often use id values when you've retrieved a set of rows and then want to update or delete
@@ -354,7 +348,7 @@ Uri singleUri = ContentUri.withAppendedId(UserDictionary.Words.CONTENT_URI,4);
<strong>Note:</strong> The {@link android.net.Uri} and {@link android.net.Uri.Builder} classes
contain convenience methods for constructing well-formed Uri objects from strings. The
{@link android.content.ContentUris} contains convenience methods for appending id values to
- a URI. The previous snippet uses {@link android.content.ContentUris#withAppendedId(Uri, long)
+ a URI. The previous snippet uses {@link android.content.ContentUris#withAppendedId
withAppendedId()} to append an id to the UserDictionary content URI.
</p>
@@ -367,10 +361,9 @@ Uri singleUri = ContentUri.withAppendedId(UserDictionary.Words.CONTENT_URI,4);
</p>
<p class="note">
For the sake of clarity, the code snippets in this section call
- {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
- ContentResolver.query()} on the "UI thread"". In actual code, however, you should
- do queries asynchronously on a separate thread. One way to do this is to use the
- {@link android.content.CursorLoader} class, which is described
+ {@link android.content.ContentResolver#query ContentResolver.query()} on the "UI thread"". In
+ actual code, however, you should do queries asynchronously on a separate thread. One way to do
+ this is to use the {@link android.content.CursorLoader} class, which is described
in more detail in the <a href="{@docRoot}guide/components/loaders.html">
Loaders</a> guide. Also, the lines of code are snippets only; they don't show a complete
application.
@@ -391,8 +384,8 @@ Uri singleUri = ContentUri.withAppendedId(UserDictionary.Words.CONTENT_URI,4);
To retrieve data from a provider, your application needs "read access permission" for the
provider. You can't request this permission at run-time; instead, you have to specify that
you need this permission in your manifest, using the
- <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">
- &lt;uses-permission&gt;</a></code> element and the exact permission name defined by the
+<code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></code>
+ element and the exact permission name defined by the
provider. When you specify this element in your manifest, you are in effect "requesting" this
permission for your application. When users install your application, they implicitly grant
this request.
@@ -436,10 +429,9 @@ String[] mSelectionArgs = {""};
</pre>
<p>
The next snippet shows how to use
- {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
- ContentResolver.query()}, using the User Dictionary Provider as an example.
- A provider client query is similar to an SQL query, and it contains a set of columns to return,
- a set of selection criteria, and a sort order.
+ {@link android.content.ContentResolver#query ContentResolver.query()}, using the User Dictionary
+ Provider as an example. A provider client query is similar to an SQL query, and it contains a
+ set of columns to return, a set of selection criteria, and a sort order.
</p>
<p>
The set of columns that the query should return is called a <strong>projection</strong>
@@ -448,9 +440,9 @@ String[] mSelectionArgs = {""};
<p>
The expression that specifies the rows to retrieve is split into a selection clause and
selection arguments. The selection clause is a combination of logical and Boolean expressions,
- column names, and values (the variable <code>mSelection</code>). If you specify the replaceable
- parameter <code>?</code> instead of a value, the query method retrieves the value from the
- selection arguments array (the variable <code>mSelectionArgs</code>).
+ column names, and values (the variable <code>mSelectionClause</code>). If you specify the
+ replaceable parameter <code>?</code> instead of a value, the query method retrieves the value
+ from the selection arguments array (the variable <code>mSelectionArgs</code>).
</p>
<p>
In the next snippet, if the user doesn't enter a word, the selection clause is set to
@@ -517,7 +509,7 @@ if (null == mCursor) {
This query is analogous to the SQL statement:
</p>
<pre>
-SELECT _ID, word, frequency, locale FROM words WHERE word = &lt;userinput&gt; ORDER BY word ASC;
+SELECT _ID, word, locale FROM words WHERE word = &lt;userinput&gt; ORDER BY word ASC;
</pre>
<p>
In this SQL statement, the actual column names are used instead of contract class constants.
@@ -575,16 +567,15 @@ selectionArgs[0] = mUserInput;
<!-- Displaying the results -->
<h3 id="DisplayResults">Displaying query results</h3>
<p>
- The {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
- ContentResolver.query()} client method always returns a {@link android.database.Cursor}
- containing the columns specified by the query's projection for the rows that match the query's
- selection criteria. A {@link android.database.Cursor} object provides random read access to the
- rows and columns it contains. Using {@link android.database.Cursor} methods,
- you can iterate over the rows in the results, determine the data type of each column, get the
- data out of a column, and examine other properties of the results. Some
- {@link android.database.Cursor} implementations automatically update the object when the
- provider's data changes, or trigger methods in an observer object when the
- {@link android.database.Cursor} changes, or both.
+ The {@link android.content.ContentResolver#query ContentResolver.query()} client method always
+ returns a {@link android.database.Cursor} containing the columns specified by the query's
+ projection for the rows that match the query's selection criteria. A
+ {@link android.database.Cursor} object provides random read access to the rows and columns it
+ contains. Using {@link android.database.Cursor} methods, you can iterate over the rows in the
+ results, determine the data type of each column, get the data out of a column, and examine other
+ properties of the results. Some {@link android.database.Cursor} implementations automatically
+ update the object when the provider's data changes, or trigger methods in an observer object
+ when the {@link android.database.Cursor} changes, or both.
</p>
<p class="note">
<strong>Note:</strong> A provider may restrict access to columns based on the nature of the
@@ -594,7 +585,7 @@ selectionArgs[0] = mUserInput;
<p>
If no rows match the selection criteria, the provider
returns a {@link android.database.Cursor} object for which
- {@link android.database.Cursor#getCount() Cursor.getCount()} is 0 (an empty cursor).
+ {@link android.database.Cursor#getCount Cursor.getCount()} is 0 (an empty cursor).
</p>
<p>
If an internal error occurs, the results of the query depend on the particular provider. It may
@@ -685,8 +676,8 @@ if (mCursor != null) {
<p>
{@link android.database.Cursor} implementations contain several "get" methods for
retrieving different types of data from the object. For example, the previous snippet
- uses {@link android.database.Cursor#getString(int) getString()}. They also have a
- {@link android.database.Cursor#getType(int) getType()} method that returns a value indicating
+ uses {@link android.database.Cursor#getString getString()}. They also have a
+ {@link android.database.Cursor#getType getType()} method that returns a value indicating
the data type of the column.
</p>
@@ -713,17 +704,16 @@ if (mCursor != null) {
</p>
<p>
To get the permissions needed to access a provider, an application requests them with a
- <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">
- &lt;uses-permission&gt;</a></code> element in its manifest file.
- When the Android Package Manager installs the application, a user must approve all of the
- permissions the application requests. If the user approves all of them, Package Manager
- continues the installation; if the user doesn't approve them, Package Manager
+<code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></code>
+ element in its manifest file. When the Android Package Manager installs the application, a user
+ must approve all of the permissions the application requests. If the user approves all of them,
+ Package Manager continues the installation; if the user doesn't approve them, Package Manager
aborts the installation.
</p>
<p>
The following
- <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">
- &lt;uses-permission&gt;</a></code> element requests read access to the User Dictionary Provider:
+<code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></code>
+ element requests read access to the User Dictionary Provider:
</p>
<pre>
&lt;uses-permission android:name="android.permission.READ_USER_DICTIONARY"&gt;
@@ -746,7 +736,7 @@ if (mCursor != null) {
<h3 id="Inserting">Inserting data</h3>
<p>
To insert data into a provider, you call the
- {@link android.content.ContentResolver#insert(Uri,ContentValues) ContentResolver.insert()}
+ {@link android.content.ContentResolver#insert ContentResolver.insert()}
method. This method inserts a new row into the provider and returns a content URI for that row.
This snippet shows how to insert a new word into the User Dictionary Provider:
</p>
@@ -777,8 +767,7 @@ mNewUri = getContentResolver().insert(
The data for the new row goes into a single {@link android.content.ContentValues} object, which
is similar in form to a one-row cursor. The columns in this object don't need to have the
same data type, and if you don't want to specify a value at all, you can set a column
- to <code>null</code> using {@link android.content.ContentValues#putNull(String)
- ContentValues.putNull()}.
+ to <code>null</code> using {@link android.content.ContentValues#putNull ContentValues.putNull()}.
</p>
<p>
The snippet doesn't add the <code>_ID</code> column, because this column is maintained
@@ -799,17 +788,16 @@ content://user_dictionary/words/&lt;id_value&gt;
</p>
<p>
To get the value of <code>_ID</code> from the returned {@link android.net.Uri}, call
- {@link android.content.ContentUris#parseId(Uri) ContentUris.parseId()}.
+ {@link android.content.ContentUris#parseId ContentUris.parseId()}.
</p>
<h3 id="Updating">Updating data</h3>
<p>
To update a row, you use a {@link android.content.ContentValues} object with the updated
values just as you do with an insertion, and selection criteria just as you do with a query.
The client method you use is
- {@link android.content.ContentResolver#update(Uri, ContentValues, String, String[])
- ContentResolver.update()}. You only need to add values to the
- {@link android.content.ContentValues} object for columns you're updating. If you want to clear
- the contents of a column, set the value to <code>null</code>.
+ {@link android.content.ContentResolver#update ContentResolver.update()}. You only need to add
+ values to the {@link android.content.ContentValues} object for columns you're updating. If you
+ want to clear the contents of a column, set the value to <code>null</code>.
</p>
<p>
The following snippet changes all the rows whose locale has the language "en" to a
@@ -842,9 +830,8 @@ mRowsUpdated = getContentResolver().update(
</pre>
<p>
You should also sanitize user input when you call
- {@link android.content.ContentResolver#update(Uri, ContentValues, String, String[])
- ContentResolver.update()}. To learn more about this, read the section
- <a href="#Injection">Protecting against malicious input</a>.
+ {@link android.content.ContentResolver#update ContentResolver.update()}. To learn more about
+ this, read the section <a href="#Injection">Protecting against malicious input</a>.
</p>
<h3 id="Deleting">Deleting data</h3>
<p>
@@ -873,9 +860,8 @@ mRowsDeleted = getContentResolver().delete(
</pre>
<p>
You should also sanitize user input when you call
- {@link android.content.ContentResolver#delete(Uri, String, String[])
- ContentResolver.delete()}. To learn more about this, read the section
- <a href="#Injection">Protecting against malicious input</a>.
+ {@link android.content.ContentResolver#delete ContentResolver.delete()}. To learn more about
+ this, read the section <a href="#Injection">Protecting against malicious input</a>.
</p>
<!-- Provider Data Types -->
<h2 id="DataTypes">Provider Data Types</h2>
@@ -907,7 +893,7 @@ mRowsDeleted = getContentResolver().delete(
The data types for the User Dictionary Provider are listed in the reference documentation
for its contract class {@link android.provider.UserDictionary.Words} (contract classes are
described in the section <a href="#ContractClasses">Contract Classes</a>).
- You can also determine the data type by calling {@link android.database.Cursor#getType(int)
+ You can also determine the data type by calling {@link android.database.Cursor#getType
Cursor.getType()}.
</p>
<p>
@@ -918,7 +904,7 @@ mRowsDeleted = getContentResolver().delete(
data structures or files. For example, the {@link android.provider.ContactsContract.Data}
table in the Contacts Provider uses MIME types to label the type of contact data stored in each
row. To get the MIME type corresponding to a content URI, call
- {@link android.content.ContentResolver#getType(Uri) ContentResolver.getType()}.
+ {@link android.content.ContentResolver#getType ContentResolver.getType()}.
</p>
<p>
The section <a href="#MIMETypeReference">MIME Type Reference</a> describes the
@@ -935,8 +921,7 @@ mRowsDeleted = getContentResolver().delete(
<li>
<a href="#Batch">Batch access</a>: You can create a batch of access calls with methods in
the {@link android.content.ContentProviderOperation} class, and then apply them with
- {@link android.content.ContentResolver#applyBatch(String, ArrayList)
- ContentResolver.applyBatch()}.
+ {@link android.content.ContentResolver#applyBatch ContentResolver.applyBatch()}.
</li>
<li>
Asynchronous queries: You should do queries in a separate thread. One way to do this is to
@@ -963,11 +948,10 @@ mRowsDeleted = getContentResolver().delete(
To access a provider in "batch mode",
you create an array of {@link android.content.ContentProviderOperation} objects and then
dispatch them to a content provider with
- {@link android.content.ContentResolver#applyBatch(String, ArrayList)
- ContentResolver.applyBatch()}. You pass the content provider's <em>authority</em> to this
- method, rather than a particular content URI, which allows each
- {@link android.content.ContentProviderOperation} object in the array to work against a
- different table. A call to {@link android.content.ContentResolver#applyBatch(String, ArrayList)
+ {@link android.content.ContentResolver#applyBatch ContentResolver.applyBatch()}. You pass the
+ content provider's <em>authority</em> to this method, rather than a particular content URI.
+ This allows each {@link android.content.ContentProviderOperation} object in the array to work
+ against a different table. A call to {@link android.content.ContentResolver#applyBatch
ContentResolver.applyBatch()} returns an array of results.
</p>
<p>
@@ -1028,14 +1012,13 @@ mRowsDeleted = getContentResolver().delete(
</p>
<p>
A provider defines URI permissions for content URIs in its manifest, using the
- <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">
- android:grantUriPermission</a></code>
- attribute of the <a href="{@docRoot}guide/topics/manifest/provider-element.html">
- {@code &lt;provider&gt;}</a>
+<code><a href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">android:grantUriPermission</a></code>
+ attribute of the
+<code><a href="{@docRoot}guide/topics/manifest/provider-element.html">&lt;provider&gt;</a></code>
element, as well as the
- <a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">{@code
- &lt;grant-uri-permission&gt;}</a> child element of the
- <a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code &lt;provider&gt;}</a>
+<code><a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">&lt;grant-uri-permission&gt;</a></code>
+ child element of the
+<code><a href="{@docRoot}guide/topics/manifest/provider-element.html">&lt;provider&gt;</a></code>
element. The URI permissions mechanism is explained in more detail in the
<a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a> guide,
in the section "URI Permissions".
@@ -1053,7 +1036,7 @@ mRowsDeleted = getContentResolver().delete(
Your application sends an intent containing the action
{@link android.content.Intent#ACTION_PICK} and the "contacts" MIME type
{@link android.provider.ContactsContract.RawContacts#CONTENT_ITEM_TYPE}, using the
- method {@link android.app.Activity#startActivityForResult(Intent, int)
+ method {@link android.app.Activity#startActivityForResult
startActivityForResult()}.
</li>
<li>
@@ -1063,7 +1046,7 @@ mRowsDeleted = getContentResolver().delete(
<li>
In the selection activity, the user selects a
contact to update. When this happens, the selection activity calls
- {@link android.app.Activity#setResult(int, Intent) setResult(resultcode, intent)}
+ {@link android.app.Activity#setResult setResult(resultcode, intent)}
to set up a intent to give back to your application. The intent contains the content URI
of the contact the user selected, and the "extras" flags
{@link android.content.Intent#FLAG_GRANT_READ_URI_PERMISSION}. These flags grant URI
@@ -1073,7 +1056,7 @@ mRowsDeleted = getContentResolver().delete(
</li>
<li>
Your activity returns to the foreground, and the system calls your activity's
- {@link android.app.Activity#onActivityResult(int, int, Intent) onActivityResult()}
+ {@link android.app.Activity#onActivityResult onActivityResult()}
method. This method receives the result intent created by the selection activity in
the People app.
</li>
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd
index cf2c03e..b311b7f 100644
--- a/docs/html/guide/topics/resources/providing-resources.jd
+++ b/docs/html/guide/topics/resources/providing-resources.jd
@@ -329,6 +329,39 @@ your application for other languages.</p>
indicates the current locale.</p>
</td>
</tr>
+ <tr id="LayoutDirectionQualifier">
+ <td>Layout Direction</td>
+ <td><code>ldrtl</code><br/>
+ <code>ldltr</code><br/>
+ </td>
+ <td><p>The layout direction of your application. {@code ldrtl} means "layout-direction-right-to-left".
+ {@code ldltr} means "layout-direction-left-to-right" and is the default implicit value.
+ </p>
+ <p>This can apply to any resource such as layouts, drawables, or values.
+ </p>
+ <p>For example, if you want to provide some specific layout for the Arabic language and some
+ generic layout for any other "right-to-left" language (like Persian or Hebrew) then you would have:
+ </p>
+<pre class="classic no-pretty-print">
+res/
+ layout/ <span style="color:black">
+ main.xml </span>(Default layout)
+ layout-ar/ <span style="color:black">
+ main.xml </span>(Specific layout for Arabic)
+ layout-ldrtl/ <span style="color:black">
+ main.xml </span>(Any "right-to-left" language, except
+ for Arabic, because the "ar" language qualifier
+ has a higher precedence.)
+</pre>
+ <p class="note"><strong>Note:</strong> To enable right-to-left layout features
+ for your app, you must set <a
+ href="{@docRoot}guide/topics/manifest/application-element.html#supportsrtl">{@code
+ supportsRtl}</a> to {@code "true"} and set <a
+ href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
+ >{@code targetSdkVersion}</a> to 17 or higher.</p>
+ <p><em>Added in API level 17.</em></p>
+ </td>
+ </tr>
<tr id="SmallestScreenWidthQualifier">
<td>smallestWidth</td>
<td><code>sw&lt;N&gt;dp</code><br/><br/>
diff --git a/docs/html/guide/topics/resources/string-resource.jd b/docs/html/guide/topics/resources/string-resource.jd
index 5f5484e..da410a4 100644
--- a/docs/html/guide/topics/resources/string-resource.jd
+++ b/docs/html/guide/topics/resources/string-resource.jd
@@ -13,8 +13,7 @@ your application with strings:</p>
<dt><a href="#StringArray">String Array</a></dt>
<dd>XML resource that provides an array of strings.</dd>
<dt><a href="#Plurals">Quantity Strings (Plurals)</a></dt>
- <dd>XML resource that carries different strings for different quantities
- of the same word or phrase.</dd>
+ <dd>XML resource that carries different strings for pluralization.</dd>
</dl>
<p>All strings are capable of applying some styling markup and formatting arguments. For
@@ -231,10 +230,19 @@ so Android provides you with methods such as
{@link android.content.res.Resources#getQuantityString(int,int) getQuantityString()} to select
the appropriate resource for you.
-<p>Note that the selection is made based on grammatical necessity. A string for <code>zero</code>
-in English will be ignored even if the quantity is 0, because 0 isn't grammatically different
-from 2, or any other number except 1 ("zero books", "one book", "two books", and so on).
-Don't be misled either by the fact that, say, <code>two</code> sounds like it could only apply to
+<p>Although historically called "quantity strings" (and still called that in API), quantity
+strings should <i>only</i> be used for plurals. It would be a mistake to use quantity strings to
+implement something like Gmail's "Inbox" versus "Inbox (12)" when there are unread messages, for
+example. It might seem convenient to use quantity strings instead of an {@code if} statement,
+but it's important to note that some languages (such as Chinese) don't make these grammatical
+distinctions at all, so you'll always get the <code>other</code> string.
+
+<p>The selection of which string to use is made solely based on grammatical <i>necessity</i>.
+In English, a string for <code>zero</code> will be ignored even if the quantity is 0, because 0
+isn't grammatically different from 2, or any other number except 1 ("zero books", "one book",
+"two books", and so on).
+
+<p>Don't be misled either by the fact that, say, <code>two</code> sounds like it could only apply to
the quantity 2: a language may require that 2, 12, 102 (and so on) are all treated like one
another but differently to other quantities. Rely on your translator to know what distinctions
their language actually insists upon.
@@ -313,7 +321,7 @@ values, with non-exhaustive examples in parentheses:
<td>{@code one}</td><td>When the language requires special treatment of numbers like one (as with the number 1 in English and most other languages; in Russian, any number ending in 1 but not ending in 11 is in this class).</td>
</tr>
<tr>
- <td>{@code two}</td><td>When the language requires special treatment of numbers like two (as in Welsh).</td>
+ <td>{@code two}</td><td>When the language requires special treatment of numbers like two (as with 2 in Welsh, or 102 in Slovenian).</td>
</tr>
<tr>
<td>{@code few}</td><td>When the language requires special treatment of "small" numbers (as with 2, 3, and 4 in Czech; or numbers ending 2, 3, or 4 but not 12, 13, or 14 in Polish).</td>
@@ -322,7 +330,7 @@ values, with non-exhaustive examples in parentheses:
<td>{@code many}</td><td>When the language requires special treatment of "large" numbers (as with numbers ending 11-99 in Maltese).</td>
</tr>
<tr>
- <td>{@code other}</td><td>When the language does not require special treatment of the given quantity.</td>
+ <td>{@code other}</td><td>When the language does not require special treatment of the given quantity (as with all numbers in Chinese, or 42 in English).</td>
</tr>
</table>
</dd>
diff --git a/docs/html/images/tools/dev-options-inmilk.png b/docs/html/images/tools/dev-options-inmilk.png
new file mode 100644
index 0000000..f0e323e
--- /dev/null
+++ b/docs/html/images/tools/dev-options-inmilk.png
Binary files differ
diff --git a/docs/html/tools/building/building-cmdline.jd b/docs/html/tools/building/building-cmdline.jd
index 6154d96..e0d0d3f 100644
--- a/docs/html/tools/building/building-cmdline.jd
+++ b/docs/html/tools/building/building-cmdline.jd
@@ -261,8 +261,18 @@ adb -s emulator-5554 install <em>path/to/your/app</em>.apk
device:</p>
<ul>
- <li>Enable USB Debugging on your device. You can find the setting on most Android devices by
- going to <strong>Settings > Applications > Development > USB debugging</strong>.</li>
+ <li>Enable <strong>USB debugging</strong> on your device.
+ <ul>
+ <li>On most devices running Android 3.2 or older, you can find the option under
+ <strong>Settings > Applications > Development</strong>.</li>
+ <li>On Android 4.0 and newer, it's in <strong>Settings > Developer options</strong>.
+ <p class="note"><strong>Note:</strong> On Android 4.2 and newer, <strong>Developer
+ options</strong> is hidden by default. To make it available, go
+ to <strong>Settings > About phone</strong> and tap <strong>Build number</strong>
+ seven times. Return to the previous screen to find <strong>Developer options</strong>.</p>
+ </li>
+ </ul>
+ </li>
<li>Ensure that your development computer can detect your device when connected via USB</li>
</ul>
diff --git a/docs/html/tools/building/building-eclipse.jd b/docs/html/tools/building/building-eclipse.jd
index c73fe97..304aa7e 100644
--- a/docs/html/tools/building/building-eclipse.jd
+++ b/docs/html/tools/building/building-eclipse.jd
@@ -84,8 +84,18 @@ parent.link=index.html
<code>android:debuggable</code> attribute of the <code>&lt;application&gt;</code>
element to <code>true</code>. As of ADT 8.0, this is done by default when you build in debug mode.</li>
- <li>Enable USB Debugging on your device. You can find the setting on most Android devices by
- going to <strong>Settings > Applications > Development > USB debugging</strong>.</li>
+ <li>Enable <strong>USB debugging</strong> on your device.
+ <ul>
+ <li>On most devices running Android 3.2 or older, you can find the option under
+ <strong>Settings > Applications > Development</strong>.</li>
+ <li>On Android 4.0 and newer, it's in <strong>Settings > Developer options</strong>.
+ <p class="note"><strong>Note:</strong> On Android 4.2 and newer, <strong>Developer
+ options</strong> is hidden by default. To make it available, go
+ to <strong>Settings > About phone</strong> and tap <strong>Build number</strong>
+ seven times. Return to the previous screen to find <strong>Developer options</strong>.</p>
+ </li>
+ </ul>
+ </li>
<li>Ensure that your development computer can detect your device when connected via USB</li>
</ul>
diff --git a/docs/html/tools/device.jd b/docs/html/tools/device.jd
index d5fd581..61cd08a 100644
--- a/docs/html/tools/device.jd
+++ b/docs/html/tools/device.jd
@@ -58,11 +58,17 @@ the <code>&lt;application></code> element.</p>
<p class="note"><strong>Note:</strong> If you manually enable debugging in the manifest
file, be sure to disable it before you build for release (your published application
should usually <em>not</em> be debuggable).</p></li>
- <li>Turn on "USB Debugging" on your device.
- <p>On the device, go to <strong>Settings > Applications > Development</strong>
- and enable <strong>USB debugging</strong>
- (on an Android 4.0 device, the setting is
-located in <strong>Settings > Developer options</strong>).</p>
+ <li>Enable <strong>USB debugging</strong> on your device.
+ <ul>
+ <li>On most devices running Android 3.2 or older, you can find the option under
+ <strong>Settings > Applications > Development</strong>.</li>
+ <li>On Android 4.0 and newer, it's in <strong>Settings > Developer options</strong>.
+ <p class="note"><strong>Note:</strong> On Android 4.2 and newer, <strong>Developer
+ options</strong> is hidden by default. To make it available, go
+ to <strong>Settings > About phone</strong> and tap <strong>Build number</strong>
+ seven times. Return to the previous screen to find <strong>Developer options</strong>.</p>
+ </li>
+ </ul>
</li>
<li>Set up your system to detect your device.
<ul>
diff --git a/docs/html/tools/index.jd b/docs/html/tools/index.jd
index 04e0d3b..38401aa 100644
--- a/docs/html/tools/index.jd
+++ b/docs/html/tools/index.jd
@@ -17,68 +17,88 @@ page.title=Developer Tools
<div style="margin-top:20px;"></div>
-<div class="col-6">
+<div class="col-7" style="margin-left:0">
<h3>Full Java IDE</h3>
<ul>
- <li>Android-specific refactoring, quick fixes, integrated navigation between Java and Android XML resources.</li>
- <li>Enhanced XML editors for Android XML resources</li>
- <li>Static analysis tools to catch performance, usability, and correctness problems</li>
+ <li>Android-specific refactoring, quick fixes, integrated navigation between Java and XML resources.</li>
+ <li>Enhanced XML editors for Android XML resources.</li>
+ <li>Static analysis tools to catch performance, usability, and correctness problems.</li>
<li>Build support for complex projects, command-line support for CI through Ant. Includes ProGuard and app-signing. </li>
<li>Template-based wizard to create standard Android projects and components.</li>
</ul>
</div>
-<div class="col-6">
+
+<div class="col-6" style="margin-right:0">
+
<h3>Graphical UI Builders</h3>
-
<ul>
<li>Build rich Android UI with drag and drop.
<li>Visualize your UI on tablets, phones, and other devices. Switch themes, locales, even platform versions instantly, without building.</li>
- <li>Visual refactoring lets you extracts layout for inclusion, convert layouts, extract styles</li>
- <li>Editor support for working with custom UI components</li>
+ <li>Visual refactoring lets you extracts layout for inclusion, convert layouts, extract styles.</li>
+ <li>Editor support for working with custom UI components.</li>
</ul>
+
+</div>
+
+
+<div class="col-7" style="clear:both;margin-left:0;">
+
+<h3>On-device Developer Options</h3>
+<ul>
+ <li>Enable debugging over USB.</li>
+ <li>Quickly capture bug reports onto the device.</li>
+ <li>Show CPU usage on screen.</li>
+ <li>Draw debugging information on screen such as layout bounds,
+ updates on GPU views and hardware layers, touch location, and others.</li>
+ <li>Plus many more options to simulate app stresses or enable debugging options.</li>
+</ul>
+<p>To access these on your device, open the <em>Developer options</em> in the
+system Settings. Note that on Android 4.2 and higher, the Developer options screen is
+hidden by default. To make it available, go to
+<b>Settings > About phone</b> and tap <b>Build number</b> seven times. Return to the previous
+screen to find Developer options.</p>
+
</div>
-<div class="col-6" style="clear:both">
+<div class="col-6" style="margin-right:0">
+ <img src="{@docRoot}images/tools/dev-options-inmilk.png" alt="" style="margin:-10px 0 0;">
+</div>
+
+
+<div class="col-7" style="clear:both;margin-left:0;">
<h3>Develop on Hardware Devices</h3>
<ul>
<li>Use any commercial Android hardware device or multiple devices.</li>
- <li>Deploy your app to connected devices directy from the IDE</li>
- <li>Live, on-device debugging, testing, and profiling</li>
+ <li>Deploy your app to connected devices directy from the IDE.</li>
+ <li>Live, on-device debugging, testing, and profiling.</li>
</ul>
</div>
-<div class="col-6">
+<div class="col-6" style="margin-right:0">
<h3>Develop on Virtual Devices</h3>
<ul>
<li>Emulate any device. Use custom screen sizes, keyboards, and other hardware components. </li>
<li>Advanced hardware emulation, including camera, sensors, multitouch, telephony.</li>
- <li>Develop and test for broadest compatibility at lowest cost.</li>
+ <li>Develop and test for broad device compatibility.</li>
</ul>
</div>
<div style="margin-top:20px;"></div>
-<div class="col-5">
+<div class="col-7" style="margin-left:0">
<h3>Powerful Debugging</h3>
<ul>
- <li>Full Java debugger with on-device debugging and Android-specific tools</li>
+ <li>Full Java debugger with on-device debugging and Android-specific tools.</li>
<li>Built-in memory analysis, performance/CPU profiling, OpenGL ES tracing.</li>
<li>Graphical tools for debugging and optimizing UI, runtime inspecton of UI structure and performance.</li>
- <li>Runtime graphical analysis of your app's network bandwidth usage.</li>
+ <li>Runtime graphical analysis of your app's network bandwidth usage.</li>
</ul>
-</div>
-
-<div style="float:right;width:360px;padding-top:1em;">
- <img src="{@docRoot}images/debugging-tall.png" align="left">
-</div>
-
-<div class="col-6">
<h3>Testing</h3>
<ul>
@@ -95,3 +115,8 @@ page.title=Developer Tools
</ul>
</div>
+<div class="col-6" style="margin-right:0">
+ <img src="{@docRoot}images/debugging-tall.png" align="left" style="margin-top:10px">
+</div>
+
+
diff --git a/docs/html/training/basics/firstapp/running-app.jd b/docs/html/training/basics/firstapp/running-app.jd
index 0c428e7..80603b2 100644
--- a/docs/html/training/basics/firstapp/running-app.jd
+++ b/docs/html/training/basics/firstapp/running-app.jd
@@ -40,7 +40,7 @@ Android project, it includes a default set of "Hello World" source files that al
immediately run the app.</p>
<p>How you run your app depends on two things: whether you have a real Android-powered device and
-whether you’re using Eclipse. This lesson shows you how to install and run your app on a
+whether you're using Eclipse. This lesson shows you how to install and run your app on a
real device and on the Android emulator, and in both cases with either Eclipse or the command line
tools.</p>
@@ -85,12 +85,21 @@ important that you understand how to run your app before you start developing.</
<ol>
<li>Plug in your device to your development machine with a USB cable.
-If you’re developing on Windows, you might need to install the appropriate USB driver for your
+If you're developing on Windows, you might need to install the appropriate USB driver for your
device. For help installing drivers, see the <a href="{@docRoot}tools/extras/oem-usb.html">OEM USB
-Drivers</a> document.</li>
- <li>Ensure that <strong>USB debugging</strong> is enabled in the device Settings (open Settings
-and navitage to <strong>Applications > Development</strong> on most devices, or click
-<strong>Developer options</strong> on Android 4.0 and higher).</li>
+Drivers</a> document.</li>
+ <li>Enable <strong>USB debugging</strong> on your device.
+ <ul>
+ <li>On most devices running Android 3.2 or older, you can find the option under
+ <strong>Settings > Applications > Development</strong>.</li>
+ <li>On Android 4.0 and newer, it's in <strong>Settings > Developer options</strong>.
+ <p class="note"><strong>Note:</strong> On Android 4.2 and newer, <strong>Developer
+ options</strong> is hidden by default. To make it available, go
+ to <strong>Settings > About phone</strong> and tap <strong>Build number</strong>
+ seven times. Return to the previous screen to find <strong>Developer options</strong>.</p>
+ </li>
+ </ul>
+ </li>
</ol>
<p>To run the app from Eclipse, open one of your project's files and click
@@ -118,7 +127,7 @@ lesson</a>.</p>
<h2 id="Emulator">Run on the Emulator</h2>
-<p>Whether you’re using Eclipse or the command line, to run your app on the emulator you need to
+<p>Whether you're using Eclipse or the command line, to run your app on the emulator you need to
first create an <a href="{@docRoot}tools/devices/index.html">Android Virtual Device</a> (AVD). An
AVD is a device configuration for the Android emulator that allows you to model different
devices.</p>