diff options
Diffstat (limited to 'docs/html')
-rw-r--r-- | docs/html/about/versions/android-5.0-changes.jd | 5 | ||||
-rw-r--r-- | docs/html/distribute/essentials/quality/tv.jd | 6 | ||||
-rw-r--r-- | docs/html/guide/components/bound-services.jd | 3 | ||||
-rw-r--r-- | docs/html/guide/topics/appwidgets/index.jd | 85 | ||||
-rw-r--r-- | docs/html/guide/topics/ui/controls/togglebutton.jd | 92 | ||||
-rw-r--r-- | docs/html/preview/api-overview.jd | 6 | ||||
-rw-r--r-- | docs/html/tools/debugging/ddms.jd | 53 | ||||
-rw-r--r-- | docs/html/tools/debugging/debugging-tracing.jd | 15 | ||||
-rw-r--r-- | docs/html/tools/help/monitor.jd | 18 | ||||
-rw-r--r-- | docs/html/tools/help/traceview.jd | 24 | ||||
-rw-r--r-- | docs/html/training/tv/start/layouts.jd | 16 |
11 files changed, 110 insertions, 213 deletions
diff --git a/docs/html/about/versions/android-5.0-changes.jd b/docs/html/about/versions/android-5.0-changes.jd index f51af40..25d253f 100644 --- a/docs/html/about/versions/android-5.0-changes.jd +++ b/docs/html/about/versions/android-5.0-changes.jd @@ -598,3 +598,8 @@ android.provider.MediaStore#EXTRA_OUTPUT EXTRA_OUTPUT} should contain a content URI specifying where the photo should be stored. The camera app can write the image to the location specified by that URI, and the app that fired the intent would be able to read that file, even if the app is on the other profile. </p> + +<h3>Lockscreen widget support removed</h3> + +<p>Android 5.0 removes support for lockscreen widgets; it continues to support +widgets on the home screen.</p>
\ No newline at end of file diff --git a/docs/html/distribute/essentials/quality/tv.jd b/docs/html/distribute/essentials/quality/tv.jd index 20018c3..c7f6fcb 100644 --- a/docs/html/distribute/essentials/quality/tv.jd +++ b/docs/html/distribute/essentials/quality/tv.jd @@ -418,9 +418,9 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6"> </td> <td> <p style="margin-bottom:.5em;"> - If the app continues to play sound after the user has left, the app provides a <em>Now - Playing</em> card on the home screen recommendation row so users can return to the app to - control playback. + If the app continues to play sound or video after the user has left, the + app provides a <em>Now Playing</em> card on the home screen recommendation + row so users can return to the app to control playback. (<a href="{@docRoot}training/tv/playback/now-playing.html">Learn how</a>) </p> </td> diff --git a/docs/html/guide/components/bound-services.jd b/docs/html/guide/components/bound-services.jd index 4215f0f..c2ac607 100644 --- a/docs/html/guide/components/bound-services.jd +++ b/docs/html/guide/components/bound-services.jd @@ -649,8 +649,7 @@ clients.</p> <p>Additionally, if your service is started and accepts binding, then when the system calls your {@link android.app.Service#onUnbind onUnbind()} method, you can optionally return {@code true} if you would like to receive a call to {@link android.app.Service#onRebind -onRebind()} the next time a client binds to the service (instead of receiving a call to {@link -android.app.Service#onBind onBind()}). {@link android.app.Service#onRebind +onRebind()} the next time a client binds to the service. {@link android.app.Service#onRebind onRebind()} returns void, but the client still receives the {@link android.os.IBinder} in its {@link android.content.ServiceConnection#onServiceConnected onServiceConnected()} callback. Below, figure 1 illustrates the logic for this kind of lifecycle.</p> diff --git a/docs/html/guide/topics/appwidgets/index.jd b/docs/html/guide/topics/appwidgets/index.jd index a783ad1..c9575e0 100644 --- a/docs/html/guide/topics/appwidgets/index.jd +++ b/docs/html/guide/topics/appwidgets/index.jd @@ -26,12 +26,6 @@ from </ol> </li> <li><a href="#preview">Setting a Preview Image</a></li> - <li><a href="#lockscreen">Enabling App Widgets on the Lockscreen</a> - <ol> - <li><a href="#lockscreen-sizing">Sizing guidelines</a></li> - </ol> - </li> - <li><a href="#collections">Using App Widgets with Collections</a> <ol> <li><a href="#collection_sample">Sample application</a></li> @@ -175,8 +169,7 @@ folder.</p> android:initialLayout="@layout/example_appwidget" android:configure="com.example.android.ExampleAppWidgetConfigure" android:resizeMode="horizontal|vertical" - android:widgetCategory="home_screen|keyguard" - android:initialKeyguardLayout="@layout/example_keyguard"> + android:widgetCategory="home_screen"> </appwidget-provider> </pre> @@ -281,17 +274,11 @@ vertical resizing isn't enabled (see <code>resizeMode</code>). Introduced in And the widget can be resized. This field has no effect if it is greater than {@code minWidth} or if horizontal resizing isn't enabled (see <code>resizeMode</code>). Introduced in Android 4.0.</li> -<li>The <code>widgetCategory</code> attribute declares whether your App Widget can be displayed on the home screen, -the lock screen (keyguard), or both. Values for this attribute include "home_screen" and "keyguard". A widget that -is displayed on both needs to ensure that it follows the design guidelines for both widget classes. For more -information, see <a href="#lockscreen">Enabling App Widgets on the Lockscreen</a>. The default value is "home_screen". Introduced in Android 4.2. -</li> - -<li>The <code>initialKeyguardLayout</code> attribute points to the layout resource -that defines the lock screen App Widget layout. This works the same way as the -{@link android.appwidget.AppWidgetProviderInfo#initialLayout android:initialLayout}, -in that it provides a layout that can appear immediately until your app widget is initialized and able to update -the layout. Introduced in Android 4.2.</li> +<li>The <code>widgetCategory</code> attribute declares whether your App Widget +can be displayed on the home screen ({@code home_screen}), the lock screen +({@code keyguard}), or both. Only Android versions lower than 5.0 support +lock-screen widgets. For Android 5.0 and higher, only {@code home_screen} is +valid.</li> </ul> @@ -737,66 +724,6 @@ preview image, launch this application, select the app widget for your application and set it up how you'd like your preview image to appear, then save it and place it in your application's drawable resources.</p> -<h2 id="lockscreen">Enabling App Widgets on the Lockscreen</h2> - -<p>Android 4.2 introduces the ability for users to add widgets to the lock screen. To indicate that your app widget is available for use on the lock screen, declare the {@link android.appwidget.AppWidgetProviderInfo#widgetCategory android:widgetCategory} attribute in the XML file that specifies your {@link android.appwidget.AppWidgetProviderInfo}. This attribute supports two values: "home_screen" and "keyguard". An app widget can declare support for one or both.</p> - -<p>By default, every app widget supports placement on the Home screen, so "home_screen" is the default value for the -{@link android.appwidget.AppWidgetProviderInfo#widgetCategory android:widgetCategory} attribute. If you want your app widget to be available for the lock screen, add the "keyguard" value:</p> -<pre> -<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" - ... - android:widgetCategory="keyguard|home_screen"> -</appwidget-provider> -</pre> - -<p>If you declare a widget to be displayable on both keyguard (lockscreen) and home, it's likely that you'll want to customize the widget depending on where it is displayed. For example, you might create a separate layout file for keyguard vs. home. The next step is to detect the widget category at runtime and respond accordingly. - -You can detect whether your widget is on the lockscreen or home screen by calling -{@link android.appwidget.AppWidgetManager#getAppWidgetOptions getAppWidgetOptions()} -to get the widget's options as a {@link android.os.Bundle}. The returned bundle will include the key -{@link android.appwidget.AppWidgetManager#OPTION_APPWIDGET_HOST_CATEGORY}, whose value will be one of {@link android.appwidget.AppWidgetProviderInfo#WIDGET_CATEGORY_HOME_SCREEN} or -{@link android.appwidget.AppWidgetProviderInfo#WIDGET_CATEGORY_KEYGUARD}. This value is determined by the host into which the widget is bound. In the {@link android.appwidget.AppWidgetProvider}, you can then check the widget's category, for example:</p> - -<pre> -AppWidgetManager appWidgetManager; -int widgetId; -Bundle myOptions = appWidgetManager.getAppWidgetOptions (widgetId); - -// Get the value of OPTION_APPWIDGET_HOST_CATEGORY -int category = myOptions.getInt(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY, -1); - -// If the value is WIDGET_CATEGORY_KEYGUARD, it's a lockscreen widget -boolean isKeyguard = category == AppWidgetProviderInfo.WIDGET_CATEGORY_KEYGUARD; -</pre> - -<p>Once you know the widget's category, you can optionally load a different base layout, set different properties, and so on. For example:</p> - -<pre> -int baseLayout = isKeyguard ? R.layout.keyguard_widget_layout : R.layout.widget_layout; -</pre> - - -<p>You should also specify an initial layout for your app widget when on the lock screen with the -{@link android.appwidget.AppWidgetProviderInfo#initialKeyguardLayout android:initialKeyguardLayout} attribute. This works the same way as the -{@link android.appwidget.AppWidgetProviderInfo#initialLayout android:initialLayout}, in that it provides a layout that can appear immediately until your app widget is initialized and able to update the layout.</p> - -<h3 id="lockscreen-sizing">Sizing guidelines</h3> - -<p>When a widget is hosted on the lockscreen, the framework ignores the {@code minWidth}, {@code minHeight}, {@code minResizeWidth}, and {@code minResizeHeight} fields. If a widget is also a home screen widget, these parameters are still needed as they're still used on home, but they will be ignored for purposes of the lockscreen.</p> - -<p>The width of a lockscreen widget always fills the provided space. For the height of a lockscreen widget, you have the following options:</p> - -<ul> - <li>If the widget does not mark itself as vertically resizable ({@code android:resizeMode="vertical"}), then the widget height will always be "small": - <ul> - <li>On a phone in portrait mode, "small" is defined as the space remaining when an unlock UI is being displayed.</li> - <li>On tablets and landscape phones, "small" is set on a per-device basis.</li> - </ul> - </li> - <li>If the widget marks itself as vertically resizable, then the widget height shows up as "small" on portrait phones displaying an unlock UI. In all other cases, the widget sizes to fill the available height.</li> -</ul> - <h2 id="collections">Using App Widgets with Collections</h2> <p>Android 3.0 introduces app widgets with collections. These kinds of App diff --git a/docs/html/guide/topics/ui/controls/togglebutton.jd b/docs/html/guide/topics/ui/controls/togglebutton.jd index 09af516..e0549ec 100644 --- a/docs/html/guide/topics/ui/controls/togglebutton.jd +++ b/docs/html/guide/topics/ui/controls/togglebutton.jd @@ -6,16 +6,15 @@ page.tags=switch,togglebutton <div id="qv"> <h2>In this document</h2> <ol> - <li><a href="#HandlingEvents">Responding to Click Events</a> - <ol> - <li><a href="#ClickListener">Using an OnCheckedChangeListener</a></li> - </ol> + <li> + <a href="#ClickListener">Responding to Button Presses</a> </li> </ol> <h2>Key classes</h2> <ol> <li>{@link android.widget.ToggleButton}</li> <li>{@link android.widget.Switch}</li> + <li>{@link android.widget.CompoundButton}</li> </ol> </div> </div> @@ -26,6 +25,12 @@ page.tags=switch,togglebutton object. Android 4.0 (API level 14) introduces another kind of toggle button called a switch that provides a slider control, which you can add with a {@link android.widget.Switch} object.</p> +<p> + If you need to change a button's state yourself, you can use the {@link + android.widget.CompoundButton#setChecked CompoundButton.setChecked()} or + {@link android.widget.CompoundButton#toggle CompoundButton.toggle()} methods. +</p> + <div style="float:left;width:200px"> <img src="{@docRoot}images/ui/togglebutton.png" alt="" /> <p class="img-caption"><em>Toggle buttons</em></p> @@ -36,78 +41,15 @@ provides a slider control, which you can add with a {@link android.widget.Switch <p class="img-caption"><em>Switches (in Android 4.0+)</em></p> </div> -<p style="clear:left">The {@link android.widget.ToggleButton} and {@link android.widget.Switch} -controls are subclasses of {@link android.widget.CompoundButton} and function in the same manner, so -you can implement their behavior the same way.</p> - -<h2 id="HandlingEvents">Responding to Click Events</h2> - -<p>When the user selects a {@link android.widget.ToggleButton} and {@link android.widget.Switch}, -the object receives an on-click event.</p> - -<p>To define the click event handler, add the <code><a -href="/reference/android/R.attr.html#onClick">android:onClick</a></code> attribute to the -<code><ToggleButton></code> or <code><Switch></code> element in your XML -layout. The value for this attribute must be the name of the method you want to call in response -to a click event. The {@link android.app.Activity} hosting the layout must then implement the -corresponding method.</p> - -<p>For example, here's a {@link android.widget.ToggleButton} with the <code><a -href="/reference/android/R.attr.html#onClick">android:onClick</a></code> attribute:</p> - -<pre> -<ToggleButton - android:id="@+id/togglebutton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textOn="Vibrate on" - android:textOff="Vibrate off" - android:onClick="onToggleClicked"/> -</pre> - -<p>Within the {@link android.app.Activity} that hosts this layout, the following method handles the -click event:</p> - -<pre> -public void onToggleClicked(View view) { - // Is the toggle on? - boolean on = ((ToggleButton) view).isChecked(); - - if (on) { - // Enable vibrate - } else { - // Disable vibrate - } -} -</pre> - -<p>The method you declare in the {@link android.R.attr#onClick android:onClick} attribute -must have a signature exactly as shown above. Specifically, the method must:</p> -<ul> - <li>Be public</li> - <li>Return void</li> - <li>Define a {@link android.view.View} as its only parameter (this will be the {@link -android.view.View} that was clicked)</li> -</ul> - -<p class="note"><strong>Tip:</strong> If you need to change the state -yourself, -use the {@link android.widget.CompoundButton#setChecked(boolean)} or {@link -android.widget.CompoundButton#toggle()} method to change the state.</p> - - - -<h3 id="ClickListener">Using an OnCheckedChangeListener</h3> - -<p>You can also declare a click event handler programmatically rather than in an XML layout. This -might be necessary if you instantiate the {@link android.widget.ToggleButton} or {@link -android.widget.Switch} at runtime or you need to -declare the click behavior in a {@link android.app.Fragment} subclass.</p> +<h2 id="ClickListener">Responding to Button Presses</h2> -<p>To declare the event handler programmatically, create an {@link -android.widget.CompoundButton.OnCheckedChangeListener} object and assign it to the button by calling -{@link -android.widget.CompoundButton#setOnCheckedChangeListener}. For example:</p> +<p> + To detect when the user activates the button or switch, create an {@link + android.widget.CompoundButton.OnCheckedChangeListener} object and assign it + to the button by calling {@link + android.widget.CompoundButton#setOnCheckedChangeListener + setOnCheckedChangeListener()}. For example: +</p> <pre> ToggleButton toggle = (ToggleButton) findViewById(R.id.togglebutton); diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd index 75b3c52..4300b43 100644 --- a/docs/html/preview/api-overview.jd +++ b/docs/html/preview/api-overview.jd @@ -120,14 +120,16 @@ manifest.</p> <uses-permission android:name="android.permission.USE_FINGERPRINT" /> </pre> - <img src="{@docRoot}preview/images/fingerprint-screen.png" srcset="{@docRoot}preview/images/fingerprint-screen.png 1x, {@docRoot}preview/images/fingerprint-screen_2x.png 2x" style="float:right; margin:0 0 10px 20px" width="282" height="476" /> <p>To see an app implementation of fingerprint authentication, refer to the <a href="https://github.com/googlesamples/android-FingerprintDialog" class="external-link"> - Fingerprint Dialog sample</a>.</p> + Fingerprint Dialog sample</a>. For a demonstration of how you can use these authentication + APIs in conjunction with other Android APIs, see the video + <a class="video-shadowbox-button" href="https://www.youtube.com/watch?v=VOn7VrTRlA4"> + Fingerprint and Payment APIs</a>.</p> <p>If you are testing this feature, follow these steps:</p> <ol> diff --git a/docs/html/tools/debugging/ddms.jd b/docs/html/tools/debugging/ddms.jd index 28ad11e..becbdb1 100644 --- a/docs/html/tools/debugging/ddms.jd +++ b/docs/html/tools/debugging/ddms.jd @@ -22,28 +22,23 @@ parent.link=index.html <li><a href="#logcat">Using LogCat</a></li> <li><a href="#ops-location">Emulating phone operations and location</a></li> </ol> - + </li> </ol> </div> </div> - <p>Android ships with a debugging tool called the Dalvik Debug Monitor Server (DDMS), which + <p>Android Studio includes a debugging tool called the Dalvik Debug Monitor Server (DDMS), which provides port-forwarding services, screen capture on the device, thread and heap information on the device, logcat, process, and radio state information, incoming call and SMS spoofing, location data spoofing, and more. This page provides a modest discussion of DDMS features; it is not an exhaustive exploration of all the features and capabilities.</p> - + <h2 id="running">Running DDMS</h2> - <p>DDMS is integrated into Eclipse and is also shipped in the <code>tools/</code> directory of the - SDK. DDMS works with both the emulator and a connected device. If both are connected and running simultaneously, - DDMS defaults to the emulator.</p> - - <ul> - <li>From Eclipse: Click <strong>Window > Open Perspective > Other... > DDMS</strong>.</li> - <li>From the command line: Type <code>ddms</code> (or <code>./ddms</code> on Mac/Linux) from the <code>tools/</code> - directory. </li> - </ul> + <p>DDMS is integrated into Android Studio. To use it, launch the + <a href="{@docRoot}tools/help/monitor.html">Android Device Monitor</a>, and click the + <strong>DDMS</strong> menu button. DDMS works with both the emulator and a + connected device. If both are connected and running simultaneously, DDMS defaults to the emulator.</p> <h2 id="how-ddms-works">How DDMS Interacts with a Debugger</h2> @@ -70,7 +65,7 @@ parent.link=index.html all the VMs on a device. The traffic that is forwarded is determined by the currently selected process in the DDMS Devices view.</p> - <p>The following screenshot shows a typical DDMS screen in Eclipse. If you are starting DDMS from + <p>The following screenshot shows a typical DDMS screen. If you are starting DDMS from the command line, the screen is slightly different, but much of the functionality is identical. Notice that the highlighted process, <code>com.android.email</code>, that is running in the emulator has the debugging port 8700 assigned to it as well as 8606. This signifies that DDMS is currently @@ -78,10 +73,10 @@ parent.link=index.html <img src="{@docRoot}images/debug-ddms.png" width="1024" /> - <p class="img-caption"><strong>Figure 1.</strong> - Screenshot of DDMS</p> + <p class="img-caption"><strong>Figure 1.</strong> + Screenshot of DDMS</p> - <p>If you are not using Eclipse and ADT, read <a href= + <p>If you are using the command line, read <a href= "{@docRoot}tools/debugging/debugging-projects-cmdline.html#debuggingPort">Configuring your IDE to attach to the debugging port</a>, for more information on attaching your debugger.</p> @@ -97,11 +92,11 @@ parent.link=index.html <h2 id="using-ddms">Using DDMS</h2> The following sections describe how to use DDMS and the various tabs and panes that are part of the - DDMS GUI. The Eclipse version and the command line version have minor UI differences, but the - same functionality. For information on running DDMS, see the previous section in this document, + DDMS GUI. The Android Studio version and the command line version have minor UI differences, but + the same functionality. For information on running DDMS, see the previous section in this document, <a href="#running">Running DDMS</a>. - - + + <h3 id="heap">Viewing heap usage for a process</h3> <p>DDMS allows you to view how much heap memory a process is using. This information is useful in @@ -129,7 +124,7 @@ parent.link=index.html objects are being allocated when you perform certain actions in your application. This information is valuable for assessing memory usage that can affect application performance. </p> - + <p>To track memory allocation of objects:</p> <ol> <li>In the Devices tab, select the process that you want to enable allocation tracking @@ -155,7 +150,7 @@ parent.link=index.html <p>DDMS provides a File Explorer tab that allows you to view, copy, and delete files on the device. This feature is useful in examining files that are created by your application or if you want to transfer files to and from the device.</p> - + <p>To work with an emulator or device's file system:</p> <ol> <li>In the Devices tab, select the emulator that you want to view the file system for.</li> @@ -166,7 +161,7 @@ parent.link=index.html <li>To copy a file to the device, click the <strong>Push file</strong> button on the File Explorer tab.</li> </ol> - + <!-- Need to elaborate more on where things are stored in the file system, databases, apks, user info, files that are important to look at --> @@ -189,7 +184,7 @@ parent.link=index.html where profiling data is collected, use the {@link android.os.Debug#startMethodTracing()} and {@link android.os.Debug#stopMethodTracing()} methods. For more information about generating trace logs, see <a href="debugging-tracing.html">Profiling and Debugging UIs</a>.</p> - + <p>Before you start method profiling in DDMS, be aware of the following restrictions:</p> <ul> <li>Android 2.1 and earlier devices must @@ -197,7 +192,7 @@ parent.link=index.html <li>Android 2.2 and later devices do not need an SD card. The trace log files are streamed directly to your development machine.</li> </ul> - + <p>To start method profiling:</p> <ol> <li>On the Devices tab, select the process that you want to enable method profiling for.</li> @@ -218,7 +213,7 @@ parent.link=index.html </ol> <h3 id="network">Using the Network Traffic tool</h3> - + <p>In Android 4.0, the DDMS (Dalvik Debug Monitor Server) includes a Detailed Network Usage tab that makes it possible to track when your application is making network requests. Using this tool, you can monitor how and when your app @@ -274,7 +269,7 @@ to clear the tag.</p> <p>Socket tagging is supported in Android 4.0, but real-time stats will only be displayed on devices running Android 4.0.3 or higher.</p> - + <h3 id="logcat">Using LogCat</h3> <p>LogCat is integrated into DDMS, and outputs the messages that you print out using the {@link android.util.Log} @@ -296,7 +291,7 @@ displayed on devices running Android 4.0.3 or higher.</p> <li>Error</li> </ul> - + <p>You can also setup your own custom filter to specify more details such as filtering messages with the log tags or with the process id that generated the log message. The add filter, edit filter, and delete filter buttons let you manage your custom filters.</p> @@ -351,7 +346,7 @@ displayed on devices running Android 4.0.3 or higher.</p> <li>KML - Keyhole Markup Language file</li> </ul> - + For more information about providing mock location data, see <a href="{@docRoot}guide/topics/location/strategies.html#MockData">Location Strategies</a>. diff --git a/docs/html/tools/debugging/debugging-tracing.jd b/docs/html/tools/debugging/debugging-tracing.jd index fa5b4e1..829c82a 100644 --- a/docs/html/tools/debugging/debugging-tracing.jd +++ b/docs/html/tools/debugging/debugging-tracing.jd @@ -177,12 +177,15 @@ adb pull /sdcard/calc.trace /tmp <h2 id="runningtraceview">Viewing Trace Files in Traceview</h2> - <p>To run Traceview and view the trace files, enter <code>traceview - <trace-base-name></code>. For example, to run Traceview on the example files copied in the - previous section, use:</p> - <pre> -traceview /tmp/calc -</pre> + <p>To run Traceview and view the trace files:</p> + <ul> + <li>start the + <a href="{@docRoot}tools/help/monitor.html">Android Device Monitor</a>. </li> + <li>In the Android Device Monitor tool bar, click <strong>DDMS</strong> and select a process. </li> + <li>Click the <strong>Start Method Profiling</strong> icon to start method profiling. </li> + <li>After the profiling is complete, click the <strong>Stop Method Profiling</strong> icon to + display the traceview. </li> + </ul> <p class="note"><strong>Note:</strong> If you are trying to view the trace logs of an application that is built with ProGuard enabled (release mode build), some method and member names might be obfuscated. diff --git a/docs/html/tools/help/monitor.jd b/docs/html/tools/help/monitor.jd index 513eb10..5f7b5ce 100644 --- a/docs/html/tools/help/monitor.jd +++ b/docs/html/tools/help/monitor.jd @@ -15,8 +15,8 @@ page.title=Device Monitor <p>Android Device Monitor is a stand-alone tool that provides a graphical user interface for several Android application debugging and analysis tools. The Monitor tool does not -require installation of an integrated development environment, such as Eclipse, and encapsulates the -following tools:</p> +require installation of an integrated development environment, such as Android Studio, and +encapsulates the following tools:</p> <ul> <li><a href="{@docRoot}tools/debugging/ddms.html">DDMS</a></li> @@ -30,9 +30,19 @@ following tools:</p> <h2 id="usage">Usage</h2> -<p>To start Device Monitor, enter the following command from the SDK <code>tools/</code> -directory:</p> +<p>To start Device Monitor:</p> + +<ul> + <li>From Android Studio, choose <strong>Tools > Android Device Monitor</strong> or click + the Android Device Monitor icon + <img src="{@docRoot}images/tools/hierarchicalviewer-icon.png" alt=""/>. + </li> + <li>From the command line, in the SDK <code>tools/</code> directory, enter the following command: <pre>monitor</pre> + </li> +</ul> + + <p>Start an Android emulator or connect an Android device via USB cable, and connect Device Monitor to the device by selecting it in the <strong>Devices</strong> window.</p> diff --git a/docs/html/tools/help/traceview.jd b/docs/html/tools/help/traceview.jd index 6555ac0..a268291 100644 --- a/docs/html/tools/help/traceview.jd +++ b/docs/html/tools/help/traceview.jd @@ -3,14 +3,26 @@ parent.title=Tools parent.link=index.html @jd:body -<p>Traceview is a graphical viewer for execution logs saved by your application. +<p>Traceview is a graphical viewer for execution logs saved by your application. Traceview can help you debug your application and profile its performance.</p> -<p>To start Traceview, enter the following command from the SDK <code>tools/</code> directory:</p> - <pre>traceview</pre> -</ol> +<p>To start the Traceview tool:</p> -<p>For more information on how to use Traceview, see -<a href="{@docRoot}tools/debugging/debugging-tracing.html">Profiling with Traceview and dmtracedump</a> +<ul> + <li>Start the <a href="{@docRoot}tools/help/monitor.html">Android Device Monitor</a>. </li> + <li>In the Android Device Monitor tool bar, click <strong>DDMS</strong> and select a process. </li> + <li>Click the <strong>Start Method Profiling</strong> icon to start method profiling. </li> + <li>After the profiling is complete, click the <strong>Stop Method Profiling</strong> icon to + display the traceview. </li> +</ul> + + +<p>For more information on how to use Traceview, see +<a href="{@docRoot}tools/debugging/debugging-tracing.html">Profiling with Traceview and +dmtracedump</a>. </p> +<p class="note"><strong>Note:</strong> Running <code>traceview</code> from the command line +has been deprecated. </p> + + diff --git a/docs/html/training/tv/start/layouts.jd b/docs/html/training/tv/start/layouts.jd index a378096..2b190b4 100644 --- a/docs/html/training/tv/start/layouts.jd +++ b/docs/html/training/tv/start/layouts.jd @@ -262,14 +262,16 @@ trainingnavtop=true <h2 id="advertising">Provide Effective Advertising</h2> -<p>Advertising on Android TV must always be full-screen. Ads must not appear alongside or over -content. The user must be able to dismiss an advertisement with the D-pad controller. Video ads must -be dismissible within 30 seconds of their start time.</p> +<p>For the living room environment, we recommend you use video ads solutions +that are full-screen and dismissable within 30 seconds. Functionality for +advertising on Android TV, such as dismiss buttons and clickthroughs, must be +accessible using the D-pad rather than touch.</p> -<p>Android TV does not provide a web browser. Your ads must not attempt to launch a web browser or -redirect to the Google Play Store.</p> +<p>Android TV does not provide a web browser. Your ads must not attempt to +launch a web browser or redirect to Google Play Store content that is not +approved for Android TV devices.</p> <p class="note"> - <strong>Note:</strong> You can use the {@link android.webkit.WebView} class for logins to - services like Google+ and Facebook. + <strong>Note:</strong> You can use the {@link android.webkit.WebView} class + for logins to services like Google+ and Facebook. </p>
\ No newline at end of file |