blob: 0ef5d9cc6b4c76d7dfac2e4bba8bfa592963dc97 [file] [log] [blame]
<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="/guide/samples/ApiDemos/res/layout/hello_world.html">
hello_world.xml</a>
</dl>
</dd>
<dt><a href="SaveRestoreState.html">Save &amp; 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="LocalServiceController.html">Local Service Controller</a></dt>
<dd>Starts and stops the service class
<a href="LocalService.html">LocalService</a> that runs in the same
process as the activity, to demonstrate a service's
lifecycle when using {@link android.content.Context#startService
Context.startService} and {@link android.content.Context#stopService
Context.stopService}.</dd>
<dt><a href="LocalServiceBinding.html">Local Service Binding</a></dt>
<dd>Demonstrates binding to a service class
<a href="LocalService.html">LocalService</a> that runs in the same
process as the activity, to demonstrate using the
{@link android.content.Context#bindService Context.bindService} and
{@link android.content.Context#unbindService Context.unindService}
methods with a service. 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="RemoteServiceController.html">Remote Service Controller</a></dt>
<dd>Demonstrates starting a service in a separate process, by assigning
<code>android:process=&quot;:remote&quot;</code> to the service in the
AndroidManifest.xml file. </dd>
<dt><a href="RemoteServiceBinding.html">Remote Service Binding</a></dt>
<dd>Demonstrates binding to a remote service, similar to the Local Service
Binding sample, but illustrating 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="ServiceStartArgumentsController.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.
<dl>
<dt>Code:
<dd> <a href="ServiceStartArgumentsController.html">ServiceStartArgumentsController.java</a>
<dd> <a href="ServiceStartArguments.html">ServiceStartArguments.java</a>
<dt>Layout:
<dd> <a href="/guide/samples/ApiDemos/res/layout/service_start_arguments_controller.html">
service_start_arguments_controller.xml</a>
</dl>
</dd>
<dt><a href="ForegroundServiceController.html">Foreground Service Controller</a></dt>
<dd>Controls the service class
<a href="ForegroundService.html">ForegroundService</a>, which 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="/guide/samples/ApiDemos/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="/guide/samples/ApiDemos/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>