| |
| <h3>Activity</h3> |
| <dl> |
| <dt><a href="HelloWorld.html">Hello World</a></dt> |
| <dd>Demonstrates a basic screen activity. |
| <dl> |
| <dt>Code: |
| <dd> <a href="HelloWorld.html">HelloWorld.java</a> |
| <dt>Layout: |
| <dd> <a href="../../../../../../res/layout/hello_world.html"> |
| hello_world.xml</a> |
| </dl> |
| </dd> |
| <dt><a href="SaveRestoreState.html">Save & Restore State</a></dt> |
| <dd>Demonstrates how an activity should save state when it is paused.</dd> |
| |
| <dt><a href="PersistentState.html">Persistent State</a></dt> |
| <dd>Demonstrates how you can save and restore preferences, which are stored |
| even after the user closes the application. </dd> |
| |
| <dt><a href="ReceiveResult.html">Receive Result</a></dt> |
| <dd>Demonstrates how an activity screen can return a result to the |
| activity that opened it. </dd> |
| |
| <dt><a href="Forwarding.html">Forwarding</a></dt> |
| <dd>Demonstrates opening a new activity and removing the current activity |
| from the history stack, so that when the user later presses BACK they will |
| not see the intermediate activity.</dd> |
| |
| <dt><a href="RedirectEnter.html">Redirection</a></dt> |
| <dd>Demonstrates how to save data to preferences and use it to determine |
| which activity to open next.</dd> |
| |
| <dt><a href="TranslucentActivity.html">Translucent</a></dt> |
| <dd>Demonstrates how to make an activity with a transparent background. </dd> |
| |
| <dt><a href="TranslucentBlurActivity.html">TranslucentBlur</a></dt> |
| <dd>Demonstrates how to make an activity with a transparent background with |
| a special effect (blur). </dd> |
| </dl> |
| |
| <h3>Service</h3> |
| <dl> |
| <dt><a href="LocalService.html">Local Service Controller and |
| Local Service Binding</a></dt> |
| <dd>Demonstrate the implementation of a service that runs in the same |
| process as its client(s). Shows how those clients can either start/stop it |
| with {@link android.content.Context#startService |
| Context.startService} and {@link android.content.Context#stopService |
| Context.stopService}, or bind and call it with |
| {@link android.content.Context#bindService Context.bindService} and |
| {@link android.content.Context#unbindService Context.unindService}. |
| This also shows how you can simplify working |
| with a service when you know it will only run in your own process.</dd> |
| |
| <dt><a href="RemoteService.html">Remote Service Controller and |
| Remove Service Binding</a></dt> |
| <dd>Demonstrates starting a service in a separate process, by assigning |
| <code>android:process=":remote"</code> to the service in the |
| AndroidManifest.xml file. Shows how those clients can either start/stop it |
| with {@link android.content.Context#startService |
| Context.startService} and {@link android.content.Context#stopService |
| Context.stopService}, or bind and call it with |
| {@link android.content.Context#bindService Context.bindService} and |
| {@link android.content.Context#unbindService Context.unindService}. |
| Binding is similar to the local service sample, |
| but illustrates the additional work (defining aidl |
| interfaces) needed to interact with a service in another process. Also |
| shows how a service can publish multiple interfaces and implement |
| callbacks to its clients.</dd> |
| |
| <dt><a href="ServiceStartArguments.html">Service Start Arguments Controller</a></dt> |
| <dd>Demonstrates how you can use a Service as a job queue, where you |
| submit jobs to it with {@link android.content.Context#startService |
| Context.startService} instead of binding to the service. Such a service |
| automatically stops itself once all jobs have been processed. This can be |
| a very convenient way to interact with a service when you do not need |
| a result back from it.</dd> |
| |
| <dt><a href="ForegroundService.html">Foreground Service Controller</a></dt> |
| <dd>Shows how you |
| can write a Service that runs in the foreground and works on both pre-2.0 |
| and post-2.0 versions of the platform. This example will selectively use |
| the new foreground APIs that were introduced in Android 2.0 if they are |
| available.</dd> |
| |
| </dl> |
| |
| <h3>Alarm</h3> |
| <dl> |
| <dt><a href="AlarmController.html">Alarm Controller</a></dt> |
| <dd>Demonstrates two ways you can schedule alarms: a one-shot alarm that |
| will happen once at a given time, and a repeating alarm that will happen |
| first at a given time and then continually trigger at regular intervals |
| after that. |
| <dl> |
| <dt>Code: |
| <dd> <a href="AlarmController.html">AlarmController.java</a> |
| <dd> <a href="OneShotAlarm.html">OneShotAlarm.java</a> |
| <dd> <a href="RepeatingAlarm.html">RepeatingAlarm.java</a> |
| <dt>Layout: |
| <dd> <a href="../../../../../../res/layout/alarm_controller.html"> |
| alarm_controller.xml</a> |
| </dl> |
| </dd> |
| |
| <dt><a href="AlarmService.html">Alarm Service</a></dt> |
| <dd>Demonstrates how you can schedule an alarm that causes a service to |
| be started. This is useful when you want to schedule alarms that initiate |
| long-running operations, such as retrieving recent e-mails. |
| <dl> |
| <dt>Code: |
| <dd> <a href="AlarmService.html">AlarmService.java</a> |
| <dd> <a href="AlarmService_Service.html">AlarmService_Service.java</a> |
| <dt>Layout: |
| <dd> <a href="../../../../../../res/layout/alarm_service.html"> |
| alarm_service.xml</a> |
| </dl> |
| </dd> |
| </dl> |
| |
| <h3>Notification</h3> |
| <dl> |
| <dt><a href="NotifyWithText.html">NotifyWithText</a></dt> |
| <dd>Demonstrates popup notifications of varying length.</dd> |
| |
| <dt><a href="IncomingMessage.html">IncomingMessage</a></dt> |
| <dd> Demonstrates sending persistent and transient notifications, with a View object in the notification. It also demonstrated inflating a View object from an XML layout resource. </dd> |
| </dl> |
| |
| <h3>Search</h3> |
| <dl> |
| <dt><a href="SearchInvoke.html">SearchInvoke</a></dt> |
| <dd>Demonstrates various ways in which activities can launch the Search UI.</dd> |
| |
| <dt><a href="SearchQueryResults.html">SearchQueryResults</a></dt> |
| <dd>Demonstrates an activity that receives Search intents and handles them.</dd> |
| |
| <dt><a href="SearchSuggestionSampleProvider.html">SearchSuggestionSampleProvider</a></dt> |
| <dd>Demonstrates how to configure and use the built-in "recent queries" suggestion provider.</dd> |
| </dl> |
| |
| |