Loading docs/html/guide/components/bound-services.jd +6 −6 Original line number Diff line number Diff line Loading @@ -640,12 +640,6 @@ href="{@docRoot}resources/samples/ApiDemos/index.html">ApiDemos</a>.</p> <h2 id="Lifecycle">Managing the Lifecycle of a Bound Service</h2> <div class="figure" style="width:588px"> <img src="{@docRoot}images/fundamentals/service_binding_tree_lifecycle.png" alt="" /> <p class="img-caption"><strong>Figure 1.</strong> The lifecycle for a service that is started and also allows binding.</p> </div> <p>When a service is unbound from all clients, the Android system destroys it (unless it was also started with {@link android.app.Service#onStartCommand onStartCommand()}). As such, you don't have to manage the lifecycle of your service if it's purely a bound Loading @@ -667,6 +661,12 @@ onRebind()} returns void, but the client still receives the {@link android.os.IB {@link android.content.ServiceConnection#onServiceConnected onServiceConnected()} callback. Below, figure 1 illustrates the logic for this kind of lifecycle.</p> <img src="{@docRoot}images/fundamentals/service_binding_tree_lifecycle.png" alt="" /> <p class="img-caption"><strong>Figure 1.</strong> The lifecycle for a service that is started and also allows binding.</p> <p>For more information about the lifecycle of an started service, see the <a href="{@docRoot}guide/components/services.html#Lifecycle">Services</a> document.</p> Loading docs/html/guide/components/services.jd +6 −9 Original line number Diff line number Diff line Loading @@ -755,15 +755,6 @@ stopSelf()} does not actually stop the service until all clients unbind. </p> changes in the service's state and perform work at the appropriate times. The following skeleton service demonstrates each of the lifecycle methods:</p> <div class="figure" style="width:432px"> <img src="{@docRoot}images/service_lifecycle.png" alt="" /> <p class="img-caption"><strong>Figure 2.</strong> The service lifecycle. The diagram on the left shows the lifecycle when the service is created with {@link android.content.Context#startService startService()} and the diagram on the right shows the lifecycle when the service is created with {@link android.content.Context#bindService bindService()}.</p> </div> <pre> public class ExampleService extends Service { int mStartMode; // indicates how to behave if the service is killed Loading Loading @@ -804,6 +795,12 @@ public class ExampleService extends Service { <p class="note"><strong>Note:</strong> Unlike the activity lifecycle callback methods, you are <em>not</em> required to call the superclass implementation of these callback methods.</p> <img src="{@docRoot}images/service_lifecycle.png" alt="" /> <p class="img-caption"><strong>Figure 2.</strong> The service lifecycle. The diagram on the left shows the lifecycle when the service is created with {@link android.content.Context#startService startService()} and the diagram on the right shows the lifecycle when the service is created with {@link android.content.Context#bindService bindService()}.</p> <p>By implementing these methods, you can monitor two nested loops of the service's lifecycle: </p> <ul> Loading docs/html/guide/webapps/targeting.jd +1 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ density.</p> <p>The density of a device's screen is based on the screen resolution, as defined by the number of dots per inch (dpi). There are three screen density categories supported by Android: low (ldpi), medium (mdpi), and high (mdpi). A screen density categories supported by Android: low (ldpi), medium (mdpi), and high (hdpi). A screen with low density has fewer available pixels per inch, whereas a screen with high density has more pixels per inch (compared to a medium density screen). The Android Browser and {@link android.webkit.WebView} target a medium density screen by default.</p> Loading docs/html/tools/help/adb.jd +2 −2 Original line number Diff line number Diff line Loading @@ -88,13 +88,14 @@ Emulator 2, adb: 5557 ... <li>Serial number — A string created by adb to uniquely identify an emulator/device instance by its console port number. The format of the serial number is <code><type>-<consolePort></code>. Here's an example serial number: <code>emulator-5554</code></li> <li>State — The connection state of the instance. Three states are supported: <li>State — The connection state of the instance may be one of the following: <ul> <li><code>offline</code> — the instance is not connected to adb or is not responding.</li> <li><code>device</code> — the instance is now connected to the adb server. Note that this state does not imply that the Android system is fully booted and operational, since the instance connects to adb while the system is still booting. However, after boot-up, this is the normal operational state of an emulator/device instance.</li> <li><code>no device</code> — there is no emulator/device connected. </ul> </li> </ul> Loading @@ -111,7 +112,6 @@ emulator-5554 device emulator-5556 device emulator-5558 device</pre> <p>If there is no emulator/device running, adb returns <code>no device</code>.</p> <a name="directingcommands"></a> Loading docs/html/training/accessibility/service.jd +1 −1 Original line number Diff line number Diff line Loading @@ -175,7 +175,7 @@ In that method, use {@link android.view.accessibility.AccessibilityEvent#getEventType} to determine the type of event, and {@link android.view.accessibility.AccessibilityEvent#getContentDescription} to extract any label text associated with the fiew that fired the event.</pre> any label text associated with the view that fired the event.</pre> <pre> @Override Loading Loading
docs/html/guide/components/bound-services.jd +6 −6 Original line number Diff line number Diff line Loading @@ -640,12 +640,6 @@ href="{@docRoot}resources/samples/ApiDemos/index.html">ApiDemos</a>.</p> <h2 id="Lifecycle">Managing the Lifecycle of a Bound Service</h2> <div class="figure" style="width:588px"> <img src="{@docRoot}images/fundamentals/service_binding_tree_lifecycle.png" alt="" /> <p class="img-caption"><strong>Figure 1.</strong> The lifecycle for a service that is started and also allows binding.</p> </div> <p>When a service is unbound from all clients, the Android system destroys it (unless it was also started with {@link android.app.Service#onStartCommand onStartCommand()}). As such, you don't have to manage the lifecycle of your service if it's purely a bound Loading @@ -667,6 +661,12 @@ onRebind()} returns void, but the client still receives the {@link android.os.IB {@link android.content.ServiceConnection#onServiceConnected onServiceConnected()} callback. Below, figure 1 illustrates the logic for this kind of lifecycle.</p> <img src="{@docRoot}images/fundamentals/service_binding_tree_lifecycle.png" alt="" /> <p class="img-caption"><strong>Figure 1.</strong> The lifecycle for a service that is started and also allows binding.</p> <p>For more information about the lifecycle of an started service, see the <a href="{@docRoot}guide/components/services.html#Lifecycle">Services</a> document.</p> Loading
docs/html/guide/components/services.jd +6 −9 Original line number Diff line number Diff line Loading @@ -755,15 +755,6 @@ stopSelf()} does not actually stop the service until all clients unbind. </p> changes in the service's state and perform work at the appropriate times. The following skeleton service demonstrates each of the lifecycle methods:</p> <div class="figure" style="width:432px"> <img src="{@docRoot}images/service_lifecycle.png" alt="" /> <p class="img-caption"><strong>Figure 2.</strong> The service lifecycle. The diagram on the left shows the lifecycle when the service is created with {@link android.content.Context#startService startService()} and the diagram on the right shows the lifecycle when the service is created with {@link android.content.Context#bindService bindService()}.</p> </div> <pre> public class ExampleService extends Service { int mStartMode; // indicates how to behave if the service is killed Loading Loading @@ -804,6 +795,12 @@ public class ExampleService extends Service { <p class="note"><strong>Note:</strong> Unlike the activity lifecycle callback methods, you are <em>not</em> required to call the superclass implementation of these callback methods.</p> <img src="{@docRoot}images/service_lifecycle.png" alt="" /> <p class="img-caption"><strong>Figure 2.</strong> The service lifecycle. The diagram on the left shows the lifecycle when the service is created with {@link android.content.Context#startService startService()} and the diagram on the right shows the lifecycle when the service is created with {@link android.content.Context#bindService bindService()}.</p> <p>By implementing these methods, you can monitor two nested loops of the service's lifecycle: </p> <ul> Loading
docs/html/guide/webapps/targeting.jd +1 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ density.</p> <p>The density of a device's screen is based on the screen resolution, as defined by the number of dots per inch (dpi). There are three screen density categories supported by Android: low (ldpi), medium (mdpi), and high (mdpi). A screen density categories supported by Android: low (ldpi), medium (mdpi), and high (hdpi). A screen with low density has fewer available pixels per inch, whereas a screen with high density has more pixels per inch (compared to a medium density screen). The Android Browser and {@link android.webkit.WebView} target a medium density screen by default.</p> Loading
docs/html/tools/help/adb.jd +2 −2 Original line number Diff line number Diff line Loading @@ -88,13 +88,14 @@ Emulator 2, adb: 5557 ... <li>Serial number — A string created by adb to uniquely identify an emulator/device instance by its console port number. The format of the serial number is <code><type>-<consolePort></code>. Here's an example serial number: <code>emulator-5554</code></li> <li>State — The connection state of the instance. Three states are supported: <li>State — The connection state of the instance may be one of the following: <ul> <li><code>offline</code> — the instance is not connected to adb or is not responding.</li> <li><code>device</code> — the instance is now connected to the adb server. Note that this state does not imply that the Android system is fully booted and operational, since the instance connects to adb while the system is still booting. However, after boot-up, this is the normal operational state of an emulator/device instance.</li> <li><code>no device</code> — there is no emulator/device connected. </ul> </li> </ul> Loading @@ -111,7 +112,6 @@ emulator-5554 device emulator-5556 device emulator-5558 device</pre> <p>If there is no emulator/device running, adb returns <code>no device</code>.</p> <a name="directingcommands"></a> Loading
docs/html/training/accessibility/service.jd +1 −1 Original line number Diff line number Diff line Loading @@ -175,7 +175,7 @@ In that method, use {@link android.view.accessibility.AccessibilityEvent#getEventType} to determine the type of event, and {@link android.view.accessibility.AccessibilityEvent#getContentDescription} to extract any label text associated with the fiew that fired the event.</pre> any label text associated with the view that fired the event.</pre> <pre> @Override Loading