including fix for bug 7443821 bug 7442263 Change-Id: I20b712bf2b0379c70ff28682025d6f30817a6c36
356 lines
18 KiB
Plaintext
356 lines
18 KiB
Plaintext
page.title=<application>
|
|
parent.title=The AndroidManifest.xml File
|
|
parent.link=manifest-intro.html
|
|
@jd:body
|
|
|
|
<dl class="xml">
|
|
<dt>syntax:</dt>
|
|
<dd><pre class="stx"><application android:<a href="#reparent">allowTaskReparenting</a>=["true" | "false"]
|
|
android:<a href="#agent">backupAgent</a>="<i>string</i>"
|
|
android:<a href="#debug">debuggable</a>=["true" | "false"]
|
|
android:<a href="#desc">description</a>="<i>string resource</i>"
|
|
android:<a href="#enabled">enabled</a>=["true" | "false"]
|
|
android:<a href="#code">hasCode</a>=["true" | "false"]
|
|
android:<a href="#hwaccel">hardwareAccelerated</a>=["true" | "false"]
|
|
android:<a href="#icon">icon</a>="<i>drawable resource</i>"
|
|
android:<a href="#killrst">killAfterRestore</a>=["true" | "false"]
|
|
android:<a href="#largeHeap">largeHeap</a>=["true" | "false"]
|
|
android:<a href="#label">label</a>="<i>string resource</i>"
|
|
android:<a href="#logo">logo</a>="<i>drawable resource</i>"
|
|
android:<a href="#space">manageSpaceActivity</a>="<i>string</i>"
|
|
android:<a href="#nm">name</a>="<i>string</i>"
|
|
android:<a href="#prmsn">permission</a>="<i>string</i>"
|
|
android:<a href="#persistent">persistent</a>=["true" | "false"]
|
|
android:<a href="#proc">process</a>="<i>string</i>"
|
|
android:<a href="#restoreany">restoreAnyVersion</a>=["true" | "false"]
|
|
android:<a href="#supportsrtl">supportsRtl</a>=["true" | "false"]
|
|
android:<a href="#aff">taskAffinity</a>="<i>string</i>"
|
|
android:<a href="#theme">theme</a>="<i>resource or theme</i>"
|
|
android:<a href="#uioptions">uiOptions</a>=["none" | "splitActionBarWhenNarrow"] >
|
|
. . .
|
|
</application></pre></dd>
|
|
|
|
<dt>contained in:</dt>
|
|
<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code></dd>
|
|
|
|
<dt>can contain:</dt>
|
|
<dd><code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code>
|
|
<br/><code><a href="{@docRoot}guide/topics/manifest/activity-alias-element.html"><activity-alias></a></code>
|
|
<br/><code><a href="{@docRoot}guide/topics/manifest/service-element.html"><service></a></code>
|
|
<br/><code><a href="{@docRoot}guide/topics/manifest/receiver-element.html"><receiver></a></code>
|
|
<br/><code><a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a></code>
|
|
<br/><code><a href="{@docRoot}guide/topics/manifest/uses-library-element.html"><uses-library></a></code></dd>
|
|
|
|
<dt>description:</dt>
|
|
<dd>The declaration of the application. This element contains subelements
|
|
that declare each of the application's components and has attributes
|
|
that can affect all the components. Many of these attributes (such as
|
|
{@code icon}, {@code label}, {@code permission}, {@code process},
|
|
{@code taskAffinity}, and {@code allowTaskReparenting}) set default values
|
|
for corresponding attributes of the component elements. Others (such as
|
|
{@code debuggable}, {@code enabled}, {@code description}, and
|
|
{@code allowClearUserData}) set values for the application as a whole and
|
|
cannot be overridden by the components.</dd>
|
|
|
|
<dt>attributes</dt>
|
|
<dd><dl class="attr">
|
|
|
|
<dt><a name="reparent"></a>{@code android:allowTaskReparenting}</dt>
|
|
<dd>Whether or not activities that the application defines can move from
|
|
the task that started them to the task they have an affinity for when that task
|
|
is next brought to the front — {@code "true"} if they can move, and
|
|
{@code "false"} if they must remain with the task where they started.
|
|
The default value is {@code "false"}.
|
|
|
|
<p>
|
|
The
|
|
<code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code>
|
|
element has its own
|
|
<code><a href="{@docRoot}guide/topics/manifest/activity-element.html#reparent">allowTaskReparenting</a></code>
|
|
attribute that can override the value set here. See that attribute for more
|
|
information.
|
|
</p></dd>
|
|
|
|
<dt><a name="agent"></a>{@code android:backupAgent}</dt>
|
|
<dd>The name of the class that implement's the application's backup agent,
|
|
a subclass of {@link android.app.backup.BackupAgent}. The attribute value should be
|
|
a fully qualified class name (such as, {@code "com.example.project.MyBackupAgent"}).
|
|
However, as a shorthand, if the first character of the name is a period
|
|
(for example, {@code ".MyBackupAgent"}), it is appended to the
|
|
package name specified in the
|
|
<code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code>
|
|
element.
|
|
|
|
<p>
|
|
There is no default. The name must be specified.
|
|
</p></dd>
|
|
|
|
<dt><a name="debug"></a>{@code android:debuggable}</dt>
|
|
<dd>Whether or not the application can be debugged, even when running
|
|
on a device in user mode — {@code "true"} if it can be, and {@code "false"}
|
|
if not. The default value is {@code "false"}.</dd>
|
|
|
|
<dt><a name="desc"></a>{@code android:description}</dt>
|
|
<dd>User-readable text about the application, longer and more descriptive than the application label. The value must be set as a reference to a string resource. Unlike the label, it cannot be a raw string. There is no default value.</dd>
|
|
|
|
<dt><a name="enabled"></a>{@code android:enabled}</dt>
|
|
<dd>Whether or not the Android system can instantiate components of
|
|
the application — {@code "true"} if it can, and {@code "false"}
|
|
if not. If the value is {@code "true"}, each component's
|
|
{@code enabled} attribute determines whether that component is enabled
|
|
or not. If the value is {@code "false"}, it overrides the
|
|
component-specific values; all components are disabled.
|
|
|
|
<p>
|
|
The default value is {@code "true"}.
|
|
</p></dd>
|
|
|
|
<dt><a name="code"></a>{@code android:hasCode}</dt>
|
|
<dd>Whether or not the application contains any code — {@code "true"}
|
|
if it does, and {@code "false"} if not. When the value is {@code "false"},
|
|
the system does not try to load any application code when launching components.
|
|
The default value is {@code "true"}.
|
|
|
|
<p>
|
|
An application would not have any code of its own only if it's using nothing
|
|
but built-in component classes, such as an activity that uses the {@link
|
|
android.app.AliasActivity} class, a rare occurrence.</p>
|
|
</dd>
|
|
|
|
<dt><a name="hwaccel"></a>{@code android:hardwareAccelerated}</dt>
|
|
<dd>Whether or not hardware-accelerated rendering should be enabled for all
|
|
activities and views in this application — {@code "true"} if it
|
|
should be enabled, and {@code "false"} if not. The default value is {@code "true"} if you've set
|
|
either <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a>
|
|
or <a
|
|
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a>
|
|
to {@code "14"} or higher; otherwise, it's {@code "false"}.
|
|
|
|
<p>Starting from Android 3.0 (API level 11), a hardware-accelerated OpenGL renderer is
|
|
available to applications, to improve performance for many common 2D graphics
|
|
operations. When the hardware-accelerated renderer is enabled, most operations
|
|
in Canvas, Paint, Xfermode, ColorFilter, Shader, and Camera are accelerated.
|
|
This results in smoother animations, smoother scrolling, and improved
|
|
responsiveness overall, even for applications that do not explicitly make use
|
|
the framework's OpenGL libraries. </p>
|
|
|
|
<p>Note that not all of the OpenGL 2D operations are accelerated. If you enable
|
|
the hardware-accelerated renderer, test your application to ensure that it can
|
|
make use of the renderer without errors.</p>
|
|
|
|
<p>For more information, read the <a href="{@docRoot}guide/topics/graphics/hardware-accel.html"
|
|
>Hardware Acceleration</a> guide.</p>
|
|
</dd>
|
|
|
|
<dt><a name="icon"></a>{@code android:icon}</dt>
|
|
<dd>An icon for the application as whole, and the default icon for
|
|
each of the application's components. See the individual
|
|
{@code icon} attributes for
|
|
<code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code>,
|
|
<code><a href="{@docRoot}guide/topics/manifest/activity-alias-element.html"><activity-alias></a></code>,
|
|
<code><a href="{@docRoot}guide/topics/manifest/service-element.html"><service></a></code>,
|
|
<code><a href="{@docRoot}guide/topics/manifest/receiver-element.html"><receiver></a></code>, and
|
|
<code><a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a></code> elements.
|
|
|
|
<p>
|
|
This attribute must be set as a reference to a drawable resource containing
|
|
the image (for example {@code "@drawable/icon"}). There is no default icon.
|
|
</p></dd>
|
|
|
|
<dt><a name="killrst"></a>{@code android:killAfterRestore}</dt>
|
|
<dd>Whether the application in question should be terminated after its
|
|
settings have been restored during a full-system restore operation.
|
|
Single-package restore operations will never cause the application to
|
|
be shut down. Full-system restore operations typically only occur once,
|
|
when the phone is first set up. Third-party applications will not normally
|
|
need to use this attribute.
|
|
|
|
<p>The default is {@code true}, which means that after the application
|
|
has finished processing its data during a full-system restore, it will be
|
|
terminated.
|
|
</p></dd>
|
|
|
|
<dt><a name="largeHeap"></a>{@code android:largeHeap}</dt>
|
|
<dd>Whether your application's processes should be created with a large Dalvik heap. This applies to
|
|
all processes created for the application. It only applies to the first application loaded into a
|
|
process; if you're using a shared user ID to allow multiple applications to use a process, they all
|
|
must use this option consistently or they will have unpredictable results.
|
|
<p>Most apps should not need this and should instead focus on reducing their overall memory usage for
|
|
improved performance. Enabling this also does not guarantee a fixed increase in available memory,
|
|
because some devices are constrained by their total available memory.</p>
|
|
<p>To query the available memory size at runtime, use the methods {@link
|
|
android.app.ActivityManager#getMemoryClass()} or {@link
|
|
android.app.ActivityManager#getLargeMemoryClass()}.</p>
|
|
</dd>
|
|
|
|
<dt><a name="label"></a>{@code android:label}</dt>
|
|
<dd>A user-readable label for the application as a whole, and a default
|
|
label for each of the application's components. See the individual
|
|
{@code label} attributes for
|
|
<code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code>,
|
|
<code><a href="{@docRoot}guide/topics/manifest/activity-alias-element.html"><activity-alias></a></code>,
|
|
<code><a href="{@docRoot}guide/topics/manifest/service-element.html"><service></a></code>,
|
|
<code><a href="{@docRoot}guide/topics/manifest/receiver-element.html"><receiver></a></code>, and
|
|
<code><a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a></code> elements.
|
|
|
|
<p>
|
|
The label should be set as a reference to a string resource, so that
|
|
it can be localized like other strings in the user interface.
|
|
However, as a convenience while you're developing the application,
|
|
it can also be set as a raw string.
|
|
</p></dd>
|
|
|
|
<dt><a name="logo"></a>{@code android:logo}</dt>
|
|
<dd>A logo for the application as whole, and the default logo for activities.
|
|
<p>This attribute must be set as a reference to a drawable resource containing
|
|
the image (for example {@code "@drawable/logo"}). There is no default logo.</p></dd>
|
|
|
|
<dt><a name="space"></a>{@code android:manageSpaceActivity}</dt>
|
|
<dd>The fully qualified name of an Activity subclass that the system
|
|
can launch to let users manage the memory occupied by the application
|
|
on the device. The activity should also be declared with an
|
|
<code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code> element.
|
|
</dd>
|
|
|
|
<dt><a name="nm"></a>{@code android:name}</dt>
|
|
<dd>The fully qualified name of an {@link android.app.Application}
|
|
subclass implemented for the application. When the application process
|
|
is started, this class is instantiated before any of the application's
|
|
components.
|
|
|
|
<p>
|
|
The subclass is optional; most applications won't need one.
|
|
In the absence of a subclass, Android uses an instance of the base
|
|
Application class.
|
|
</p></dd>
|
|
|
|
<dt><a name="prmsn"></a>{@code android:permission}</dt>
|
|
<dd>The name of a permission that clients must have in order to interact
|
|
with the application. This attribute is a convenient way to set a
|
|
permission that applies to all of the application's components. It can
|
|
be overwritten by setting the {@code permission} attributes of individual
|
|
components.
|
|
|
|
<p>
|
|
For more information on permissions, see the
|
|
<a href="{@docRoot}guide/topics/manifest/manifest-intro.html#sectperm">Permissions</a>
|
|
section in the introduction and another document,
|
|
<a href="{@docRoot}guide/topics/security/security.html">Security and
|
|
Permissions</a>.
|
|
</p></dd>
|
|
|
|
<dt><a name="persistent"></a>{@code android:persistent}</dt>
|
|
<dd>Whether or not the application should remain running at all times —
|
|
{@code "true"} if it should, and {@code "false"} if not. The default value
|
|
is {@code "false"}. Applications should not normally set this flag;
|
|
persistence mode is intended only for certain system applications.</dd>
|
|
|
|
<dt><a name="proc"></a>{@code android:process}</dt>
|
|
<dd>The name of a process where all components of the application should run.
|
|
Each component can override this default by setting its own {@code process}
|
|
attribute.
|
|
|
|
<p>
|
|
By default, Android creates a process for an application when the first
|
|
of its components needs to run. All components then run in that process.
|
|
The name of the default process matches the package name set by the
|
|
<code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code> element.
|
|
</p>
|
|
|
|
<p>By setting this attribute to a process name that's shared with another
|
|
application, you can arrange for components of both applications to run in
|
|
the same process — but only if the two applications also share a
|
|
user ID and be signed with the same certificate.
|
|
</p>
|
|
|
|
<p>
|
|
If the name assigned to this attribute begins with a colon (':'), a new
|
|
process, private to the application, is created when it's needed.
|
|
If the process name begins with a lowercase character, a global process
|
|
of that name is created. A global process can be shared with other
|
|
applications, reducing resource usage.
|
|
</p></dd>
|
|
|
|
<dt><a name="restoreany"></a>{@code android:restoreAnyVersion}</dt>
|
|
<dd>Indicates that the application is prepared to attempt a restore of any
|
|
backed-up data set, even if the backup was stored by a newer version
|
|
of the application than is currently installed on the device. Setting
|
|
this attribute to {@code true} will permit the Backup Manager to
|
|
attempt restore even when a version mismatch suggests that the data are
|
|
incompatible. <em>Use with caution!</em>
|
|
|
|
<p>The default value of this attribute is {@code false}.
|
|
</p></dd>
|
|
|
|
<dt><a name="supportsrtl"></a>{@code android:supportsRtl}</dt>
|
|
<dd>Declares whether your application is willing to support right-to-left (RTL) layouts.
|
|
<p>If set to {@code true} and <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
|
|
>{@code targetSdkVersion}</a> is set to 17 or higher, various RTL APIs will be
|
|
activated and used by the system so your app can display RTL layouts.
|
|
If set to {@code false} or if <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
|
|
>{@code targetSdkVersion}</a> is set to 16 or lower, the RTL APIs will be ignored
|
|
or will have no effect and your app will behave the same regardless of the layout
|
|
direction associated to the user's Locale choice (your layouts will always be left-to-right).
|
|
|
|
<p>The default value of this attribute is {@code false}.</p>
|
|
|
|
<p>This attribute was added in API level 17.</p>
|
|
</dd>
|
|
|
|
<dt><a name="aff"></a>{@code android:taskAffinity}</dt>
|
|
<dd>An affinity name that applies to all activities within the application,
|
|
except for those that set a different affinity with their own
|
|
<code><a href="{@docRoot}guide/topics/manifest/activity-element.html#aff">taskAffinity</a></code>
|
|
attributes. See that attribute for more information.
|
|
|
|
<p>
|
|
By default, all activities within an application share the same
|
|
affinity. The name of that affinity is the same as the package name
|
|
set by the
|
|
<code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code> element.
|
|
</p></dd>
|
|
|
|
<dt><a name="theme"></a>{@code android:theme}</dt>
|
|
<dd>A reference to a style resource defining a default theme for all
|
|
activities in the application. Individual activities can override
|
|
the default by setting their own <code><a href="{@docRoot}guide/topics/manifest/activity-element.html#theme">theme</a></code>
|
|
attributes. For more information, see the <a
|
|
href="{@docRoot}guide/topics/ui/themes.html">Styles and Themes</a> developer guide.
|
|
</dd>
|
|
|
|
<!-- ##api level 14## -->
|
|
<dt><a name="uioptions"></a>{@code android:uiOptions}</dt>
|
|
<dd>Extra options for an activity's UI.
|
|
<p>Must be one of the following values.</p>
|
|
|
|
<table>
|
|
<tr><th>Value</th><th>Description</th></tr>
|
|
<tr><td>{@code "none"}</td><td>No extra UI options. This is the default.</td></tr>
|
|
<tr><td>{@code "splitActionBarWhenNarrow"}</td><td>Add a bar at
|
|
the bottom of the screen to display action items in the {@link android.app.ActionBar}, when
|
|
constrained for horizontal space (such as when in portrait mode on a handset). Instead of a small
|
|
number of action items appearing in the action bar at the top of the screen, the action bar is
|
|
split into the top navigation section and the bottom bar for action items. This ensures a reasonable
|
|
amount of space is made available not only for the action items, but also for navigation and title
|
|
elements at the top. Menu items are not split across the two bars; they always appear
|
|
together.</td></tr>
|
|
</table>
|
|
<p>For more information about the action bar, see the <a
|
|
href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> developer guide.</p>
|
|
<p>This attribute was added in API level 14.</p>
|
|
</dd>
|
|
|
|
</dl></dd>
|
|
|
|
<!-- ##api level indication## -->
|
|
<dt>introduced in:</dt>
|
|
<dd>API Level 1</dd>
|
|
|
|
<dt>see also:</dt>
|
|
<dd><code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code>
|
|
<br/><code><a href="{@docRoot}guide/topics/manifest/service-element.html"><service></a></code>
|
|
<br/><code><a href="{@docRoot}guide/topics/manifest/receiver-element.html"><receiver></a></code>
|
|
<br/><code><a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a></code></dd>
|
|
|
|
</dl>
|