Merge "Cherry pick: docs: Edited "Features Reference" section in "<uses-feature>" page." into mnc-io-docs
diff --git a/docs/html-intl/intl/vi/preview/index.jd b/docs/html-intl/intl/vi/preview/index.jd
index 25289e0..bd64b25 100644
--- a/docs/html-intl/intl/vi/preview/index.jd
+++ b/docs/html-intl/intl/vi/preview/index.jd
@@ -31,7 +31,7 @@
<strong>thông báo trả lời trực tiếp</strong> và nhiều tính năng khác.
</p>
- <a href="http://factoryberlin.com" target="_new">
+ <a class="dac-hero-cta" href="{@docRoot}preview/overview.html">
<span class="dac-sprite dac-auto-chevron"></span>
Bắt đầu
</a><!--<br>
@@ -61,19 +61,19 @@
</a>
<ul class="dac-actions">
<li class="dac-action">
- <a href="http://factoryberlin.com" target="_new">
+ <a class="dac-action-link" href="https://developer.android.com/preview/bug">
<i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
Báo cáo vấn đề
</a>
</li>
<li class="dac-action">
- <a href="http://factoryberlin.com" target="_new">
+ <a class="dac-action-link" href="{@docRoot}preview/support.html">
<i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
Xem ghi chú phát hành
</a>
</li>
<li class="dac-action">
- <a href="http://factoryberlin.com" target="_new">
+ <a class="dac-action-link" href="{@docRoot}preview/dev-community">
<i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
Tham gia cộng đồng nhà phát triển
</a>
@@ -86,15 +86,15 @@
<div class="wrap dac-offset-parent">
<div class="actions">
- <div><a href="http://factoryberlin.com" target="_new">
+ <div><a href="https://developer.android.com/preview/bug">
<span class="dac-sprite dac-auto-chevron-large"></span>
Báo cáo vấn đề
</a></div>
- <div><a href="http://factoryberlin.com" target="_new">
+ <div><a href="{@docRoot}preview/support.html">
<span class="dac-sprite dac-auto-chevron-large"></span>
Xem ghi chú phát hành
</a></div>
- <div><a href="http://factoryberlin.com" target="_new">
+ <div><a href="{@docRoot}preview/dev-community">
<span class="dac-sprite dac-auto-chevron-large"></span>
Tham gia cộng đồng nhà phát triển
</a></div>
diff --git a/docs/html/_redirects.yaml b/docs/html/_redirects.yaml
index 4211c6f..9e9343e 100644
--- a/docs/html/_redirects.yaml
+++ b/docs/html/_redirects.yaml
@@ -127,6 +127,8 @@
to: https://developers.google.com/mobile-ads-sdk/
- from: /google/play-services/wallet.html
to: https://developers.google.com/wallet/instant-buy/
+- from: /google/play-services/id.html
+ to: https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient
- from: /google/play/safetynet/...
to: /training/safetynet/index.html
- from: /google/gcm/...
@@ -843,6 +845,8 @@
to: /studio/run/emulator.html
- from: /r/studio-ui/instant-run.html
to: /studio/run/index.html#instant-run
+- from: /r/studio-ui/test-recorder.html
+ to: http://tools.android.com/tech-docs/test-recorder
- from: /reference/org/apache/http/...
to: /about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client
- from: /shareables/...
diff --git a/docs/html/google/_book.yaml b/docs/html/google/_book.yaml
index 92357e9..885ad7a 100644
--- a/docs/html/google/_book.yaml
+++ b/docs/html/google/_book.yaml
@@ -63,9 +63,6 @@
- title: Google Play Developer API
path: /google/play/developer-api.html
-- title: Advertising ID
- path: /google/play-services/id.html
-
- title: Multiple APK Support
path: /google/play/publishing/multiple-apks.html
diff --git a/docs/html/google/play-services/id.jd b/docs/html/google/play-services/id.jd
deleted file mode 100644
index 2f0664c..0000000
--- a/docs/html/google/play-services/id.jd
+++ /dev/null
@@ -1,193 +0,0 @@
-page.title=Advertising ID
-page.tags=Ads,Advertising ID,ID
-
-@jd:body
-<div class="landing-banner">
-
-<div class="col-8">
-<p itemprop="description">
- The advertising ID is a user-specific, unique, resettable ID for advertising,
- provided by Google Play services. It gives users better controls and provides
- developers with a simple, standard system to continue to monetize your apps.
- It is an anonymous identifier for advertising purposes and enables users to
- reset their identifier or opt out of interest-based ads within Google Play
- apps.
-</p>
-<p>
- The advertising ID is accessible through a straightforward API that you can
- implement in your apps. For details, take a look at the <a href=
- "#get_started">overview</a> and the <a href=
- "https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/package-summary">
- advertising ID API reference</a>.
-</p>
-</div>
-</div>
-<div class="landing-docs">
- <div class="col-6 normal-links">
- <h3 style="clear:left">Key Developer Features</h3>
- <h4>Standard, simple ID</h4>
- <p>The advertising ID is a part of a standard, simple system for serving ads and performing analytics.</p>
- <h4>Giving users control</h4>
- <p>Users can reset their advertising ID or opt out of interest-based ads at any time, right from the Google Settings app.
- Their preferences apply across all ad companies that use the advertising ID.</p>
-
- </div>
- <div class="col-6 normal-links">
- <h3 style="clear:left">Getting Started</h3>
- <h4>1. Get the Google Play services SDK</h4>
- <p>The advertising ID APIs are part of the Google Play services platform.</p>
- <p>To get started, <a href="https://developers.google.com/android/guides/setup">set up
- the Google Play services SDK</a>. </p>
- <h4>2. Read the docs and example code</h4>
- <p>Once you've installed the Google Play services package, review the <a href="#get_started">overview</a>
- below, as well as the <a href="#example">example</a>.</p>
- <p>
- For detailed documentation, take a look at the <a href=
- "https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/package-summary">
- advertising ID API reference documentation</a>.
- </p>
- </div>
-</div>
-<p class="caution" style=
-"background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">
- As a reminder, please note that starting <strong>1 August 2014</strong>, new
- apps and app updates distributed through Google Play must use the advertising
- ID in lieu of any other persistent identifiers for any advertising purposes,
- on devices that support the advertising ID.<br>
- <br>
- To learn how to check your app's compliance through the Developer Console, or
- for details on the associated developer policy changes, please see the
- <a href=
- "https://support.google.com/googleplay/android-developer/answer/6048248">Advertising
- ID topic</a> in the Google Play developer help center.
-</p>
-<h2 id="get_started">Using the Advertising ID</h2>
-<p>
- The <strong>advertising ID</strong> is a unique but
- user-resettable string identifier that lets ad networks and other apps anonymously
- identify a user. The user's advertising ID is made available to apps through APIs
- provided in Google Play services.
-</p>
-<p>
- Users can reset their advertising ID at any time, right from the Ads section of the
- Google Settings app on their devices. From the same app, users can also
- opt-out of targeted advertising based on the advertising ID by setting the appropriate
- <strong style="white-space:nowrap">ad tracking preference</strong>. When the
- user opts-out of targeted ads, this ad tracking preference is made available
- to apps through a Google Play services API.
-</p>
-<p>
- Apps making use of the advertising ID <strong>must check for and respect</strong> the
- user's ad tracking preference. Also please note that any use of the advertising ID
- must abide by the terms of the <a class="external-link"
- href="http://play.google.com/about/developer-content-policy.html#ADID">Google Play
- Developer Content Policies</a>.
-</p>
-<h3 id="format">Format of the Advertising ID</h3>
-<p>
- Google Play services APIs expose the user's advertising ID as a string format of UUID,
- with values similar to this:
-</p>
-<p style="margin-left:1.5em;"><code>"38400000-8cf0-11bd-b23e-10b96e40000d"</code></p>
-<h3 id="requirements">Requirements</h3>
-<ul>
- <li>The advertising ID APIs are supported in Google Play services 4.0+</li>
- <li>Support for the advertising ID on specific devices is based on their installed versions
- of Google Play services</li>
-</ul>
-<h3 id="obtaining">Obtaining the user's advertising ID and ad tracking preference</h3>
-<p>
- If you want to use the advertising ID in your app, you must first install the Google
- Play services SDK. As noted in the requirements above, you should install the
- SDK for Google Play services 4.0 or higher if you will develop using the advertising ID
- APIs. For information about how to get started, see <a href=
- "https://developers.google.com/android/guides/setup">Setting Up Google Play services</a>.
-</p>
-<p>
- The advertising ID APIs are available in the <a href=
- "{@docRoot}reference/com/google/android/gms/ads/identifier/package-summary.html">
- <code>com.google.android.gms.ads.identifier</code></a> package in the Google
- Play Services library. To obtain the user's advertising ID and tracking preference,
- call the method
- <a href=
- "{@docRoot}reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.html#getAdvertisingIdInfo(android.content.Context)">
- <code>getAdvertisingIdInfo()</code></a>, which returns an <a href=
- "{@docRoot}reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info.html">
- <code>AdvertisingIdClient.Info</code></a> encapsulating the user's current Advertising ID
- and tracking preference.
-</p>
-<p class="note">
- <strong>Note:</strong> The
- <a href=
- "{@docRoot}reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.html#getAdvertisingIdInfo(android.content.Context)"><code>getAdvertisingIdInfo()</code></a>
- method is a blocking call, so you must not call it on the main (UI) thread.
- If called on the main thread, the method throws
- {@link java.lang.IllegalStateException}.
-</p>
-<p>
- Once you've retrieved the
- <a href=
- "{@docRoot}reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info.html">
- <code>AdvertisingIdClient.Info</code></a>
- object, you can use its <a href=
- "{@docRoot}reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info.html#getId()">
- <code>getId()</code></a> and <a href=
- "{@docRoot}reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info.html#isLimitAdTrackingEnabled()">
- <code>isLimitAdTrackingEnabled()</code></a> methods to access the advertising ID and
- ad tracking preference.
-</p>
-<table>
-<tr>
-<th>Method</th>
-<th>Description</th>
-</tr>
-<tr>
-<td><code>public String <a href=
- "{@docRoot}reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info.html#getId()">getId()</a></code></td>
-<td style="white-space:nowrap;">Retrieves the advertising ID.</td>
-</tr>
-<tr>
-<td style="white-space:nowrap;"><code>public boolean <a href=
- "{@docRoot}reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info.html#isLimitAdTrackingEnabled()">isLimitAdTrackingEnabled()</a></code></td>
-<td>Retrieves whether the user has limit ad tracking enabled or not.</td>
-</tr>
-</table>
-<p>
- The advertising ID APIs do not include a "reset" method. Only users can initiate a
- reset of their own advertising IDs, through the Google Settings application.
-</p>
-<p>
- For more information about the advertising ID APIs, see the <a href=
- "{@docRoot}reference/com/google/android/gms/ads/identifier/package-summary.html">
- reference documentation</a>.
-</p>
-<h3 id="example">Example implementation</h3>
-<p>
- Here's a basic illustration of how you can retrieve the user's advertising ID and ad
- tracking preference in your app:
-</p>
-<pre>
-import com.google.android.gms.ads.identifier.AdvertisingIdClient;
-import com.google.android.gms.ads.identifier.AdvertisingIdClient.Info;
-import com.google.android.gms.common.GooglePlayServicesAvailabilityException;
-import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
-import java.io.IOException;
-...
-// Do not call this function from the main thread. Otherwise,
-// an IllegalStateException will be thrown.
-public void getIdThread() {
- Info adInfo = null;
- try {
- adInfo = AdvertisingIdClient.getAdvertisingIdInfo(mContext.getApplicationContext());
- } catch (IOException e) {
- // Unrecoverable error connecting to Google Play services (e.g.,
- // the old version of the service doesn't support getting AdvertisingId).
-
- } catch (GooglePlayServicesAvailabilityException e) {
- // Encountered a recoverable error connecting to Google Play services.
- } catch (GooglePlayServicesNotAvailableException e) {
- // Google Play services is not available entirely.
- }
- final String id = adInfo.getId();
- final boolean isLAT = adInfo.isLimitAdTrackingEnabled();
-}</pre>
diff --git a/docs/html/preview/features/security-config.jd b/docs/html/preview/features/security-config.jd
index f8c0325..2706ced 100644
--- a/docs/html/preview/features/security-config.jd
+++ b/docs/html/preview/features/security-config.jd
@@ -72,9 +72,8 @@
<pre>
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
- <application ... >
- <meta-data android:name="android.security.net.config"
- android:resource="@xml/network_security_config" />
+ <application android:networkSecurityConfig="@xml/network_security_config"
+ ... >
...
</application>
</manifest>
diff --git a/docs/html/training/basics/firstapp/building-ui.jd b/docs/html/training/basics/firstapp/building-ui.jd
index 402396e..275500c 100644
--- a/docs/html/training/basics/firstapp/building-ui.jd
+++ b/docs/html/training/basics/firstapp/building-ui.jd
@@ -396,20 +396,13 @@
<h2>Run Your App</h2>
<p>This layout is applied by the default {@link android.app.Activity} class
-that the SDK tools generated when you created the project. Run the app to see the
-results:</p>
+that the SDK tools generated when you created the project.</p>
-<ul>
- <li>In Android Studio, from the toolbar, click <strong>Run</strong>
+<p>To run the app and see the results,
+ click <strong>Run 'app'</strong>
<img src="{@docRoot}images/tools/as-run.png"
- style="vertical-align:baseline;margin:0; max-height:1em" />.</li>
- <li>Or from a command line, change directories to the root of your Android project and
-execute:
-<pre class="no-pretty-print">
-$ ant debug
-adb install -r app/build/outputs/apk/app-debug.apk
-</pre></li>
-</ul>
+ style="vertical-align:baseline;margin:0; max-height:1em" /> in the
+ toolbar.</p>
<p>Continue to the <a href="starting-activity.html">next
lesson</a> to learn how to respond to button presses, read content
diff --git a/docs/html/training/basics/firstapp/running-app.jd b/docs/html/training/basics/firstapp/running-app.jd
index 99b38bf..21fb64d 100755
--- a/docs/html/training/basics/firstapp/running-app.jd
+++ b/docs/html/training/basics/firstapp/running-app.jd
@@ -76,46 +76,6 @@
<p>Android Studio installs the app on your connected device and starts it.</p>
-<h3>Run the app from a command line</h3>
-
-<p>Open a command-line and navigate to the root of your project directory.
- Use Gradle to build your project in debug mode, invoke the <code>assembleDebug</code> build task
- using the Gradle wrapper script (<code>gradlew assembleRelease</code>).
-
- <p>This creates your debug <code>.apk</code> file inside the module <code>build/</code>
- directory, named <code>app-debug.apk</code>. </p>
-
- <p>On Windows platforms, type this command:</p>
-
-<pre>
-> gradlew.bat assembleDebug
-</pre>
-
-<p>On Mac OS and Linux platforms, type these commands:</p>
-
-<pre>
-$ chmod +x gradlew
-$ ./gradlew assembleDebug
-</pre>
-
- <p>After you build the project, the output APK for the app module is located in
- <code>app/build/outputs/apk/</code>
-
- <p class="note"><strong>Note:</strong> The first command (<code>chmod</code>) adds the execution
- permission to the Gradle wrapper script and is only necessary the first time you build this
- project from the command line.</p>
-
- <p>Make sure the Android SDK <code>platform-tools/</code> directory is included in your
- <code>PATH</code> environment variable, then execute:
- <pre class="no-pretty-print">$ adb install app/build/outputs/apk/app-debug.apk</pre><p>
- <p>On your device, locate <em>MyFirstApp</em> and open it.</p>
-
-<p>That's how you build and run your Android app on a device!
- To start developing, continue to the <a href="building-ui.html">next
-lesson</a>.</p>
-
-
-
<h2 id="Emulator">Run on the Emulator</h2>
<p>Whether you're using Android Studio or the command line, to run your app on the emulator you need
@@ -168,23 +128,8 @@
When you do, <em>My First App</em> appears on the emulator screen.</p>
-<h3>Run your app from the command line</h3>
- <ol>
- <li>Build the project from the command line. The output APK for the app module is located in
- <code>app/build/outputs/apk/</code>.</li>
- <li>Make sure the Android SDK <code>platform-tools/</code> directory is included in your
- <code>PATH</code> environment variable.</li>
- <li>Execute this command:
- <p>
- <pre class="no-pretty-print">$ adb install app/build/outputs/apk/apk-debug.apk</pre>
- </p>
- </li>
- <li>On the emulator, locate <em>MyFirstApp</em> and open it.</li>
- </ol>
-
-
- <p>That's how you build and run your Android app on the emulator!
- To start developing, continue to the <a href="building-ui.html">next
- lesson</a>.</p>
+<p>That's how you build and run your Android app on the emulator!
+To start developing, continue to the <a href="building-ui.html">next
+lesson</a>.</p>