Merge "Fix @code escapes"
am: b0d92f4717
* commit 'b0d92f4717af4e4736dc80b2a822dae8e5a52587':
Fix @code escapes
This commit is contained in:
@@ -29,10 +29,10 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* on the binder thread.
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* (@BinderThread
|
||||
* <pre><code>
|
||||
* @BinderThread
|
||||
* public BeamShareData createBeamShareData() { ... }
|
||||
* }</pre>
|
||||
* </code></pre>
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
|
||||
@@ -25,10 +25,10 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* Denotes that any overriding methods should invoke this method as well.
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* <pre><code>
|
||||
* @CallSuper
|
||||
* public abstract void onFocusLost();
|
||||
* }</pre>
|
||||
* </code></pre>
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* public @CheckResult String trim(String s) { return s.trim(); }
|
||||
* public @CheckResult String trim(String s) { return s.trim(); }
|
||||
* ...
|
||||
* s.trim(); // this is probably an error
|
||||
* s = s.trim(); // ok
|
||||
|
||||
@@ -31,7 +31,7 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* public abstract void setTextColor(@ColorInt int color);
|
||||
* public abstract void setTextColor(@ColorInt int color);
|
||||
* }</pre>
|
||||
*
|
||||
* @hide
|
||||
|
||||
@@ -28,12 +28,12 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* Denotes that the annotated element should be a float or double in the given range
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* <pre><code>
|
||||
* @FloatRange(from=0.0,to=1.0)
|
||||
* public float getAlpha() {
|
||||
* ...
|
||||
* }
|
||||
* }</pre>
|
||||
* </code></pre>
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
|
||||
@@ -28,24 +28,24 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
|
||||
* multiple constants can be combined.
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* @Retention(CLASS)
|
||||
* @IntDef({NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
|
||||
* public @interface NavigationMode {}
|
||||
* <pre><code>
|
||||
* @Retention(SOURCE)
|
||||
* @IntDef({NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
|
||||
* public @interface NavigationMode {}
|
||||
* public static final int NAVIGATION_MODE_STANDARD = 0;
|
||||
* public static final int NAVIGATION_MODE_LIST = 1;
|
||||
* public static final int NAVIGATION_MODE_TABS = 2;
|
||||
* ...
|
||||
* public abstract void setNavigationMode(@NavigationMode int mode);
|
||||
* public abstract void setNavigationMode(@NavigationMode int mode);
|
||||
* @NavigationMode
|
||||
* public abstract int getNavigationMode();
|
||||
* }</pre>
|
||||
* </code></pre>
|
||||
* For a flag, set the flag attribute:
|
||||
* <pre>{@code
|
||||
* <pre><code>
|
||||
* @IntDef(
|
||||
* flag = true
|
||||
* value = {NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
|
||||
* }</pre>
|
||||
* value = {NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
|
||||
* </code></pre>
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
|
||||
@@ -28,12 +28,12 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* Denotes that the annotated element should be an int or long in the given range
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* <pre><code>
|
||||
* @IntRange(from=0,to=255)
|
||||
* public int getAlpha() {
|
||||
* ...
|
||||
* }
|
||||
* }</pre>
|
||||
* </code></pre>
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
|
||||
@@ -29,10 +29,10 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* on the main thread.
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* <pre><code>
|
||||
* @MainThread
|
||||
* public void deliverResult(D data) { ... }
|
||||
* }</pre>
|
||||
* </code></pre>
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
|
||||
@@ -29,26 +29,26 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* <p/>
|
||||
* Example of requiring a single permission:
|
||||
* <pre>{@code
|
||||
* @RequiresPermission(Manifest.permission.SET_WALLPAPER)
|
||||
* {@literal @}RequiresPermission(Manifest.permission.SET_WALLPAPER)
|
||||
* public abstract void setWallpaper(Bitmap bitmap) throws IOException;
|
||||
*
|
||||
* @RequiresPermission(ACCESS_COARSE_LOCATION)
|
||||
* {@literal @}RequiresPermission(ACCESS_COARSE_LOCATION)
|
||||
* public abstract Location getLastKnownLocation(String provider);
|
||||
* }</pre>
|
||||
* Example of requiring at least one permission from a set:
|
||||
* <pre>{@code
|
||||
* @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
|
||||
* {@literal @}RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
|
||||
* public abstract Location getLastKnownLocation(String provider);
|
||||
* }</pre>
|
||||
* Example of requiring multiple permissions:
|
||||
* <pre>{@code
|
||||
* @RequiresPermission(allOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
|
||||
* {@literal @}RequiresPermission(allOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
|
||||
* public abstract Location getLastKnownLocation(String provider);
|
||||
* }</pre>
|
||||
* Example of requiring separate read and write permissions for a content provider:
|
||||
* <pre>{@code
|
||||
* @RequiresPermission.Read(@RequiresPermission(READ_HISTORY_BOOKMARKS))
|
||||
* @RequiresPermission.Write(@RequiresPermission(WRITE_HISTORY_BOOKMARKS))
|
||||
* {@literal @}RequiresPermission.Read(@RequiresPermission(READ_HISTORY_BOOKMARKS))
|
||||
* {@literal @}RequiresPermission.Write(@RequiresPermission(WRITE_HISTORY_BOOKMARKS))
|
||||
* public static final Uri BOOKMARKS_URI = Uri.parse("content://browser/bookmarks");
|
||||
* }</pre>
|
||||
*
|
||||
|
||||
@@ -31,7 +31,7 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* public void getLocationInWindow(@Size(2) int[] location) {
|
||||
* public void getLocationInWindow(@Size(2) int[] location) {
|
||||
* ...
|
||||
* }
|
||||
* }</pre>
|
||||
|
||||
@@ -26,20 +26,20 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
|
||||
* type and that its value should be one of the explicitly named constants.
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* <pre><code>
|
||||
* @Retention(SOURCE)
|
||||
* @StringDef({
|
||||
* @StringDef({
|
||||
* POWER_SERVICE,
|
||||
* WINDOW_SERVICE,
|
||||
* LAYOUT_INFLATER_SERVICE
|
||||
* })
|
||||
* public @interface ServiceName {}
|
||||
* })
|
||||
* public @interface ServiceName {}
|
||||
* public static final String POWER_SERVICE = "power";
|
||||
* public static final String WINDOW_SERVICE = "window";
|
||||
* public static final String LAYOUT_INFLATER_SERVICE = "layout_inflater";
|
||||
* ...
|
||||
* public abstract Object getSystemService(@ServiceName String name);
|
||||
* }</pre>
|
||||
* public abstract Object getSystemService(@ServiceName String name);
|
||||
* </code></pre>
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
|
||||
@@ -29,10 +29,10 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* on the UI thread.
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* <pre><code>
|
||||
* @UiThread
|
||||
* public abstract void setText(@NonNull String text) { ... }
|
||||
* }</pre>
|
||||
* public abstract void setText(@NonNull String text) { ... }
|
||||
* </code></pre>
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
|
||||
@@ -29,10 +29,10 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* on a worker thread.
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* (@WorkerThread
|
||||
* <pre><code>
|
||||
* @WorkerThread
|
||||
* protected abstract FilterResults performFiltering(CharSequence constraint);
|
||||
* }</pre>
|
||||
* </code></pre>
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
|
||||
@@ -82,9 +82,9 @@ public class ActivityManager {
|
||||
|
||||
/**
|
||||
* <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code
|
||||
* <meta-data>}</a> name for a 'home' Activity that declares a package that is to be
|
||||
* <meta-data>}</a> name for a 'home' Activity that declares a package that is to be
|
||||
* uninstalled in lieu of the declaring one. The package named here must be
|
||||
* signed with the same certificate as the one declaring the {@code <meta-data>}.
|
||||
* signed with the same certificate as the one declaring the {@code <meta-data>}.
|
||||
*/
|
||||
public static final String META_HOME_ALTERNATE = "android.app.home.alternate";
|
||||
|
||||
|
||||
@@ -2882,8 +2882,7 @@ public class Camera {
|
||||
* <var>y</var> for the Y plane and row <var>c</var> for the U and V
|
||||
* planes:
|
||||
*
|
||||
* {@code
|
||||
* <pre>
|
||||
* <pre>{@code
|
||||
* yStride = (int) ceil(width / 16.0) * 16;
|
||||
* uvStride = (int) ceil( (yStride / 2) / 16.0) * 16;
|
||||
* ySize = yStride * height;
|
||||
@@ -2891,8 +2890,9 @@ public class Camera {
|
||||
* yRowIndex = yStride * y;
|
||||
* uRowIndex = ySize + uvSize + uvStride * c;
|
||||
* vRowIndex = ySize + uvStride * c;
|
||||
* size = ySize + uvSize * 2;</pre>
|
||||
* size = ySize + uvSize * 2;
|
||||
* }
|
||||
*</pre>
|
||||
*
|
||||
* @param pixel_format the desired preview picture format, defined by
|
||||
* one of the {@link android.graphics.ImageFormat} constants. (E.g.,
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
not all Android-powered devices support all hardware features, so you should declare hardware
|
||||
that your application requires using the <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
|
||||
<uses-feature>}</a> manifest element.</p>
|
||||
<uses-feature>}</a> manifest element.</p>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
@@ -97,7 +97,7 @@ import javax.net.ssl.SSLEngine;
|
||||
*
|
||||
* SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
* sslContext.init(
|
||||
* new KeyManager[] {pskKeyManager},
|
||||
* new KeyManager[] { pskKeyManager },
|
||||
* new TrustManager[0], // No TrustManagers needed for TLS-PSK
|
||||
* null // Use the default source of entropy
|
||||
* );
|
||||
|
||||
@@ -914,7 +914,7 @@ public final class NfcAdapter {
|
||||
*
|
||||
* <p>If you want to prevent the Android OS from sending default NDEF
|
||||
* messages completely (for all activities), you can include a
|
||||
* {@code <meta-data>} element inside the {@code <application>}
|
||||
* {@code <meta-data>} element inside the {@code <application>}
|
||||
* element of your AndroidManifest.xml file, like this:
|
||||
* <pre>
|
||||
* <application ...>
|
||||
@@ -1022,7 +1022,7 @@ public final class NfcAdapter {
|
||||
*
|
||||
* <p>If you want to prevent the Android OS from sending default NDEF
|
||||
* messages completely (for all activities), you can include a
|
||||
* {@code <meta-data>} element inside the {@code <application>}
|
||||
* {@code <meta-data>} element inside the {@code <application>}
|
||||
* element of your AndroidManifest.xml file, like this:
|
||||
* <pre>
|
||||
* <application ...>
|
||||
|
||||
@@ -96,7 +96,7 @@ import android.util.Log;
|
||||
* </table>
|
||||
* <p>
|
||||
* Any application using a WakeLock must request the {@code android.permission.WAKE_LOCK}
|
||||
* permission in an {@code <uses-permission>} element of the application's manifest.
|
||||
* permission in an {@code <uses-permission>} element of the application's manifest.
|
||||
* </p>
|
||||
*/
|
||||
public final class PowerManager {
|
||||
@@ -1004,7 +1004,7 @@ public final class PowerManager {
|
||||
* to have the device stay on.
|
||||
* <p>
|
||||
* Any application using a WakeLock must request the {@code android.permission.WAKE_LOCK}
|
||||
* permission in an {@code <uses-permission>} element of the application's manifest.
|
||||
* permission in an {@code <uses-permission>} element of the application's manifest.
|
||||
* Obtain a wake lock by calling {@link PowerManager#newWakeLock(int, String)}.
|
||||
* </p><p>
|
||||
* Call {@link #acquire()} to acquire the wake lock and force the device to stay
|
||||
|
||||
@@ -98,7 +98,7 @@ import com.android.internal.util.DumpUtils.Dump;
|
||||
* </service>
|
||||
* </pre>
|
||||
*
|
||||
* <p>If specified with the {@code <meta-data>} element,
|
||||
* <p>If specified with the {@code <meta-data>} element,
|
||||
* additional information for the dream is defined using the
|
||||
* {@link android.R.styleable#Dream <dream>} element in a separate XML file.
|
||||
* Currently, the only addtional
|
||||
|
||||
@@ -12,9 +12,9 @@ spelling suggestions as {@link android.view.textservice.SuggestionsInfo} objects
|
||||
|
||||
<p>Applications with a spell checker service must declare the {@link
|
||||
android.Manifest.permission#BIND_TEXT_SERVICE} permission as required by the service. The service
|
||||
must also declare an intent filter with {@code <action
|
||||
must also declare an intent filter with {@code <action
|
||||
android:name="android.service.textservice.SpellCheckerService" />} as the intent’s action and should
|
||||
include a {@code <meta-data>} element that declares configuration information for the spell
|
||||
include a {@code <meta-data>} element that declares configuration information for the spell
|
||||
checker. For example:</p>
|
||||
|
||||
<pre>
|
||||
|
||||
@@ -69,7 +69,7 @@ public interface RecognitionListener {
|
||||
* Called when recognition results are ready.
|
||||
*
|
||||
* @param results the recognition results. To retrieve the results in {@code
|
||||
* ArrayList<String>} format use {@link Bundle#getStringArrayList(String)} with
|
||||
* ArrayList<String>} format use {@link Bundle#getStringArrayList(String)} with
|
||||
* {@link SpeechRecognizer#RESULTS_RECOGNITION} as a parameter. A float array of
|
||||
* confidence values might also be given in {@link SpeechRecognizer#CONFIDENCE_SCORES}.
|
||||
*/
|
||||
|
||||
@@ -303,7 +303,7 @@ public abstract class RecognitionService extends Service {
|
||||
* The service should call this method when recognition results are ready.
|
||||
*
|
||||
* @param results the recognition results. To retrieve the results in {@code
|
||||
* ArrayList<String>} format use {@link Bundle#getStringArrayList(String)} with
|
||||
* ArrayList<String>} format use {@link Bundle#getStringArrayList(String)} with
|
||||
* {@link SpeechRecognizer#RESULTS_RECOGNITION} as a parameter
|
||||
*/
|
||||
public void results(Bundle results) throws RemoteException {
|
||||
|
||||
@@ -842,7 +842,7 @@ public class Time {
|
||||
* the given time.
|
||||
*
|
||||
* <p>
|
||||
* Equivalent to {@code Time.compare(this, that) < 0}. See
|
||||
* Equivalent to {@code Time.compare(this, that) < 0}. See
|
||||
* {@link #compare(Time, Time)} for details.
|
||||
*
|
||||
* @param that a given Time object to compare against
|
||||
@@ -858,7 +858,7 @@ public class Time {
|
||||
* the given time.
|
||||
*
|
||||
* <p>
|
||||
* Equivalent to {@code Time.compare(this, that) > 0}. See
|
||||
* Equivalent to {@code Time.compare(this, that) > 0}. See
|
||||
* {@link #compare(Time, Time)} for details.
|
||||
*
|
||||
* @param that a given Time object to compare against
|
||||
|
||||
@@ -36,13 +36,12 @@ import android.util.AttributeSet;
|
||||
* arc between two points.
|
||||
* </p>
|
||||
* <p>This may be used in XML as an element inside a transition.</p>
|
||||
* <pre>
|
||||
* {@code
|
||||
* <changeBounds>
|
||||
* <arcMotion android:minimumHorizontalAngle="15"
|
||||
* <pre>{@code
|
||||
* <changeBounds>
|
||||
* <arcMotion android:minimumHorizontalAngle="15"
|
||||
* android:minimumVerticalAngle="0"
|
||||
* android:maximumAngle="90"/>
|
||||
* </changeBounds>}
|
||||
* </changeBounds>}
|
||||
* </pre>
|
||||
*/
|
||||
public class ArcMotion extends PathMotion {
|
||||
|
||||
@@ -31,9 +31,9 @@ import android.util.AttributeSet;
|
||||
* <p>This may be used in XML as an element inside a transition.</p>
|
||||
* <pre>
|
||||
* {@code
|
||||
* <changeBounds>
|
||||
* <pathMotion class="my.app.transition.MyPathMotion"/>
|
||||
* </changeBounds>
|
||||
* <changeBounds>
|
||||
* <pathMotion class="my.app.transition.MyPathMotion"/>
|
||||
* </changeBounds>
|
||||
* }
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@@ -30,11 +30,10 @@ import android.util.PathParser;
|
||||
* The starting point of the Path will be moved to the origin and the end point will be scaled
|
||||
* and rotated so that it matches with the target end point.
|
||||
* <p>This may be used in XML as an element inside a transition.</p>
|
||||
* <pre>
|
||||
* {@code
|
||||
* <changeBounds>
|
||||
* <patternPathMotion android:patternPathData="M0 0 L0 100 L100 100"/>
|
||||
* </changeBounds>}
|
||||
* <pre>{@code
|
||||
* <changeBounds>
|
||||
* <patternPathMotion android:patternPathData="M0 0 L0 100 L100 100"/>
|
||||
* </changeBounds>}
|
||||
* </pre>
|
||||
*/
|
||||
public class PatternPathMotion extends PathMotion {
|
||||
|
||||
@@ -2052,18 +2052,18 @@ public abstract class Transition implements Cloneable {
|
||||
* attributed with the fully-described class name. For example:</p>
|
||||
* <pre>
|
||||
* {@code
|
||||
* <changeBounds>
|
||||
* <pathMotion class="my.app.transition.MyPathMotion"/>
|
||||
* </changeBounds>
|
||||
* <changeBounds>
|
||||
* <pathMotion class="my.app.transition.MyPathMotion"/>
|
||||
* </changeBounds>
|
||||
* }
|
||||
* </pre>
|
||||
* <p>or</p>
|
||||
* <pre>
|
||||
* {@code
|
||||
* <changeBounds>
|
||||
* <arcMotion android:minimumHorizontalAngle="15"
|
||||
* <changeBounds>
|
||||
* <arcMotion android:minimumHorizontalAngle="15"
|
||||
* android:minimumVerticalAngle="0" android:maximumAngle="90"/>
|
||||
* </changeBounds>
|
||||
* </changeBounds>
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
@@ -2090,20 +2090,18 @@ public abstract class Transition implements Cloneable {
|
||||
* the built-in tags <code>arcMotion</code> or <code>patternPathMotion</code> or it can
|
||||
* be a custom PathMotion using <code>pathMotion</code> with the <code>class</code>
|
||||
* attributed with the fully-described class name. For example:</p>
|
||||
* <pre>
|
||||
* {@code
|
||||
* <changeBounds>
|
||||
* <pathMotion class="my.app.transition.MyPathMotion"/>
|
||||
* </changeBounds>}
|
||||
* <pre>{@code
|
||||
* <changeBounds>
|
||||
* <pathMotion class="my.app.transition.MyPathMotion"/>
|
||||
* </changeBounds>}
|
||||
* </pre>
|
||||
* <p>or</p>
|
||||
* <pre>
|
||||
* {@code
|
||||
* <changeBounds>
|
||||
* <arcMotion android:minimumHorizontalAngle="15"
|
||||
* <pre>{@code
|
||||
* <changeBounds>
|
||||
* <arcMotion android:minimumHorizontalAngle="15"
|
||||
* android:minimumVerticalAngle="0"
|
||||
* android:maximumAngle="90"/>
|
||||
* </changeBounds>}
|
||||
* </changeBounds>}
|
||||
* </pre>
|
||||
*
|
||||
* @return The algorithm object used to interpolate along two dimensions.
|
||||
|
||||
@@ -48,7 +48,7 @@ import java.util.Map;
|
||||
/**
|
||||
* This class is used to specify meta information of an input method.
|
||||
*
|
||||
* <p>It should be defined in an XML resource file with an {@code <input-method>} element.
|
||||
* <p>It should be defined in an XML resource file with an {@code <input-method>} element.
|
||||
* For more information, see the guide to
|
||||
* <a href="{@docRoot}guide/topics/text/creating-input-method.html">
|
||||
* Creating an Input Method</a>.</p>
|
||||
|
||||
@@ -41,7 +41,7 @@ import java.util.Locale;
|
||||
* the specified subtype of the designated IME directly.
|
||||
*
|
||||
* <p>It should be defined in an XML resource file of the input method with the
|
||||
* <code><subtype></code> element, which resides within an {@code <input-method>} element.
|
||||
* <code><subtype></code> element, which resides within an {@code <input-method>} element.
|
||||
* For more information, see the guide to
|
||||
* <a href="{@docRoot}guide/topics/text/creating-input-method.html">
|
||||
* Creating an Input Method</a>.</p>
|
||||
|
||||
@@ -92,7 +92,7 @@ import java.util.Map;
|
||||
* </pre>
|
||||
* <p>See {@link android.content.Intent} for more information.</p>
|
||||
*
|
||||
* <p>To provide a WebView in your own Activity, include a {@code <WebView>} in your layout,
|
||||
* <p>To provide a WebView in your own Activity, include a {@code <WebView>} in your layout,
|
||||
* or set the entire Activity window as a WebView during {@link
|
||||
* android.app.Activity#onCreate(Bundle) onCreate()}:</p>
|
||||
* <pre class="prettyprint">
|
||||
|
||||
@@ -118,7 +118,7 @@ import java.util.ArrayList;
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* <p>To add a progress bar to a layout file, you can use the {@code <ProgressBar>} element.
|
||||
* <p>To add a progress bar to a layout file, you can use the {@code <ProgressBar>} element.
|
||||
* By default, the progress bar is a spinning wheel (an indeterminate indicator). To change to a
|
||||
* horizontal progress bar, apply the {@link android.R.style#Widget_ProgressBar_Horizontal
|
||||
* Widget.ProgressBar.Horizontal} style, like so:</p>
|
||||
|
||||
@@ -710,8 +710,8 @@
|
||||
|
||||
<!-- Required to be able to access the camera device.
|
||||
<p>This will automatically enforce the <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
|
||||
<uses-feature>}</a> manifest element for <em>all</em> camera features.
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">
|
||||
<uses-feature>}</a> manifest element for <em>all</em> camera features.
|
||||
If you do not require all camera features or can properly operate if a camera
|
||||
is not available, then you must modify your manifest as appropriate in order to
|
||||
install on devices that don't support all camera features.</p>
|
||||
|
||||
@@ -629,7 +629,7 @@
|
||||
specified, it will run in the current preferred orientation
|
||||
of the screen.
|
||||
<p>This attribute is supported by the <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
element. -->
|
||||
<attr name="screenOrientation">
|
||||
<!-- No preference specified: let the system decide the best
|
||||
@@ -914,8 +914,8 @@
|
||||
<enum name="preferExternal" value="2" />
|
||||
</attr>
|
||||
|
||||
<!-- Extra options for an activity's UI. Applies to either the {@code <activity>} or
|
||||
{@code <application>} tag. If specified on the {@code <application>}
|
||||
<!-- Extra options for an activity's UI. Applies to either the {@code <activity>} or
|
||||
{@code <application>} tag. If specified on the {@code <application>}
|
||||
tag these will be considered defaults for all activities in the
|
||||
application. -->
|
||||
<attr name="uiOptions">
|
||||
|
||||
@@ -46,7 +46,7 @@ please see themes_device_defaults.xml.
|
||||
with API level 14, the default system theme is supplied by {@link #Theme_DeviceDefault},
|
||||
which might apply a different style on different devices. If you want to ensure that your
|
||||
app consistently uses the Holo theme at all times, you must explicitly declare it in your
|
||||
manifest. For example, {@code <application android:theme="@android:style/Theme.Holo">}.
|
||||
manifest. For example, {@code <application android:theme="@android:style/Theme.Holo">}.
|
||||
For more information, read <a
|
||||
href="http://android-developers.blogspot.com/2012/01/holo-everywhere.html">Holo
|
||||
Everywhere</a>.</p>
|
||||
|
||||
@@ -33,7 +33,7 @@ please see themes_device_defaults.xml.
|
||||
<!-- Material theme (dark version).
|
||||
<p>If you want to ensure that your
|
||||
app consistently uses the Material theme at all times, you must explicitly declare it in your
|
||||
manifest. For example, {@code <application android:theme="@style/Theme.Material">}.
|
||||
manifest. For example, {@code <application android:theme="@style/Theme.Material">}.
|
||||
|
||||
<p>Styles used by the Material theme are named using the convention Type.Material.Etc
|
||||
(for example, {@code Widget.Material.Button} and {@code
|
||||
|
||||
@@ -320,7 +320,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
|
||||
<td>
|
||||
<p style="margin-bottom:.5em;">
|
||||
Si la aplicación utiliza un controlador para juegos como su método de entrada principal, debe declarar el requisito
|
||||
correspondiente con la etiqueta del manifiesto <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>.
|
||||
correspondiente con la etiqueta del manifiesto <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>.
|
||||
(<a href="{@docRoot}training/tv/games/index.html#gamepad">Obtén más información</a>)
|
||||
</p>
|
||||
</td>
|
||||
|
||||
@@ -329,23 +329,23 @@ utilizar estos filtros</strong>.</p>
|
||||
<tr><th>Elemento del manifiesto</th><th>Resumen:</th></tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a></nobr></td>
|
||||
<compatible-screens>}</a></nobr></td>
|
||||
<td>
|
||||
<p>Google Play filtra la aplicación si el tamaño de pantalla del dispositivo no coincide con
|
||||
ninguna de las configuraciones de pantalla (declaradas por un elemento {@code <screen>}) en el elemento {@code
|
||||
<compatible-screens>}.</p>
|
||||
ninguna de las configuraciones de pantalla (declaradas por un elemento {@code <screen>}) en el elemento {@code
|
||||
<compatible-screens>}.</p>
|
||||
<p class="caution"><strong>Advertencia:</strong> Normalmente, <strong>no deberías usar este elemento
|
||||
del manifiesto</strong>. El uso de este elemento puede reducir
|
||||
notablemente la base de usuarios potenciales para tu aplicación, al excluir todas las combinaciones de tamaño de pantalla
|
||||
y densidad que no indicaste. En su lugar, debes usar el elemento del manifiesto <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> (descrito anteriormente en la <a href="#table1">tabla
|
||||
<supports-screens>}</a> (descrito anteriormente en la <a href="#table1">tabla
|
||||
1</a>) para habilitar el modo de compatibilidad de pantalla para las configuraciones de pantalla que no abarcaste
|
||||
con recursos adicionales.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a></nobr></td>
|
||||
<supports-gl-texture>}</a></nobr></td>
|
||||
<td>
|
||||
<p>Google Play filtrará la aplicación a menos que uno o más de los formatos de compresión
|
||||
de texturas GL compatibles con la aplicación también sean compatibles con el dispositivo. </p>
|
||||
@@ -408,16 +408,16 @@ Licencias de aplicaciones</a>. Consulta <a href="{@docRoot}google/play/licensing
|
||||
<ul>
|
||||
<li>Formatos de compresión de texturas OpenGL
|
||||
<p>Mediante el uso del elemento <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a>.</p>
|
||||
<supports-gl-texture>}</a>.</p>
|
||||
</li>
|
||||
<li>Tamaño de pantalla (y, opcionalmente, densidad de la pantalla)
|
||||
<p>Mediante el uso del elemento <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> o <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a>.</p>
|
||||
<supports-screens>}</a> o <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a>.</p>
|
||||
</li>
|
||||
<li>Nivel de API
|
||||
<p>Mediante el uso del elemento <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
|
||||
<uses-sdk>}</a>.</p>
|
||||
<uses-sdk>}</a>.</p>
|
||||
</li>
|
||||
<li>Arquitectura de CPU (ABI)
|
||||
<p>Mediante la inclusión de bibliotecas nativas creadas con el <a href="{@docRoot}tools/sdk/ndk/index.html">NDK de
|
||||
|
||||
@@ -133,8 +133,8 @@ Ejemplo de diálogo de huella dactilar</a>.</p>
|
||||
<pre class="no-prettyprint">
|
||||
adb -e emu finger touch <finger_id>
|
||||
</pre>
|
||||
<p>En Windows, posiblemente tenga que ejecutar {@code telnet 127.0.0.1 <emulator-id>} seguido de
|
||||
{@code finger touch <finger_id>}.
|
||||
<p>En Windows, posiblemente tenga que ejecutar {@code telnet 127.0.0.1 <emulator-id>} seguido de
|
||||
{@code finger touch <finger_id>}.
|
||||
</p>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -192,7 +192,7 @@ Clase {@code chooser.ChooserTargetService}. Declare su
|
||||
</pre>
|
||||
|
||||
<p>Para cada actividad que desee exponer a {@code ChooserTargetService}, agregue un elemento
|
||||
{@code <meta-data>} con el nombre
|
||||
{@code <meta-data>} con el nombre
|
||||
{@code "android.service.chooser.chooser_target_service"} en el manifiesto de su aplicación.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
|
||||
</td>
|
||||
<td>
|
||||
<p style="margin-bottom:.5em;">
|
||||
アプリがその主要な入力方式としてゲーム コントローラを使用する場合、<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> マニフェスト タグで適切な要件を宣言しています。(<a href="{@docRoot}training/tv/games/index.html#gamepad">こちらを参照してください</a>)
|
||||
アプリがその主要な入力方式としてゲーム コントローラを使用する場合、<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> マニフェスト タグで適切な要件を宣言しています。(<a href="{@docRoot}training/tv/games/index.html#gamepad">こちらを参照してください</a>)
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -208,14 +208,14 @@ href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-featur
|
||||
<table>
|
||||
<tr><th>マニフェスト要素</th><th>概要</th></tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a></nobr></td>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a></nobr></td>
|
||||
<td>
|
||||
<p>Google Play はデバイス画面サイズと密度が {@code <compatible-screens>} の要素の画面設定({@code <screen>} 要素で宣言)のいずれにも適合しない場合、アプリをフィルタリングします。</p>
|
||||
<p class="caution"><strong>警告:</strong> 通常は、<strong>このマニフェスト要素を使用すべきではありません</strong>。この要素を使用すると、指定していない画面サイズと密度のすべての組み合わせが除外されることになり、アプリの潜在的なユーザー ベースが大幅に減少する可能性があります。代わりに <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a> マニフェスト要素(<a href="#table1">表 1</a> に記載)を使用して、考慮に入れていない画面設定に対して、代替リソースを使用した画面の互換性モードを有効にすることをお勧めします。</p>
|
||||
<p>Google Play はデバイス画面サイズと密度が {@code <compatible-screens>} の要素の画面設定({@code <screen>} 要素で宣言)のいずれにも適合しない場合、アプリをフィルタリングします。</p>
|
||||
<p class="caution"><strong>警告:</strong> 通常は、<strong>このマニフェスト要素を使用すべきではありません</strong>。この要素を使用すると、指定していない画面サイズと密度のすべての組み合わせが除外されることになり、アプリの潜在的なユーザー ベースが大幅に減少する可能性があります。代わりに <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a> マニフェスト要素(<a href="#table1">表 1</a> に記載)を使用して、考慮に入れていない画面設定に対して、代替リソースを使用した画面の互換性モードを有効にすることをお勧めします。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a></nobr></td>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a></nobr></td>
|
||||
<td>
|
||||
<p>Google Play はアプリでサポートされる 1 つ以上の GL テクスチャ圧縮フォーマットがデバイスで同様にサポートされない場合、アプリをフィルタリングします。 </p>
|
||||
</td>
|
||||
@@ -249,11 +249,11 @@ href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-featur
|
||||
|
||||
<p>現時点では、Google Play では各 APK が次の設定に基づいて別々のフィルタを提供する際にのみ、同じアプリの複数の APK を公開できます。</p>
|
||||
<ul>
|
||||
<li>OpenGL テクスチャ圧縮フォーマット <p><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a> 要素の使用による。</p>
|
||||
<li>OpenGL テクスチャ圧縮フォーマット <p><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a> 要素の使用による。</p>
|
||||
</li>
|
||||
<li>画面サイズ(画面密度も指定可能) <p><a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a>要素または<a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a> 要素の使用による。</p>
|
||||
<li>画面サイズ(画面密度も指定可能) <p><a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a>要素または<a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a> 要素の使用による。</p>
|
||||
</li>
|
||||
<li>API レベル <p><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> 要素の使用による。</p>
|
||||
<li>API レベル <p><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> 要素の使用による。</p>
|
||||
</li>
|
||||
<li>CPU アーキテクチャ(ABI) <p>特定の CPU アーキテクチャ(ARM EABI v7 または x86 など)を対象とする<a href="{@docRoot}tools/sdk/ndk/index.html"> Android NDK</a> で構築されたネイティブ ライブラリの組み込みによる。</p>
|
||||
</li>
|
||||
|
||||
@@ -329,7 +329,7 @@ Intent オブジェクトでは、対象とするコンポーネントを明示
|
||||
<p style="margin-left: 2em">{@code FLAG_ACTIVITY_NEW_TASK} <br/>{@code FLAG_ACTIVITY_CLEAR_TOP} <br/>{@code FLAG_ACTIVITY_RESET_TASK_IF_NEEDED} <br/>{@code FLAG_ACTIVITY_SINGLE_TOP}</p>
|
||||
|
||||
<p>
|
||||
また、主に使用する {@code <activity>} 属性は以下のとおりです:
|
||||
また、主に使用する {@code <activity>} 属性は以下のとおりです:
|
||||
|
||||
<p style="margin-left: 2em">{@code taskAffinity} <br/>{@code launchMode} <br/>{@code allowTaskReparenting} <br/>{@code clearTaskOnLaunch} <br/>{@code alwaysRetainTaskState} <br/>{@code finishOnTaskLaunch}</p>
|
||||
|
||||
@@ -341,7 +341,7 @@ Intent オブジェクトでは、対象とするコンポーネントを明示
|
||||
<h3 id="afftask">親和性と新しいタスク</h3>
|
||||
|
||||
<p>
|
||||
デフォルトでは、アプリケーション内のすべてのアクティビティは相互に親和性があり、すべてのアクティビティができる限り同じタスクに属そうとします。<i></i>ただし、{@code <activity>} 要素の {@code taskAffinity} 属性を使用して、アクティビティごとに個別の親和性を設定することもできます。つまり、別々のアプリケーションで定義されているアクティビティで親和性を共有したり、同じアプリケーションで定義されているアクティビティに別々の親和性を割り当てたりできるということです。親和性が作用する状況は 2 つあります。1 つはアクティビティを起動する Intent オブジェクトに {@code FLAG_ACTIVITY_NEW_TASK} フラグが含まれている場合、もう 1 つはアクティビティの {@code allowTaskReparenting} 属性が "{@code true}" に設定されている場合です。
|
||||
デフォルトでは、アプリケーション内のすべてのアクティビティは相互に親和性があり、すべてのアクティビティができる限り同じタスクに属そうとします。<i></i>ただし、{@code <activity>} 要素の {@code taskAffinity} 属性を使用して、アクティビティごとに個別の親和性を設定することもできます。つまり、別々のアプリケーションで定義されているアクティビティで親和性を共有したり、同じアプリケーションで定義されているアクティビティに別々の親和性を割り当てたりできるということです。親和性が作用する状況は 2 つあります。1 つはアクティビティを起動する Intent オブジェクトに {@code FLAG_ACTIVITY_NEW_TASK} フラグが含まれている場合、もう 1 つはアクティビティの {@code allowTaskReparenting} 属性が "{@code true}" に設定されている場合です。
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
@@ -361,7 +361,7 @@ href="{@docRoot}guide/topics/manifest/activity-element.html#reparent">allowTaskR
|
||||
<h3 id="lmodes">起動モード</h3>
|
||||
|
||||
<p>
|
||||
<code><a href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">launchMode</a></code> 属性の {@code <activity>} 要素には、以下の 4 種類の起動モードを割り当てることができます:
|
||||
<code><a href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">launchMode</a></code> 属性の {@code <activity>} 要素には、以下の 4 種類の起動モードを割り当てることができます:
|
||||
</p>
|
||||
|
||||
<p style="margin-left: 2em">"{@code standard}"(デフォルト モード)<br>"{@code singleTop}"<br>"{@code singleTask}"<br>"{@code singleInstance}"</p>
|
||||
@@ -470,7 +470,7 @@ android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP FLAG_ACTIVITY_CLEAR_TOP}</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
ユーザーがアクティビティに戻ることができるようにしない場合は、{@code <activity>} 要素の {@code finishOnTaskLaunch} を "{@code true}" に設定します。詳しくは、<a href="#clearstack">スタックのクリア</a>をご覧ください。
|
||||
ユーザーがアクティビティに戻ることができるようにしない場合は、{@code <activity>} 要素の {@code finishOnTaskLaunch} を "{@code true}" に設定します。詳しくは、<a href="#clearstack">スタックのクリア</a>をご覧ください。
|
||||
</p>
|
||||
|
||||
|
||||
@@ -488,7 +488,7 @@ Android では、最初のアプリケーション コンポーネントを実
|
||||
<h3 id="procs">プロセス</h3>
|
||||
|
||||
<p>
|
||||
コンポーネントを実行するプロセスは、マニフェスト ファイルで管理します。コンポーネントの各要素({@code <activity>}、{@code <service>}、{@code <receiver>}、および {@code <provider>})には {@code process} 属性があり、そのコンポーネントをどのプロセスで実行すべきかを指定できるようになっています。これらの属性の設定によって、それぞれのコンポーネントを専用のプロセスで実行したり、一部のコンポーネントだけでプロセスを共有したりできます。また、別々のアプリケーションのコンポーネントが、同じプロセスで実行されるように設定することもできます。この場合は、それらのアプリケーションが同じ Linux ユーザー ID を共有し、同じ認証機関によって署名されている必要があります。{@code <application>} 要素にも {@code process} 属性があり、すべてのコンポーネントに適用されるデフォルト値を設定できます。
|
||||
コンポーネントを実行するプロセスは、マニフェスト ファイルで管理します。コンポーネントの各要素({@code <activity>}、{@code <service>}、{@code <receiver>}、および {@code <provider>})には {@code process} 属性があり、そのコンポーネントをどのプロセスで実行すべきかを指定できるようになっています。これらの属性の設定によって、それぞれのコンポーネントを専用のプロセスで実行したり、一部のコンポーネントだけでプロセスを共有したりできます。また、別々のアプリケーションのコンポーネントが、同じプロセスで実行されるように設定することもできます。この場合は、それらのアプリケーションが同じ Linux ユーザー ID を共有し、同じ認証機関によって署名されている必要があります。{@code <application>} 要素にも {@code process} 属性があり、すべてのコンポーネントに適用されるデフォルト値を設定できます。
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -133,8 +133,8 @@ page.image=images/cards/card-api-overview_16-9_2x.png
|
||||
<pre class="no-prettyprint">
|
||||
adb -e emu finger touch <finger_id>
|
||||
</pre>
|
||||
<p>Windows では、{@code telnet 127.0.0.1 <emulator-id>}、
|
||||
{@code finger touch <finger_id>} の順に実行する必要がある場合があります。
|
||||
<p>Windows では、{@code telnet 127.0.0.1 <emulator-id>}、
|
||||
{@code finger touch <finger_id>} の順に実行する必要がある場合があります。
|
||||
</p>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -192,7 +192,7 @@ adb -e emu finger touch <finger_id>
|
||||
</pre>
|
||||
|
||||
<p>{@code ChooserTargetService} に公開するアクティビティごとに、 {@code "android.service.chooser.chooser_target_service"} という名前の
|
||||
{@code <meta-data>} 要素をアプリのマニフェストに追加します。
|
||||
{@code <meta-data>} 要素をアプリのマニフェストに追加します。
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ android.app.Activity#onCreate onCreate()} メソッドを呼び出します。
|
||||
|
||||
<p>アプリのメインのアクティビティは、{@link
|
||||
android.content.Intent#ACTION_MAIN MAIN} アクションと {@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER} カテゴリを含む <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a> を使用してマニフェストで宣言する必要があります。
|
||||
<intent-filter>}</a> を使用してマニフェストで宣言する必要があります。
|
||||
次に例を示します。</p>
|
||||
|
||||
<pre>
|
||||
|
||||
@@ -31,7 +31,7 @@ trainingnavtop=true
|
||||
|
||||
</p>
|
||||
|
||||
<p>他のアプリからアクティビティを開始できるようにするには、対応する <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>要素のマニフェスト ファイルに <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 要素を追加する必要があります。
|
||||
<p>他のアプリからアクティビティを開始できるようにするには、対応する <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>要素のマニフェスト ファイルに <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 要素を追加する必要があります。
|
||||
</p>
|
||||
|
||||
<p>アプリが端末にインストールされている場合、システムはインテント フィルタを識別し、インストールされているすべてのアプリでサポートされるインテントの内部カタログに情報を追加します。アプリが暗黙的インテントを使って {@link android.app.Activity#startActivity
|
||||
@@ -56,13 +56,13 @@ startActivity()} または {@link android.app.Activity#startActivityForResult st
|
||||
<dt>アクション</dt>
|
||||
<dd>実行するアクション名を表す文字列。通常、
|
||||
{@link android.content.Intent#ACTION_SEND} や {@link android.content.Intent#ACTION_VIEW} などのプラットフォームに定義された値のいずれか。
|
||||
<p><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 要素を使用してインテント フィルタでこれを指定します。この要素で指定した値は、API 定数ではなく、アクションの完全な文字列名(下記の例を参照)である必要があります。
|
||||
<p><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 要素を使用してインテント フィルタでこれを指定します。この要素で指定した値は、API 定数ではなく、アクションの完全な文字列名(下記の例を参照)である必要があります。
|
||||
|
||||
</p></dd>
|
||||
|
||||
<dt>データ</dt>
|
||||
<dd>インテントに関連するデータの詳細。
|
||||
<p><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 要素を使用して、インテント フィルタでこれを指定します。この要素で 1 つ以上の属性を
|
||||
<p><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 要素を使用して、インテント フィルタでこれを指定します。この要素で 1 つ以上の属性を
|
||||
使用して、MIME タイプのみ、URI 接頭辞のみ、URI スキームのみ、またはこれらと受け入れられるデータ タイプを示すその他の項目の組み合わせを指定することができます。
|
||||
|
||||
</p>
|
||||
@@ -76,11 +76,11 @@ startActivity()} または {@link android.app.Activity#startActivityForResult st
|
||||
システムでサポートされているいくつかの異なるカテゴリがありますが、大抵のカテゴリはほとんど使用されません。
|
||||
しかし、すべての暗黙的インテントは、デフォルトでは
|
||||
{@link android.content.Intent#CATEGORY_DEFAULT} を使用して定義されています。
|
||||
<p><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
|
||||
<p><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
|
||||
要素を使用して、インテント フィルタでこれを指定します。</p></dd>
|
||||
</dl>
|
||||
|
||||
<p>インテント フィルタでは、それぞれの基準を<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 要素内でネストした対応する XML 要素を使用して宣言することによって、アクティビティが受け入れる基準を宣言することができます。
|
||||
<p>インテント フィルタでは、それぞれの基準を<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 要素内でネストした対応する XML 要素を使用して宣言することによって、アクティビティが受け入れる基準を宣言することができます。
|
||||
|
||||
</p>
|
||||
|
||||
@@ -100,10 +100,10 @@ android.content.Intent#ACTION_SEND} インテントを処理するインテン
|
||||
|
||||
<p>受信するインテントはそれぞれ 1 つのアクションと 1 つのデータ タイプのみを指定しますが、各
|
||||
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a> 内で <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a>、<a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> 要素の複数のインスタンスを宣言することもできます。
|
||||
<intent-filter>}</a> 内で <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a>、<a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> 要素の複数のインスタンスを宣言することもできます。
|
||||
</p>
|
||||
|
||||
<p>アクションとデータのいずれか 2 つのペアが、各自の動作において相互に排他的である場合は、別のインテント フィルタを作成して、どのデータ タイプと組み合わされたときにとのアクションが受け入れられるかを指定する必要があります。
|
||||
|
||||
@@ -156,7 +156,7 @@ startpage=true
|
||||
<h2 id="tv-libraries">TV サポート ライブラリを追加する</h3>
|
||||
|
||||
<p>
|
||||
Android SDK には、TV アプリ向けのサポート ライブラリが用意されています。これらのライブラリでは、TV 端末向けに使用できる API とユーザー インターフェース ウィジェットを提供しています。同ライブラリは {@code <sdk>/extras/android/support/} ディレクトリにあります。ライブラリとその全般的な用途の一覧を次に示します。
|
||||
Android SDK には、TV アプリ向けのサポート ライブラリが用意されています。これらのライブラリでは、TV 端末向けに使用できる API とユーザー インターフェース ウィジェットを提供しています。同ライブラリは {@code <sdk>/extras/android/support/} ディレクトリにあります。ライブラリとその全般的な用途の一覧を次に示します。
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
|
||||
@@ -319,7 +319,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
|
||||
</td>
|
||||
<td>
|
||||
<p style="margin-bottom:.5em;">
|
||||
앱이 게임 컨트롤러를 기본 입력 방법으로 사용하는 경우 <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 매니페스트 태그로 적합한 요구사항을 선언합니다.
|
||||
앱이 게임 컨트롤러를 기본 입력 방법으로 사용하는 경우 <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 매니페스트 태그로 적합한 요구사항을 선언합니다.
|
||||
|
||||
(<a href="{@docRoot}training/tv/games/index.html#gamepad">방법 알아보기</a>)
|
||||
</p>
|
||||
|
||||
@@ -329,23 +329,23 @@ href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-featur
|
||||
<tr><th>매니페스트 요소</th><th>요약</th></tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a></nobr></td>
|
||||
<compatible-screens>}</a></nobr></td>
|
||||
<td>
|
||||
<p>Google Play가 장치 화면
|
||||
크기와 밀도가 {@code
|
||||
<compatible-screens>} 요소에서 {@code <screen>} 요소가 선언한 화면 구성과 일치하지 않는 경우에 애플리케이션을 필터링합니다.</p>
|
||||
<compatible-screens>} 요소에서 {@code <screen>} 요소가 선언한 화면 구성과 일치하지 않는 경우에 애플리케이션을 필터링합니다.</p>
|
||||
<p class="caution"><strong>주의:</strong> 일반적으로 <strong>이 매니페스트 요소를 사용하면 안 됩니다</strong>.
|
||||
이 요소를 사용하면 목록에 없는 화면 크기와 밀도의 조합을 모두 제외시켜 애플리케이션의 잠재적 사용자 기반이 현저히 줄어들 수 있습니다.
|
||||
|
||||
대신 위의 <a href="#table1">표 1</a>에 나오는 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> 매니페스트 요소를 사용하여 대체 리소스로 고려하지 않은 화면 구성에 대해 화면 호환성 모드를 활성화해야 합니다.
|
||||
<supports-screens>}</a> 매니페스트 요소를 사용하여 대체 리소스로 고려하지 않은 화면 구성에 대해 화면 호환성 모드를 활성화해야 합니다.
|
||||
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a></nobr></td>
|
||||
<supports-gl-texture>}</a></nobr></td>
|
||||
<td>
|
||||
<p>Google Play는 애플리케이션에서 지원되는 하나 이상의 GL 텍스처 압축 형식이 장치에서도 지원되는 경우를 제외하고 애플리케이션을 필터링합니다.
|
||||
</p>
|
||||
@@ -408,16 +408,16 @@ href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-featur
|
||||
<ul>
|
||||
<li>OpenGL 텍스처 압축 형식
|
||||
<p><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a> 요소를 사용하여 필터링합니다.</p>
|
||||
<supports-gl-texture>}</a> 요소를 사용하여 필터링합니다.</p>
|
||||
</li>
|
||||
<li>화면 크기(및 선택적 화면 밀도)
|
||||
<p><a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> 또는 <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a> 요소를 사용하여 필터링합니다.</p>
|
||||
<supports-screens>}</a> 또는 <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a> 요소를 사용하여 필터링합니다.</p>
|
||||
</li>
|
||||
<li>API 레벨
|
||||
<p><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
|
||||
<uses-sdk>}</a> 요소를 사용하여 필터링합니다.</p>
|
||||
<uses-sdk>}</a> 요소를 사용하여 필터링합니다.</p>
|
||||
</li>
|
||||
<li>CPU 아키텍처(ABI)
|
||||
<p>특정 CPU 아키텍처(예: ARM EABI v7 또는 x86)를 대상으로 하는 <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>로 작성된 네이티브 라이브러리를 포함하여 필터링합니다.
|
||||
|
||||
@@ -133,7 +133,7 @@ page.image=images/cards/card-api-overview_16-9_2x.png
|
||||
<pre class="no-prettyprint">
|
||||
adb -e emu finger touch <finger_id>
|
||||
</pre>
|
||||
<p>Windows에서는 {@code telnet 127.0.0.1 <emulator-id>}에 뒤이어 {@code finger touch <finger_id>}를 실행해야 할 수도 있습니다.
|
||||
<p>Windows에서는 {@code telnet 127.0.0.1 <emulator-id>}에 뒤이어 {@code finger touch <finger_id>}를 실행해야 할 수도 있습니다.
|
||||
|
||||
</p>
|
||||
</li>
|
||||
@@ -191,7 +191,7 @@ adb -e emu finger touch <finger_id>
|
||||
</service>
|
||||
</pre>
|
||||
|
||||
<p>{@code ChooserTargetService}에 노출하고자 하는 액티비티마다 {@code <meta-data>} 요소를 하나씩 추가하고, 앱 매니페스트에 {@code "android.service.chooser.chooser_target_service"} 이름을 추가합니다.
|
||||
<p>{@code ChooserTargetService}에 노출하고자 하는 액티비티마다 {@code <meta-data>} 요소를 하나씩 추가하고, 앱 매니페스트에 {@code "android.service.chooser.chooser_target_service"} 이름을 추가합니다.
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
@@ -150,7 +150,7 @@ android.app.Activity#onCreate onCreate()} 메서드를
|
||||
|
||||
<p>앱의 메인 액티비티는 {@link
|
||||
android.content.Intent#ACTION_MAIN MAIN} 작업 및{@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER} 카테고리를 포함하는 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a>와 함께
|
||||
<intent-filter>}</a>와 함께
|
||||
매니페스트 파일에 선언되어야 합니다. 예를 들면 다음과 같습니다.</p>
|
||||
|
||||
<pre>
|
||||
|
||||
@@ -31,8 +31,8 @@ trainingnavtop=true
|
||||
"공유" 작업을 시작하고 이 작업을 수행하기 위해 여러분 자신의 앱을 시작할 수 있도록
|
||||
{@link android.content.Intent#ACTION_SEND} 인텐트를 지원하는 것이 좋습니다.</p>
|
||||
|
||||
<p>다른 앱이 자신의 액티비티를 시작할 수 있도록 하기 위해서는 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
요소에 상응하는 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 요소를 매니페스트 파일에 추가해야 합니다.</p>
|
||||
<p>다른 앱이 자신의 액티비티를 시작할 수 있도록 하기 위해서는 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
요소에 상응하는 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 요소를 매니페스트 파일에 추가해야 합니다.</p>
|
||||
|
||||
<p>앱이 기기에 설치되면 시스템이 인텐트
|
||||
필터를 식별한 후 설치된 모든 앱에서 지원되는 인텐트의 내부 카탈로그에 해당 정보를 추가합니다.
|
||||
@@ -56,13 +56,13 @@ startActivity()} 또는 {@link android.app.Activity#startActivityForResult start
|
||||
<dt>작업</dt>
|
||||
<dd>수행할 작업의 이름을 지정하는 문자열입니다. 일반적으로, 플랫폼에서 정의하는 값 중
|
||||
하나입니다(예: {@link android.content.Intent#ACTION_SEND} 또는 {@link android.content.Intent#ACTION_VIEW}).
|
||||
<p><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 요소를 사용하여 인텐트 필터에 지정합니다.
|
||||
<p><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 요소를 사용하여 인텐트 필터에 지정합니다.
|
||||
이 요소에 지정하는 값은 API 상수 대신
|
||||
작업의 전체 문자열 이름이어야 합니다(다음 예제 참조).</p></dd>
|
||||
|
||||
<dt>데이터</dt>
|
||||
<dd>인텐트와 관련된 데이터에 대한 설명입니다.
|
||||
<p><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 요소를 사용하여 인텐트 필터에 지정합니다. 이 요소에서
|
||||
<p><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 요소를 사용하여 인텐트 필터에 지정합니다. 이 요소에서
|
||||
하나 이상의 특성을 사용하여 MIME 유형, URI 접두사, URI 스키마, 또는
|
||||
이들의 조합 그리고 수락된 데이터 유형을 나타내는 다른 요소들을 지정할 수
|
||||
있습니다.</p>
|
||||
@@ -76,12 +76,12 @@ startActivity()} 또는 {@link android.app.Activity#startActivityForResult start
|
||||
관련되어 있습니다. 시스템이 지원하는 카테고리는
|
||||
여러 가지가 있지만 대부분은 거의 사용되지 않습니다. 하지만 모든 암묵적인 인텐트는 기본적으로
|
||||
{@link android.content.Intent#CATEGORY_DEFAULT}로 정의됩니다.
|
||||
<p><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a> 요소를 사용하여 인텐트 필터에
|
||||
<p><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a> 요소를 사용하여 인텐트 필터에
|
||||
지정합니다.</p></dd>
|
||||
</dl>
|
||||
|
||||
<p>인텐트 필터에서 액티비티가 허용하는 기준을 선언할 수 있습니다.
|
||||
이는 이러한 기준 각각을 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 요소 내에 해당 XML 요소를 중첩하여 선언하면
|
||||
이는 이러한 기준 각각을 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 요소 내에 해당 XML 요소를 중첩하여 선언하면
|
||||
가능합니다.</p>
|
||||
|
||||
<p>예를 들어, 다음은 데이터 유형이 텍스트 또는 이미지인 경우 {@link
|
||||
@@ -100,10 +100,10 @@ android.content.Intent#ACTION_SEND} 인텐트를 처리하는 인텐트 필터
|
||||
|
||||
<p>수신되는 인텐트는 각각 하나의 작업 및 하나의 데이터 유형만 지정합니다. 하지만
|
||||
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a> 각각에 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> 및 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a>에 대한 여러
|
||||
<intent-filter>}</a> 각각에 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> 및 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a>에 대한 여러
|
||||
인스턴스를 선언해도 문제가 되지는 않습니다.</p>
|
||||
|
||||
<p>작업 및 데이터의 두 쌍이 상호 배타적으로
|
||||
|
||||
@@ -133,8 +133,8 @@ bloqueio ou no aplicativo.
|
||||
<pre class="no-prettyprint">
|
||||
adb -e emu finger touch <finger_id>
|
||||
</pre>
|
||||
<p>No Windows, talvez seja necessário executar {@code telnet 127.0.0.1 <emulator-id>} seguido de
|
||||
{@code finger touch <finger_id>}.
|
||||
<p>No Windows, talvez seja necessário executar {@code telnet 127.0.0.1 <emulator-id>} seguido de
|
||||
{@code finger touch <finger_id>}.
|
||||
</p>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -192,7 +192,7 @@ manifesto.</p>
|
||||
</pre>
|
||||
|
||||
<p>Para cada atividade que quiser expor ao {@code ChooserTargetService}, adicione um elemento
|
||||
{@code <meta-data>} com o nome
|
||||
{@code <meta-data>} com o nome
|
||||
{@code "android.service.chooser.chooser_target_service"} no manifesto do aplicativo.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ ponto de entrada principal da interface do usuário do aplicativo.</p>
|
||||
na raiz do diretório do seu projeto.</p>
|
||||
|
||||
<p>A principal atividade do aplicativo deve ser declarada no manifesto com um <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a> que inclui a ação {@link
|
||||
<intent-filter>}</a> que inclui a ação {@link
|
||||
android.content.Intent#ACTION_MAIN MAIN} e categoria
|
||||
{@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER}. Por exemplo:</p>
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ construir um aplicativo social que compartilhe mensagens ou fotos com os amigos
|
||||
que ele possa responder à intenção {@link android.content.Intent#ACTION_SEND} para que os usuários consigam iniciar uma
|
||||
ação de “compartilhar” por outro aplicativo e iniciar seu aplicativo para executar a ação.</p>
|
||||
|
||||
<p>Para permitir que outros aplicativos iniciem sua atividade, adicione um elemento <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
em seu arquivo de manifesto para o elemento <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> correspondente.</p>
|
||||
<p>Para permitir que outros aplicativos iniciem sua atividade, adicione um elemento <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
em seu arquivo de manifesto para o elemento <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> correspondente.</p>
|
||||
|
||||
<p>Quando seu aplicativo é instalado em um dispositivo, o sistema identifica seu filtro de
|
||||
intenções e adiciona a informação a um catálogo interno de intenções suportado por todos os aplicativos instalados.
|
||||
@@ -56,13 +56,13 @@ um filtro de intenções que atenda aos seguintes critérios do objeto {@link an
|
||||
<dt>Ação</dt>
|
||||
<dd>Uma cadeia de caracteres que dá nome a ação a ser executada. Geralmente, um dos valores definidos para a plataforma
|
||||
como {@link android.content.Intent#ACTION_SEND} ou {@link android.content.Intent#ACTION_VIEW}.
|
||||
<p>Especifique-o em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>.
|
||||
<p>Especifique-o em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>.
|
||||
O valor especificado neste elemento deve ser o nome completo da cadeia de caracteres para a ação e não a
|
||||
API constante (veja exemplos abaixo).</p></dd>
|
||||
|
||||
<dt>Dados</dt>
|
||||
<dd>A descrição dos dados associados à intenção.
|
||||
<p>Especifique-a em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>. Através de um
|
||||
<p>Especifique-a em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>. Através de um
|
||||
ou mais atributos neste elemento, você pode especificar apenas o tipo MIME, apenas um prefixo de URI,
|
||||
apenas um esquema de URI ou uma combinação destes e outros elementos que indicam o tipo de dados
|
||||
aceito.</p>
|
||||
@@ -76,12 +76,12 @@ dado que sua atividade trata, como {@code text/plain} ou {@code image/jpeg}.</p>
|
||||
ao gesto do usuário ou localização onde foi iniciada. Há diferentes categorias
|
||||
compatíveis com o sistema, mas a maioria raramente é utilizada. No entanto, todas as intenções implícitas são definidas com
|
||||
{@link android.content.Intent#CATEGORY_DEFAULT} por padrão.
|
||||
<p>Especifique-a em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
|
||||
<p>Especifique-a em seu filtro de intenções com o elemento <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
|
||||
.</p></dd>
|
||||
</dl>
|
||||
|
||||
<p>Em seu filtro de intenções, declare quais critérios serão aceitos por sua atividade
|
||||
informando cada um deles com elementos XML correspondentes aninhados no elemento <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
informando cada um deles com elementos XML correspondentes aninhados no elemento <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
.</p>
|
||||
|
||||
<p>Este é um exemplo de atividade com filtro de intenções que responde à intenção {@link
|
||||
@@ -100,11 +100,11 @@ android.content.Intent#ACTION_SEND} quando o tipo de dado é texto ou imagem:</p
|
||||
|
||||
<p>Cada intenção em entrada especifica apenas uma ação e um tipo de dado, mas pode-se declarar
|
||||
múltiplas instâncias dos elementos <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> e <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> em cada
|
||||
<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> e <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> em cada
|
||||
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a>.</p>
|
||||
<intent-filter>}</a>.</p>
|
||||
|
||||
<p>Se dois pares de ação e dados fores mutuamente exclusivos em
|
||||
seus comportamentos, crie filtros de intenções separados para especificar quais ações são aceitáveis
|
||||
|
||||
@@ -320,7 +320,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
|
||||
<td>
|
||||
<p style="margin-bottom:.5em;">
|
||||
Если приложение использует игровой контроллер в качестве основного устройства ввода,
|
||||
это требование должно быть задекларировано в теге манифеста <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>.
|
||||
это требование должно быть задекларировано в теге манифеста <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>.
|
||||
(<a href="{@docRoot}training/tv/games/index.html#gamepad">См. как это сделать</a>)
|
||||
</p>
|
||||
</td>
|
||||
|
||||
@@ -329,23 +329,23 @@ SDK не будет скомпилирован, если атрибут <code>ma
|
||||
<tr><th>Элемент манифеста</th><th>Сводная информация</th></tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a></nobr></td>
|
||||
<compatible-screens>}</a></nobr></td>
|
||||
<td>
|
||||
<p>Google Play отфильтровывает приложение, если размер и разрешение экрана устройства
|
||||
не соответствуют какой-либо конфигурации экрана(декларируемые элементом {@code <screen>}) в элементе {@code
|
||||
<compatible-screens>}.</p>
|
||||
не соответствуют какой-либо конфигурации экрана(декларируемые элементом {@code <screen>}) в элементе {@code
|
||||
<compatible-screens>}.</p>
|
||||
<p class="caution"><strong>Внимание!</strong> В обычной практике <strong>вы не должны использовать
|
||||
этот элемент манифеста</strong>. Применение этого элемента существенно
|
||||
сокращает число потенциальных пользователей вашего приложения, исключая все комбинации размеров
|
||||
и разрешения экрана, которые не указаны в списке. Вместо этого используйте элемент манифеста <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> (описанный выше в <a href="#table1">
|
||||
<supports-screens>}</a> (описанный выше в <a href="#table1">
|
||||
таблице 1</a>), чтобы определить режим совместимости для неучтенных альтернативными ресурсами
|
||||
конфигураций экранов.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a></nobr></td>
|
||||
<supports-gl-texture>}</a></nobr></td>
|
||||
<td>
|
||||
<p>Google Play будет отфильтровывать приложение, если не окажется ни одного формата
|
||||
сжатия GL-текстуры, поддерживаемого устройством. </p>
|
||||
@@ -408,16 +408,16 @@ Android NDK?</a></p> </tr> <tr>
|
||||
<ul>
|
||||
<li>Форматы сжатия текстур OpenGL
|
||||
<p>Используя элемент <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a>.</p>
|
||||
<supports-gl-texture>}</a>.</p>
|
||||
</li>
|
||||
<li>Размер экрана (а в некоторых случаях и разрешение)
|
||||
<p>Используя элемент <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> или <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a>.</p>
|
||||
<supports-screens>}</a> или <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a>.</p>
|
||||
</li>
|
||||
<li>Уровень API-интерфейса
|
||||
<p>Используя элемент <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
|
||||
<uses-sdk>}</a>.</p>
|
||||
<uses-sdk>}</a>.</p>
|
||||
</li>
|
||||
<li>Архитектура процессора (ABI)
|
||||
<p>Включая специфичные библиотеки, созданные на основе <a href="{@docRoot}tools/sdk/ndk/index.html">Android
|
||||
|
||||
@@ -133,8 +133,8 @@ page.image=images/cards/card-api-overview_16-9_2x.png
|
||||
<pre class="no-prettyprint">
|
||||
adb -e emu finger touch <finger_id>
|
||||
</pre>
|
||||
<p>В Windows, возможно, потребуется выполнить команду {@code telnet 127.0.0.1 <emulator-id>}, а затем
|
||||
{@code finger touch <finger_id>}.
|
||||
<p>В Windows, возможно, потребуется выполнить команду {@code telnet 127.0.0.1 <emulator-id>}, а затем
|
||||
{@code finger touch <finger_id>}.
|
||||
</p>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -192,7 +192,7 @@ adb -e emu finger touch <finger_id>
|
||||
</pre>
|
||||
|
||||
<p>Для каждого действия, которое необходимо сделать доступным для {@code ChooserTargetService}, добавьте в манифест вашего приложения элемент
|
||||
{@code <meta-data>} с именем
|
||||
{@code <meta-data>} с именем
|
||||
{@code "android.service.chooser.chooser_target_service"}.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ android.app.Activity#onCreate onCreate()} для {@link android.app.Activity} в
|
||||
который находится в корневом каталоге вашего проекта.</p>
|
||||
|
||||
<p>Основная операция приложения должна декларироваться в манифесте с помощью фильтра <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a>, включающего действие {@link
|
||||
<intent-filter>}</a>, включающего действие {@link
|
||||
android.content.Intent#ACTION_MAIN MAIN} и категорию
|
||||
{@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER}. Например:</p>
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ trainingnavtop=true
|
||||
будет поддерживать объекты Intent (намерения) {@link android.content.Intent#ACTION_SEND}, чтобы пользователи могли
|
||||
поделиться контентом из другого приложения и запускать ваше приложение для выполнения требуемого действия.</p>
|
||||
|
||||
<p>Чтобы разрешить другим приложениям запускать ваши операции, вам нужно добавить в ваш файл манифеста элемент <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
для соответствующего элемента <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>.</p>
|
||||
<p>Чтобы разрешить другим приложениям запускать ваши операции, вам нужно добавить в ваш файл манифеста элемент <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
для соответствующего элемента <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>.</p>
|
||||
|
||||
<p>Если ваше приложение установлено на устройстве, система идентифицирует ваши
|
||||
фильтры Intent и добавляет информацию во внутренний каталог намерений, поддерживаемый всеми установленными приложениями.
|
||||
@@ -56,13 +56,13 @@ Intent.</p>
|
||||
<dt>Действие</dt>
|
||||
<dd>Строка, называющая действие, которое необходимо выполнить. Обычно это одно из определяемых платформой значений,
|
||||
например, {@link android.content.Intent#ACTION_SEND} или {@link android.content.Intent#ACTION_VIEW}.
|
||||
<p>Это следует указать в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>.
|
||||
<p>Это следует указать в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>.
|
||||
Указанное в этом элементе значение должно представлять собой полное имя строки действия, а не
|
||||
постоянное значение API-интерфейса (см. примеры ниже).</p></dd>
|
||||
|
||||
<dt>Данные</dt>
|
||||
<dd>Описание данных, связанных с объектом Intent.
|
||||
<p>Указывается в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>. Используя один
|
||||
<p>Указывается в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>. Используя один
|
||||
или несколько атрибутов в этом элементе, вы можете указать только тип MIME, только префикс URI,
|
||||
только схему URI или из сочетание, а также другие индикаторы типа
|
||||
принимаемых данных.</p>
|
||||
@@ -76,12 +76,12 @@ URI), вы должны указать только атрибут {@code androi
|
||||
с жестом пользователя или местом запуска. Система поддерживает несколько разных категорий,
|
||||
но большинство из них используется редко. Однако по умолчанию все неявные объекты Intent определяются с
|
||||
{@link android.content.Intent#CATEGORY_DEFAULT}.
|
||||
<p>Это указывается в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
|
||||
<p>Это указывается в фильтре Intent с элементом <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
|
||||
.</p></dd>
|
||||
</dl>
|
||||
|
||||
<p>В своем фильтре Intent вы можете декларировать критерии, принимаемые вашей операцией.
|
||||
Для этого нужно декларировать каждый из них с соответствующими элементами XML, вложенными в элемент <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
Для этого нужно декларировать каждый из них с соответствующими элементами XML, вложенными в элемент <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
.</p>
|
||||
|
||||
<p>Рассмотрим в качестве примера операцию с фильтром Intent, обрабатывающим объект {@link
|
||||
@@ -100,11 +100,11 @@ android.content.Intent#ACTION_SEND}, для текстовых или графи
|
||||
|
||||
<p>Каждый входящий объект Intent указывает только одно действие и только один тип данных, однако допускается декларирование нескольких
|
||||
экземпляров элементов <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> и <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> в каждом
|
||||
<action>}</a>, <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> и <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> в каждом
|
||||
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a>.</p>
|
||||
<intent-filter>}</a>.</p>
|
||||
|
||||
<p>Если поведение любых двух пар действий и данных является взаимоисключающим,
|
||||
необходимо создать отдельные фильтры Intent с указанием допустимых действий
|
||||
|
||||
@@ -320,7 +320,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
|
||||
<td>
|
||||
<p style="margin-bottom:.5em;">
|
||||
如果应用使用游戏手柄作为主要输入方法,则要通过
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>清单文件标记来声明相应的要求。
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>清单文件标记来声明相应的要求。
|
||||
(<a href="{@docRoot}training/tv/games/index.html#gamepad">了解方法</a>)
|
||||
</p>
|
||||
</td>
|
||||
|
||||
@@ -329,23 +329,23 @@ Google Play 然后根据
|
||||
<tr><th>清单文件元素</th><th>摘要</th></tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a></nobr></td>
|
||||
<compatible-screens>}</a></nobr></td>
|
||||
<td>
|
||||
<p>如果设备屏幕尺寸和密度不符合
|
||||
{@code
|
||||
<compatible-screens>} 元素中的任何屏幕配置(由{@code <screen>} 元素声明),则 Google Play 会将该应用筛选掉。</p>
|
||||
<compatible-screens>} 元素中的任何屏幕配置(由{@code <screen>} 元素声明),则 Google Play 会将该应用筛选掉。</p>
|
||||
<p class="caution"><strong>注意:</strong>正常情况下,<strong>不能使用此清单文件元素</strong>。
|
||||
使用此元素可能会显著减少应用的潜在用户群,因为排除了您未列出的所有屏幕尺寸和密度组合。
|
||||
|
||||
应当改用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> 清单文件元素(上面<a href="#table1">表
|
||||
<supports-screens>}</a> 清单文件元素(上面<a href="#table1">表
|
||||
1</a> 所述),通过替代资源为您没有考虑的屏幕配置启用屏幕兼容模式。
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a></nobr></td>
|
||||
<supports-gl-texture>}</a></nobr></td>
|
||||
<td>
|
||||
<p>除非应用所支持的一种或多种 GL 纹理压缩格式也受到设备支持,否则 Google Play 将应用筛选掉。
|
||||
</p>
|
||||
@@ -408,16 +408,16 @@ APK 文件的大小。
|
||||
<ul>
|
||||
<li>OpenGL 纹理压缩格式
|
||||
<p>使用 <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a> 元素。</p>
|
||||
<supports-gl-texture>}</a> 元素。</p>
|
||||
</li>
|
||||
<li>屏幕尺寸(以及可选的屏幕密度)
|
||||
<p>使用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> 或 <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a> 元素。</p>
|
||||
<supports-screens>}</a> 或 <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a> 元素。</p>
|
||||
</li>
|
||||
<li>API 级别
|
||||
<p>使用 <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
|
||||
<uses-sdk>}</a> 元素。</p>
|
||||
<uses-sdk>}</a> 元素。</p>
|
||||
</li>
|
||||
<li>CPU 架构 (ABI)
|
||||
<p>包括针对特定 CPU 架构(例如 ARM EABI v7 或 x86)的、通过 <a href="{@docRoot}tools/sdk/ndk/index.html">Android
|
||||
|
||||
@@ -134,7 +134,7 @@ page.image=images/cards/card-api-overview_16-9_2x.png
|
||||
adb -e emu finger touch <finger_id>
|
||||
</pre>
|
||||
<p>在 Windows 上,您可能需要运行带有
|
||||
{@code finger touch <finger_id>} 参数的 {@code telnet 127.0.0.1 <emulator-id>} 命令。
|
||||
{@code finger touch <finger_id>} 参数的 {@code telnet 127.0.0.1 <emulator-id>} 命令。
|
||||
</p>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -193,7 +193,7 @@ adb -e emu finger touch <finger_id>
|
||||
|
||||
<p>对于您想要向 {@code ChooserTargetService} 公开的每个活动,请在您的应用清单文件中为其添加一个名为
|
||||
{@code "android.service.chooser.chooser_target_service"} 的
|
||||
{@code <meta-data>} 元素。
|
||||
{@code <meta-data>} 元素。
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
|
||||
@@ -149,7 +149,7 @@ android.app.Activity#onCreate onCreate()} 方法。
|
||||
</p>
|
||||
|
||||
<p>您的应用的主Activity必须使用 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a>(包括 {@link
|
||||
<intent-filter>}</a>(包括 {@link
|
||||
android.content.Intent#ACTION_MAIN MAIN} 操作和
|
||||
{@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER} 类别)在宣示说明中声明。例如:</p>
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ trainingnavtop=true
|
||||
|
||||
</p>
|
||||
|
||||
<p>要允许其他应用开始您的Activity,您需要 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
在相应元素的宣示说明文件中添加一个 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> 元素。</p>
|
||||
<p>要允许其他应用开始您的Activity,您需要 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
在相应元素的宣示说明文件中添加一个 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> 元素。</p>
|
||||
|
||||
<p>当您的应用安装在设备上时,系统会识别您的意向过滤器并添加信息至所有已安装应用支持的意向内部目录。当应用通过隐含意向调用 {@link android.app.Activity#startActivity
|
||||
startActivity()} 或 {@link android.app.Activity#startActivityForResult startActivityForResult()} 时,系统会找到可以响应该意向的Activity。
|
||||
@@ -56,13 +56,13 @@ startActivity()} 或 {@link android.app.Activity#startActivityForResult startAct
|
||||
<dt>操作</dt>
|
||||
<dd>对要执行的操作命名的字符串。通常是平台定义的值之一,比如
|
||||
{@link android.content.Intent#ACTION_SEND} 或 {@link android.content.Intent#ACTION_VIEW}。
|
||||
<p>使用 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 元素在您的意向过滤器中指定此值。您在此元素中指定的值必须是操作的完整字符串名称,而不是 API 常数(请参阅以下示例)。
|
||||
<p>使用 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 元素在您的意向过滤器中指定此值。您在此元素中指定的值必须是操作的完整字符串名称,而不是 API 常数(请参阅以下示例)。
|
||||
|
||||
</p></dd>
|
||||
|
||||
<dt>数据</dt>
|
||||
<dd>与意向关联的数据描述。
|
||||
<p>用 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 元素在您的意向过滤器中指定此内容。使用此元素中的一个或多个属性,您可以只指定 MIME 类型、URI 前缀、URI 架构或这些的组合以及其他指示所接受数据类型的项。
|
||||
<p>用 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 元素在您的意向过滤器中指定此内容。使用此元素中的一个或多个属性,您可以只指定 MIME 类型、URI 前缀、URI 架构或这些的组合以及其他指示所接受数据类型的项。
|
||||
|
||||
|
||||
</p>
|
||||
@@ -76,11 +76,11 @@ startActivity()} 或 {@link android.app.Activity#startActivityForResult startAct
|
||||
系统支持多种不同的类别,但大多数都很少使用。
|
||||
但是,所有隐含意向默认使用
|
||||
{@link android.content.Intent#CATEGORY_DEFAULT} 进行定义。
|
||||
<p>用 <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
|
||||
<p>用 <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>
|
||||
元素在您的意向过滤器中指定此内容。</p></dd>
|
||||
</dl>
|
||||
|
||||
<p>在您的意向过滤器中,您可以通过声明嵌套在 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
<p>在您的意向过滤器中,您可以通过声明嵌套在 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
元素中的具有相应 XML 元素的各项,来声明您的Activity接受的条件。
|
||||
</p>
|
||||
|
||||
@@ -100,11 +100,11 @@ android.content.Intent#ACTION_SEND} 意向的意向过滤器:</p>
|
||||
|
||||
<p>每个入站意向仅指定一项操作和一个数据类型,但可以在每个
|
||||
<a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"> {@code
|
||||
<intent-filter>}</a> 中声明
|
||||
<intent-filter>}</a> 中声明
|
||||
<a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> 和 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> 元素的多个实例。</p>
|
||||
<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> 和 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> 元素的多个实例。</p>
|
||||
|
||||
<p>如果任何两对操作和数据的行为相斥,您应创建单独的意向过滤器指定与哪种数据类型配对时哪些操作可接受。
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
|
||||
</td>
|
||||
<td>
|
||||
<p style="margin-bottom:.5em;">
|
||||
若應用程式將遊戲手把用作主要輸入方式,會使用 <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 宣示說明標籤宣告相應的需求。(<a href="{@docRoot}training/tv/games/index.html#gamepad">進行了解</a>)
|
||||
若應用程式將遊戲手把用作主要輸入方式,會使用 <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 宣示說明標籤宣告相應的需求。(<a href="{@docRoot}training/tv/games/index.html#gamepad">進行了解</a>)
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -208,14 +208,14 @@ href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-featur
|
||||
<table>
|
||||
<tr><th>宣示說明元素</th><th>摘要</th></tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a></nobr></td>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a></nobr></td>
|
||||
<td>
|
||||
<p>若裝置螢幕大小與密度不符合元素中的{@code <compatible-screens>}任何螢幕組態 (由 {@code <screen>} 元素宣告),Google Play 會對應用程式進行篩選。</p>
|
||||
<p class="caution"><strong>注意:</strong>通常,<strong>您不應使用此宣示說明元素</strong>。若使用此元素,會將您未列出的螢幕大小與密度的所有組合排除在外,從而大幅減少您應用程式可能擁有的使用者。您應改為針對未使用替代資源說明的螢幕組態,使用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a> 宣示說明元素 (如<a href="#table1">表 1</a> 所述) 啟用螢幕相容性模式。</p>
|
||||
<p>若裝置螢幕大小與密度不符合元素中的{@code <compatible-screens>}任何螢幕組態 (由 {@code <screen>} 元素宣告),Google Play 會對應用程式進行篩選。</p>
|
||||
<p class="caution"><strong>注意:</strong>通常,<strong>您不應使用此宣示說明元素</strong>。若使用此元素,會將您未列出的螢幕大小與密度的所有組合排除在外,從而大幅減少您應用程式可能擁有的使用者。您應改為針對未使用替代資源說明的螢幕組態,使用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a> 宣示說明元素 (如<a href="#table1">表 1</a> 所述) 啟用螢幕相容性模式。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a></nobr></td>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a></nobr></td>
|
||||
<td>
|
||||
<p>除非裝置支援應用程式所支援的一或多個 GL 材質壓縮格式,否則 Google Play 會對應用程式進行篩選。 </p>
|
||||
</td>
|
||||
@@ -249,11 +249,11 @@ href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-featur
|
||||
|
||||
<p>目前,只有在每個 APK 根據以下組態提供不同的篩選器時,Google Play 才允許您針對同一應用程式發行多個 APK:</p>
|
||||
<ul>
|
||||
<li>OpenGL 材質壓縮格式 <p>透過使用 <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a>元素。</p>
|
||||
<li>OpenGL 材質壓縮格式 <p>透過使用 <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code <supports-gl-texture>}</a>元素。</p>
|
||||
</li>
|
||||
<li>螢幕大小 (以及可選的螢幕密度) <p>透過使用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a>或<a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a> 元素。</p>
|
||||
<li>螢幕大小 (以及可選的螢幕密度) <p>透過使用 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <supports-screens>}</a>或<a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code <compatible-screens>}</a> 元素。</p>
|
||||
</li>
|
||||
<li>API 層級 <p>透過使用 <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>元素。</p>
|
||||
<li>API 層級 <p>透過使用 <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>元素。</p>
|
||||
</li>
|
||||
<li>CPU 架構 (ABI) <p>透過納入使用 <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a> (針對諸如 ARM EABI v7 或 x86 等特定 CPU 架構) 而建置的原生資源庫。</p>
|
||||
</li>
|
||||
|
||||
@@ -133,8 +133,8 @@ page.image=images/cards/card-api-overview_16-9_2x.png
|
||||
<pre class="no-prettyprint">
|
||||
adb -e emu finger touch <finger_id>
|
||||
</pre>
|
||||
<p>在 Windows 上,您可能必須執行 {@code telnet 127.0.0.1 <emulator-id>},後面接著
|
||||
{@code finger touch <finger_id>}。
|
||||
<p>在 Windows 上,您可能必須執行 {@code telnet 127.0.0.1 <emulator-id>},後面接著
|
||||
{@code finger touch <finger_id>}。
|
||||
</p>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -193,7 +193,7 @@ adb -e emu finger touch <finger_id>
|
||||
|
||||
<p>針對您要向 {@code ChooserTargetService} 公開的每個活動,在您的應用程式宣示說明中,新增名稱為
|
||||
{@code "android.service.chooser.chooser_target_service"} 的
|
||||
{@code <meta-data>} 元素。
|
||||
{@code <meta-data>} 元素。
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
|
||||
@@ -149,7 +149,7 @@ android.app.Activity#onCreate onCreate()} 方法。
|
||||
</p>
|
||||
|
||||
<p>必須在宣示說明中使用 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a> (包括 {@link
|
||||
<intent-filter>}</a> (包括 {@link
|
||||
android.content.Intent#ACTION_MAIN MAIN} 行為與 {@link android.content.Intent#CATEGORY_LAUNCHER LAUNCHER} 類別) 宣告您應用程式的主要應用行為顯示。
|
||||
例如:</p>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ trainingnavtop=true
|
||||
|
||||
</p>
|
||||
|
||||
<p>若要允許其他應用程式啟動您的應用行為顯示,需要在您的宣示說明檔案中針對對應的 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> 元素新增 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 元素。
|
||||
<p>若要允許其他應用程式啟動您的應用行為顯示,需要在您的宣示說明檔案中針對對應的 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> 元素新增 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 元素。
|
||||
</p>
|
||||
|
||||
<p>若您的應用程式安裝在裝置上,系統會識別您的意圖篩選器,並將資訊新增至安裝的所有應用程式都支援的意圖內部目錄中。在應用程式使用隱含意圖呼叫 {@link android.app.Activity#startActivity
|
||||
@@ -56,13 +56,13 @@ startActivity()} 或 {@link android.app.Activity#startActivityForResult startAct
|
||||
<dt>行為</dt>
|
||||
<dd>對要執行的行為進行命名的字串。通常是平台所定義值 (例如 {@link android.content.Intent#ACTION_SEND} 或 {@link android.content.Intent#ACTION_VIEW}) 的其中之一。
|
||||
|
||||
<p>請在您的意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 元素指定此項目。在此元素中指定的值必須是行為的完整字串名稱,而非 API 常數 (請參閱以下範例)。
|
||||
<p>請在您的意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a> 元素指定此項目。在此元素中指定的值必須是行為的完整字串名稱,而非 API 常數 (請參閱以下範例)。
|
||||
|
||||
</p></dd>
|
||||
|
||||
<dt>資料</dt>
|
||||
<dd>對意圖所關聯資料的描述。
|
||||
<p>請在意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 元素指定此項目。在此元素中使用一或多個屬性,您可以僅指定 MIME 類型、URI 首碼、URI 配置,或指定這些項目的組合,以及表示所接受資料類型的其他項目。
|
||||
<p>請在意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> 元素指定此項目。在此元素中使用一或多個屬性,您可以僅指定 MIME 類型、URI 首碼、URI 配置,或指定這些項目的組合,以及表示所接受資料類型的其他項目。
|
||||
|
||||
|
||||
</p>
|
||||
@@ -76,11 +76,11 @@ startActivity()} 或 {@link android.app.Activity#startActivityForResult startAct
|
||||
系統支援多種不同的類別,但大多數類別很少使用。
|
||||
然而依預設,所有隱含意圖都與 {@link android.content.Intent#CATEGORY_DEFAULT} 一併定義。
|
||||
|
||||
<p>請在意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a> 元素指定此項目。
|
||||
<p>請在意圖篩選器中使用 <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a> 元素指定此項目。
|
||||
</p></dd>
|
||||
</dl>
|
||||
|
||||
<p>在意圖篩選器中,您可以宣告每個條件以及 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 元素中巢套的對應 XML 元素,以宣告應用行為顯示所接受的條件。
|
||||
<p>在意圖篩選器中,您可以宣告每個條件以及 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a> 元素中巢套的對應 XML 元素,以宣告應用行為顯示所接受的條件。
|
||||
|
||||
</p>
|
||||
|
||||
@@ -99,10 +99,10 @@ android.content.Intent#ACTION_SEND} 意圖:</p>
|
||||
</pre>
|
||||
|
||||
<p>傳入的每項意圖只會指定一項行為與一種資料類型,但是在每個 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a> 中,可以宣告 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> 與 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> 元素的多個執行個體。
|
||||
<intent-filter>}</a> 中,可以宣告 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a>、<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> 與 <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> 元素的多個執行個體。
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
@@ -112,10 +112,10 @@ src="//chart.googleapis.com/chart?chl=GL%202.0%7CGL%203.0%7CGL%203.1&chf=bg%2Cs%
|
||||
|
||||
<p>To declare which version of OpenGL ES your application requires, you should use the {@code
|
||||
android:glEsVersion} attribute of the <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
element. You can also use the <a
|
||||
href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a> element to declare the GL compression formats that your application
|
||||
<supports-gl-texture>}</a> element to declare the GL compression formats that your application
|
||||
uses.</p>
|
||||
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ determining the density of the current device screen.</li>
|
||||
|
||||
<ul>
|
||||
<li>New <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> element lets you specify the device screen sizes that your
|
||||
<supports-screens>}</a> element lets you specify the device screen sizes that your
|
||||
application is designed and tested to support, where "size" is a combination
|
||||
of resolution and density. If your application is run on a device whose screen
|
||||
size is not specified in the <code><supports-screen></code> element, the system
|
||||
@@ -331,7 +331,7 @@ determining the density of the current device screen.</li>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li>New <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
<li>New <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
element lets an application specify hardware (or other)
|
||||
features that it requires to function normally. When an application
|
||||
specifies such features, the system allows the application to be installed only
|
||||
@@ -345,7 +345,7 @@ determining the density of the current device screen.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>New attributes for the
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element:
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element:
|
||||
<ul>
|
||||
<li><code>targetSdkVersion</code>: Indicates the API Level that the application is targeting.
|
||||
It is able to run on older versions (down to minSdkVersion), but was explicitly tested to
|
||||
|
||||
@@ -159,7 +159,7 @@ when you touch a contact photo or status icon.</li>
|
||||
<li>Database API support, for client-side databases using SQL.</li>
|
||||
<li>Application cache support, for offline applications.</li>
|
||||
<li>Geolocation API support, to provide location information about the device.</li>
|
||||
<li>{@code <video>} tag support in fullscreen mode.</li>
|
||||
<li>{@code <video>} tag support in fullscreen mode.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -589,7 +589,7 @@ removes several classes that were previously deprecated.</li>
|
||||
<ul>
|
||||
<li>New <code>xlargeScreens</code> attribute for <a
|
||||
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a>
|
||||
<supports-screens>}</a>
|
||||
element, to indicate whether the application supports
|
||||
extra large screen form-factors. For details, see <a
|
||||
href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
|
||||
|
||||
@@ -257,7 +257,7 @@ android.widget.ListView}, and {@link android.widget.StackView} that are backed b
|
||||
such as from a content provider.</p>
|
||||
|
||||
<p>The {@link android.appwidget.AppWidgetProviderInfo} class (defined in XML with an {@code
|
||||
<appwidget-provider>} element) also supports two new fields: {@link
|
||||
<appwidget-provider>} element) also supports two new fields: {@link
|
||||
android.appwidget.AppWidgetProviderInfo#autoAdvanceViewId} and {@link
|
||||
android.appwidget.AppWidgetProviderInfo#previewImage}. The {@link
|
||||
android.appwidget.AppWidgetProviderInfo#autoAdvanceViewId} field lets you specify the view ID of the
|
||||
@@ -535,9 +535,9 @@ see <a href="{@docRoot}guide/topics/search/search-dialog.html">Creating a Search
|
||||
|
||||
<p>You can now enable the OpenGL renderer for your application by setting {@code
|
||||
android:hardwareAccelerated="true"} in your manifest element's <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
element or for individual <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
elements.</p>
|
||||
|
||||
<p>This flag helps applications by making them draw faster. This results in smoother animations,
|
||||
@@ -683,7 +683,7 @@ whenever a key is combined with Ctrl key. When creating an <a
|
||||
href="{@docRoot}guide/topics/ui/menus.html#options-menu">Options Menu</a>, you can register keyboard
|
||||
shortcuts by setting either the {@code android:alphabeticShortcut} or {@code
|
||||
android:numericShortcut} attribute for each <a
|
||||
href="{@docRoot}guide/topics/resources/menu-resource.html#item-element">{@code <item>}</a>
|
||||
href="{@docRoot}guide/topics/resources/menu-resource.html#item-element">{@code <item>}</a>
|
||||
element (or with {@link android.view.MenuItem#setShortcut setShortcut()}).</li>
|
||||
|
||||
<li>Android 3.0 includes a new "virtual keyboard" device with the id {@link
|
||||
@@ -715,9 +715,9 @@ specific view groups and across windows.</p>
|
||||
<li>The {@link android.R.attr#splitMotionEvents android:splitMotionEvents} attribute for view groups
|
||||
allows you to disable split touch events that occur between child views in a layout. For example:
|
||||
<pre>
|
||||
<LinearLayout android:splitMotionEvents="false" ... >
|
||||
<LinearLayout android:splitMotionEvents="false" ... >
|
||||
...
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</pre>
|
||||
<p>This way, child views in the linear layout cannot split touch events—only one view can
|
||||
receive touch events at a time.</p>
|
||||
@@ -727,14 +727,14 @@ receive touch events at a time.</p>
|
||||
allows you to disable split touch events across windows, by applying it to a theme for the activity
|
||||
or entire application. For example:
|
||||
<pre>
|
||||
<style name="NoSplitMotionEvents" parent="android:Theme.Holo">
|
||||
<item name="android:windowEnableSplitTouch">false</item>
|
||||
<style name="NoSplitMotionEvents" parent="android:Theme.Holo">
|
||||
<item name="android:windowEnableSplitTouch">false</item>
|
||||
...
|
||||
</style>
|
||||
</style>
|
||||
</pre>
|
||||
<p>When this theme is applied to an <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> or <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>,
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> or <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>,
|
||||
only touch events within the current activity window are accepted. For example, by disabling split
|
||||
touch events across windows, the system bar cannot receive touch events at the same time as the
|
||||
activity. This does <em>not</em> affect whether views inside the activity can split touch
|
||||
@@ -794,7 +794,7 @@ specification, the Browser allows web applications to access audio, image and vi
|
||||
capabilities of the device. For example, the following HTML provides an input for the user to
|
||||
capture a photo to upload:</p>
|
||||
<pre>
|
||||
<input type="file" accept="image/*;capture=camera" />
|
||||
<input type="file" accept="image/*;capture=camera" />
|
||||
</pre>
|
||||
<p>Or by excluding the {@code capture=camera} parameter, the user can choose to either capture a
|
||||
new image with the camera or select one from the device (such as from the Gallery application).</p>
|
||||
@@ -850,7 +850,7 @@ parse mode is also compatible with the {@link org.json}'s default parser.</p>
|
||||
<h3>New feature constants</h3>
|
||||
|
||||
<p>The <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
manfest element should be used to inform external entities (such as Google Play) of the set of
|
||||
hardware and software features on which your application depends. In this release, Android adds the
|
||||
following new constants that applications can declare with this element:</p>
|
||||
@@ -868,14 +868,14 @@ impossible on faketouch devices (and multitouch gestures are definitely not poss
|
||||
<em>not</em> want your application filtered from devices with an emulated touchscreen, you
|
||||
should declare {@link
|
||||
android.content.pm.PackageManager#FEATURE_FAKETOUCH "android.hardware.faketouch"} with a <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
element. This way, your application will be available to the greatest number of device types,
|
||||
including those that provide only an emulated touchscreen input.</p>
|
||||
<p>All devices that include a touchscreen also support {@link
|
||||
android.content.pm.PackageManager#FEATURE_FAKETOUCH "android.hardware.faketouch"}, because
|
||||
touchscreen capabilities are a superset of faketouch capabilities. Thus, unless you actually require
|
||||
a touchscreen, you should add a <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
element for faketouch.</p>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -889,14 +889,14 @@ element for faketouch.</p>
|
||||
<li>{@link android.Manifest.permission#BIND_REMOTEVIEWS
|
||||
"android.permission.BIND_REMOTEVIEWS"}
|
||||
<p>This must be declared as a required permission in the <a
|
||||
href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> manifest
|
||||
href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> manifest
|
||||
element for an implementation of {@link android.widget.RemoteViewsService}. For example, when
|
||||
creating an App Widget that uses {@link android.widget.RemoteViewsService} to populate a
|
||||
collection view, the manifest entry may look like this:</p>
|
||||
<pre>
|
||||
<service android:name=".widget.WidgetService"
|
||||
android:exported="false"
|
||||
android:permission="android.permission.BIND_REMOTEVIEWS" />
|
||||
android:permission="android.permission.BIND_REMOTEVIEWS" />
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -388,8 +388,8 @@ To declare a widget as resizeable horizontally and vertically, supply the value
|
||||
android:previewImage="@drawable/preview"
|
||||
android:initialLayout="@layout/example_appwidget"
|
||||
android:configure="com.example.android.ExampleAppWidgetConfigure"
|
||||
android:resizeMode="horizontal|vertical" >
|
||||
</appwidget-provider></pre>
|
||||
android:resizeMode="horizontal|vertical" >
|
||||
</appwidget-provider></pre>
|
||||
|
||||
<p>For more information about Home screen widgets, see the <a
|
||||
href="{@docRoot}guide/topics/appwidgets/index.html">App Widgets</a>
|
||||
@@ -809,7 +809,7 @@ Play of the application's requirement for new hardware capabilities supported
|
||||
in this version of the platform. Developers declare these and other feature
|
||||
constants in <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
|
||||
<uses-feature>}</a> manifest elements.
|
||||
<uses-feature>}</a> manifest elements.
|
||||
|
||||
<ul>
|
||||
<li>{@link android.content.pm.PackageManager#FEATURE_USB_ACCESSORY
|
||||
@@ -824,7 +824,7 @@ devices.</li>
|
||||
|
||||
<p>Google Play filters applications based on features declared in <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
|
||||
<uses-feature>}</a> manifest elements. For more information about
|
||||
<uses-feature>}</a> manifest elements. For more information about
|
||||
declaring features in an application manifest, read <a
|
||||
href="{@docRoot}google/play/filters.html">Google Play
|
||||
Filters</a>.</p>
|
||||
|
||||
@@ -481,7 +481,7 @@ in their application manifests, to inform external entities such as Google
|
||||
Play of required hardware and software capabilities. You declare these
|
||||
and other feature constants in <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
|
||||
<uses-feature>}</a> manifest elements.
|
||||
<uses-feature>}</a> manifest elements.
|
||||
|
||||
<p>Google Play filters applications based on their <code><uses-feature></code> attributes, to ensure that they are available only to devices on which their requirements are met. </p>
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ application is compatible with the system, prior to installing the application.
|
||||
application against an Android platform that supports API level {@sdkPlatformApiLevel} or
|
||||
higher. Depending on your needs, you might also need to add an
|
||||
<code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code> attribute to the
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
|
||||
element.</p>
|
||||
|
||||
<p>For more information, see the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a>
|
||||
|
||||
@@ -909,9 +909,9 @@ spelling suggestions as {@link android.view.textservice.SuggestionsInfo} objects
|
||||
|
||||
<p>Applications with a spell checker service must declare the {@link
|
||||
android.Manifest.permission#BIND_TEXT_SERVICE} permission as required by the service.
|
||||
The service must also declare an intent filter with {@code <action
|
||||
The service must also declare an intent filter with {@code <action
|
||||
android:name="android.service.textservice.SpellCheckerService" />} as the intent’s action and should
|
||||
include a {@code <meta-data>} element that declares configuration information for the spell
|
||||
include a {@code <meta-data>} element that declares configuration information for the spell
|
||||
checker. </p>
|
||||
|
||||
<p>See the sample <a href="{@docRoot}resources/samples/SpellChecker/SampleSpellCheckerService/index.html">
|
||||
@@ -997,12 +997,12 @@ declaration an intent filter for the {@link android.content.Intent#ACTION_MANAGE
|
||||
action. For example:</p>
|
||||
|
||||
<pre>
|
||||
<activity android:name="DataPreferences" android:label="@string/title_preferences">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MANAGE_NETWORK_USAGE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="DataPreferences" android:label="@string/title_preferences">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MANAGE_NETWORK_USAGE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</pre>
|
||||
|
||||
<p>This intent filter indicates to the system that this is the activity that controls your
|
||||
@@ -1054,7 +1054,7 @@ users must manually enable it in the system settings.</p>
|
||||
<p>Applications that manage the device restrictions can now disable the camera using {@link
|
||||
android.app.admin.DevicePolicyManager#setCameraDisabled setCameraDisabled()} and the {@link
|
||||
android.app.admin.DeviceAdminInfo#USES_POLICY_DISABLE_CAMERA} property (applied with a {@code
|
||||
<disable-camera />} element in the policy configuration file).</p>
|
||||
<disable-camera />} element in the policy configuration file).</p>
|
||||
|
||||
|
||||
<h4>Certificate management</h4>
|
||||
@@ -1120,10 +1120,10 @@ a narrow screen, so the system will place more of them into the overflow menu. H
|
||||
allows you to enable “split action bar" so that more action items can appear on the screen in a
|
||||
separate bar at the bottom of the screen. To enable split action bar, add {@link
|
||||
android.R.attr#uiOptions android:uiOptions} with {@code "splitActionBarWhenNarrow"} to either your
|
||||
<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
<a href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
tag or
|
||||
individual <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
|
||||
<activity>}</a> tags
|
||||
<activity>}</a> tags
|
||||
in your manifest file. When enabled, the system will add an additional bar at the bottom of the
|
||||
screen for all action items when the screen is narrow (no action items will appear in the primary
|
||||
action bar).</p>
|
||||
@@ -1166,7 +1166,7 @@ in the action view for faster access to sharing with that app.</p>
|
||||
|
||||
<p>To declare an action provider for an action item, include the {@code android:actionProviderClass}
|
||||
attribute in the <a href="{@docRoot}guide/topics/resources/menu-resource.html#item-element">{@code
|
||||
<item>}</a> element for your activity’s options menu, with the class name of the action
|
||||
<item>}</a> element for your activity’s options menu, with the class name of the action
|
||||
provider as the value. For example:</p>
|
||||
|
||||
<pre>
|
||||
@@ -1208,7 +1208,7 @@ visible).</p>
|
||||
<p>To declare that an action item that contains an action view be collapsible, include the {@code
|
||||
“collapseActionView"} flag in the {@code android:showAsAction} attribute for the <a
|
||||
href="{@docRoot}guide/topics/resources/menu-resource.html#item-element">{@code
|
||||
<item>}</a> element in the menu’s XML file.</p>
|
||||
<item>}</a> element in the menu’s XML file.</p>
|
||||
|
||||
<p>To receive callbacks when an action view switches between expanded and collapsed, register an
|
||||
instance of {@link android.view.MenuItem.OnActionExpandListener} with the respective {@link
|
||||
@@ -1560,8 +1560,8 @@ scrolling, and overall better performance and response to user interaction.</p>
|
||||
<p>If necessary, you can manually disable hardware acceleration with the <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html#hwaccel">{@code hardwareAccelerated}</a>
|
||||
attribute for individual <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
|
||||
<activity>}</a> elements or the <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
<activity>}</a> elements or the <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
element. You can alternatively disable hardware acceleration for individual views by calling {@link
|
||||
android.view.View#setLayerType setLayerType(LAYER_TYPE_SOFTWARE)}.</p>
|
||||
|
||||
@@ -1759,7 +1759,7 @@ distinguish between a 5" device and a 7" device, which would both traditionally
|
||||
href="http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html">
|
||||
New Tools for Managing Screen Sizes</a>.</li>
|
||||
<li>New constants for <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> to
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> to
|
||||
declare landscape or portrait screen orientation requirements.</li>
|
||||
<li>The device "screen size" configuration now changes during a screen orientation
|
||||
change. If your app targets API level 13 or higher, you must handle the {@code "screenSize"}
|
||||
@@ -1787,7 +1787,7 @@ application is compatible with the system, prior to installing the application.
|
||||
application against an Android platform that supports API level {@sdkPlatformApiLevel} or
|
||||
higher. Depending on your needs, you might also need to add an
|
||||
<code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code> attribute to the
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
|
||||
element.</p>
|
||||
|
||||
<p>For more information, read <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
|
||||
|
||||
@@ -149,7 +149,7 @@ app on Android 4.1.</p>
|
||||
<h3 id="Isolated">Isolated services</h3>
|
||||
|
||||
<p>By specifying <a href="{@docRoot}guide/topics/manifest/service-element.html#isolated">{@code android:isolatedProcess="true"}</a> in the
|
||||
<a href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> tag, your {@link android.app.Service} will run under
|
||||
<a href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> tag, your {@link android.app.Service} will run under
|
||||
its own isolated user ID process that has no permissions of its own.</p>
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ android.app.WallpaperManager#EXTRA_LIVE_WALLPAPER_COMPONENT}.</p>
|
||||
All you need to do is add the <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
|
||||
android:parentActivityName}</a> to each <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element in
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element in
|
||||
your manifest file. The system uses this information to open the appropriate activity when the user
|
||||
presses the Up button in the action bar (while also finishing the current activity). So if you
|
||||
declare the <a href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
|
||||
@@ -287,7 +287,7 @@ onPrepareNavigateUpTaskStack()}, but can can achieve the correct behavior simply
|
||||
adding <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code
|
||||
android:parentActivityName}</a> to each <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.</p>
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.</p>
|
||||
|
||||
|
||||
|
||||
@@ -889,13 +889,13 @@ IME, or a dictionary editor like the Settings app.</dd>
|
||||
<p>Android 4.1 includes a new feature declaration for devices that are dedicated
|
||||
to displaying the user interface on a television screen: {@link
|
||||
android.content.pm.PackageManager#FEATURE_TELEVISION}. To declare that your app requires
|
||||
a television interface, declare this feature in your manifest file with the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> element:</p>
|
||||
a television interface, declare this feature in your manifest file with the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> element:</p>
|
||||
<pre>
|
||||
<manifest ... >
|
||||
<manifest ... >
|
||||
<uses-feature android:name="android.hardware.type.television"
|
||||
android:required="true" />
|
||||
android:required="true" />
|
||||
...
|
||||
</manifest>
|
||||
</manifest>
|
||||
</pre>
|
||||
|
||||
<p>This feature defines "television" to be a typical living room television experience:
|
||||
|
||||
@@ -166,18 +166,18 @@ new Activity.</p>
|
||||
|
||||
<p>To make your daydream available to the system, declare your {@link
|
||||
android.service.dreams.DreamService} with a <a
|
||||
href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
|
||||
href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
|
||||
in your manifest file. You must then include an intent filter with the action {@code
|
||||
"android.service.dreams.DreamService"}. For example:</p>
|
||||
|
||||
<pre>
|
||||
<service android:name=".MyDream" android:exported="true"
|
||||
android:icon="@drawable/dream_icon" android:label="@string/dream_label" >
|
||||
<intent-filter>
|
||||
<action android:name="android.service.dreams.DreamService" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
android:icon="@drawable/dream_icon" android:label="@string/dream_label" >
|
||||
<intent-filter>
|
||||
<action android:name="android.service.dreams.DreamService" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
</pre>
|
||||
|
||||
<p>There are some other useful methods in {@link android.service.dreams.DreamService}
|
||||
@@ -255,7 +255,7 @@ android.media.MediaRouter#getSelectedRoute MediaRouter.getSelectedRoute()} as me
|
||||
secondary screens, you can apply
|
||||
a different theme by specifying the {@link
|
||||
android.R.attr#presentationTheme android:presentationTheme} attribute in the <a
|
||||
href="{@docRoot}guide/topics/resources/style-resource.html">{@code <style>}</a> that you’ve
|
||||
href="{@docRoot}guide/topics/resources/style-resource.html">{@code <style>}</a> that you’ve
|
||||
applied to your application or activity.</p>
|
||||
|
||||
<p>Keep in mind that screens connected to the user’s device often have a larger screen size and
|
||||
@@ -294,8 +294,8 @@ screen, add the {@code keyguard} value:</p>
|
||||
<pre>
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
...
|
||||
android:widgetCategory="keyguard|home_screen">
|
||||
</appwidget-provider>
|
||||
android:widgetCategory="keyguard|home_screen">
|
||||
</appwidget-provider>
|
||||
</pre>
|
||||
|
||||
<p>You should also specify an initial layout for your app widget when on the lock screen with
|
||||
@@ -399,7 +399,7 @@ transform layout orientation to support languages that use right-to-left (RTL) U
|
||||
direction, such as Arabic and Hebrew.</p>
|
||||
|
||||
<p>To begin supporting RTL layouts in your app, set the {@link android.R.attr#supportsRtl
|
||||
android:supportsRtl} attribute to the {@code <application>} element in your manifest file
|
||||
android:supportsRtl} attribute to the {@code <application>} element in your manifest file
|
||||
and set it {@code “true"}. Once you enable this, the system will enable various RTL APIs to
|
||||
display your app with RTL layouts. For instance, the action bar will show the icon and title
|
||||
on the right side and action buttons on the left, and any layouts you’ve created with the
|
||||
@@ -483,7 +483,7 @@ transaction.add(R.id.video_fragment, videoFragment).commit();
|
||||
fragment designs on Android 1.6 and higher.</p>
|
||||
|
||||
<p><strong>Note:</strong> You cannot inflate a layout into a fragment when that layout
|
||||
includes a {@code <fragment>}. Nested fragments are only supported when added to a
|
||||
includes a {@code <fragment>}. Nested fragments are only supported when added to a
|
||||
fragment dynamically.</p>
|
||||
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ unexpectedly when used in a restricted profile.</p>
|
||||
app depends on account information that's sensitive, specify the <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html#requiredAccountType">{@code
|
||||
android:requiredAccountType}</a> attribute in your manifest's <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
element.</p>
|
||||
|
||||
<p>If you’d like to allow restricted profiles to continue using your app even though they can’t
|
||||
@@ -298,10 +298,10 @@ three options:</p>
|
||||
|
||||
<li><strong>Allow access to the owner’s accounts from a restricted profile.</strong>
|
||||
<p>To get access to an account from a restricted profile, you must add the <a href="{@docRoot}guide/topics/manifest/application-element.html#restrictedAccountType">{@code android:restrictedAccountType}</a> attribute to the <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> tag:</p>
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> tag:</p>
|
||||
<pre>
|
||||
<application ...
|
||||
android:restrictedAccountType="com.example.account.type" >
|
||||
android:restrictedAccountType="com.example.account.type" >
|
||||
</pre>
|
||||
|
||||
<p class="caution"><strong>Caution:</strong> Enabling this attribute provides your
|
||||
@@ -341,10 +341,10 @@ your app depends on sensitive personal information in an account (and because re
|
||||
currently cannot add new accounts), add
|
||||
the <a href="{@docRoot}guide/topics/manifest/application-element.html#requiredAccountType">{@code
|
||||
android:requiredAccountType}</a> attribute to the <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> tag:</p>
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> tag:</p>
|
||||
<pre>
|
||||
<application ...
|
||||
android:requiredAccountType="com.example.account.type" >
|
||||
android:requiredAccountType="com.example.account.type" >
|
||||
</pre>
|
||||
<p>For example, the Gmail app uses this attribute to disable itself for restricted profiles,
|
||||
because the owner's personal email should not be available to restricted profiles.</p>
|
||||
@@ -363,10 +363,10 @@ peripherals such as heart rate monitors and pedometers.</p>
|
||||
|
||||
<p>Because Bluetooth LE is a hardware feature that is not available on all
|
||||
Android-powered devices, you must declare in your manifest file a <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
element for {@code "android.hardware.bluetooth_le"}:</p>
|
||||
<pre>
|
||||
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
|
||||
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
|
||||
</pre>
|
||||
|
||||
<p>If you're already familiar with Android's Classic Bluetooth APIs, notice that using the
|
||||
@@ -592,13 +592,13 @@ provided in OpenGL ES 3.0 includes:</p>
|
||||
|
||||
<p>The Java interface for OpenGL ES 3.0 on Android is provided with {@link android.opengl.GLES30}.
|
||||
When using OpenGL ES 3.0, be sure that you declare it in your manifest file with the
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-feature></a>
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-feature></a>
|
||||
tag and the {@code android:glEsVersion} attribute. For example:</p>
|
||||
<pre>
|
||||
<manifest>
|
||||
<uses-feature android:glEsVersion="0x00030000" />
|
||||
<manifest>
|
||||
<uses-feature android:glEsVersion="0x00030000" />
|
||||
...
|
||||
</manifest>
|
||||
</manifest>
|
||||
</pre>
|
||||
|
||||
<p>And remember to specify the OpenGL ES context by calling {@link
|
||||
@@ -740,7 +740,7 @@ function toggleOpticalImages(mouseover) {
|
||||
<p style="clear:left">To align the views based on their optical bounds, set the {@code android:layoutMode} attribute to {@code "opticalBounds"} in one of the parent layouts. For example:</p>
|
||||
|
||||
<pre>
|
||||
<LinearLayout android:layoutMode="opticalBounds" ... >
|
||||
<LinearLayout android:layoutMode="opticalBounds" ... >
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -818,7 +818,7 @@ for you app layout. Overscan mode is determined by the {@link android.view.Windo
|
||||
<h3 id="Orientation">Screen orientation</h3>
|
||||
|
||||
<p>The <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
tag's <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code screenOrientation}</a>
|
||||
attribute now supports additional values to honor the user's preference for auto-rotation:</p>
|
||||
@@ -1110,7 +1110,7 @@ hardware, you can check at runtime if hardware-backed storage is available by ca
|
||||
<h3 id="ManifestFeatures">Declarable required features</h3>
|
||||
|
||||
<p>The following values are now supported in the <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
element so you can ensure that your app is installed only on devices that provide the features
|
||||
your app needs.</p>
|
||||
|
||||
@@ -1120,7 +1120,7 @@ your app needs.</p>
|
||||
include a Home screen or similar location where users can embed app widgets.
|
||||
Example:
|
||||
<pre>
|
||||
<uses-feature android:name="android.software.app_widgets" android:required="true" />
|
||||
<uses-feature android:name="android.software.app_widgets" android:required="true" />
|
||||
</pre>
|
||||
</dd>
|
||||
|
||||
@@ -1129,7 +1129,7 @@ Example:
|
||||
devices that support third-party Home screen apps.
|
||||
Example:
|
||||
<pre>
|
||||
<uses-feature android:name="android.software.home_screen" android:required="true" />
|
||||
<uses-feature android:name="android.software.home_screen" android:required="true" />
|
||||
</pre>
|
||||
</dd>
|
||||
|
||||
@@ -1139,7 +1139,7 @@ android.inputmethodservice.InputMethodService}) and should be installed only on
|
||||
support third-party input methods.
|
||||
Example:
|
||||
<pre>
|
||||
<uses-feature android:name="android.software.input_methods" android:required="true" />
|
||||
<uses-feature android:name="android.software.input_methods" android:required="true" />
|
||||
</pre>
|
||||
</dd>
|
||||
|
||||
@@ -1148,7 +1148,7 @@ Example:
|
||||
that are capable of communicating with other devices via Bluetooth Low Energy.
|
||||
Example:
|
||||
<pre>
|
||||
<uses-feature android:name="android.software.bluetooth_le" android:required="true" />
|
||||
<uses-feature android:name="android.software.bluetooth_le" android:required="true" />
|
||||
</pre>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -1156,7 +1156,7 @@ Example:
|
||||
|
||||
<h3 id="ManifestPermissions">User permissions</h3>
|
||||
<p>The following values are now supported in the <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a>
|
||||
to declare the
|
||||
permissions your app requires in order to access certain APIs.</p>
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targe
|
||||
|
||||
<p>When running on a device that includes an infrared (IR) transmitter, you can now transmit IR signals using the {@link android.hardware.ConsumerIrManager} APIs. To get an instance of {@link android.hardware.ConsumerIrManager}, call {@link android.content.Context#getSystemService getSystemService()} with {@link android.content.Context#CONSUMER_IR_SERVICE} as the argument. You can then query the device's supported IR frequencies with {@link android.hardware.ConsumerIrManager#getCarrierFrequencies()} and transmit signals by passing your desired frequency and signal pattern with {@link android.hardware.ConsumerIrManager#transmit transmit()}.</p>
|
||||
|
||||
<p>You should always first check whether a device includes an IR transmitter by calling {@link android.hardware.ConsumerIrManager#hasIrEmitter()}, but if your app is compatible only with devices that do have one, you should include a <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> element in your manifest for {@code "android.hardware.consumerir"} ({@link android.content.pm.PackageManager#FEATURE_CONSUMER_IR}).</p>
|
||||
<p>You should always first check whether a device includes an IR transmitter by calling {@link android.hardware.ConsumerIrManager#hasIrEmitter()}, but if your app is compatible only with devices that do have one, you should include a <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> element in your manifest for {@code "android.hardware.consumerir"} ({@link android.content.pm.PackageManager#FEATURE_CONSUMER_IR}).</p>
|
||||
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targe
|
||||
|
||||
<p>Alternatively, you don't need to create a {@link android.transition.Scene} object at all, but can instead call {@link android.transition.TransitionManager#beginDelayedTransition beginDelayedTransition()}, specifying a {@link android.view.ViewGroup} that contains the views you want to change. Then add, remove, or reconfigure the target views. After the system lays out the changes as necessary, a transition starts to animate all the affected views.</p>
|
||||
|
||||
<p>For additional control, you can define sets of transitions that should occur between pre-defined scenes, using an XML file in your project {@code res/transition/} directory. Inside a {@code <transitionManager>} element, specify one or more {@code <transition>} tags that each specify a scene (a reference to a layout file) and the transition to apply when entering and/or exiting that scene. Then inflate this set of transitions using {@link android.transition.TransitionInflater#inflateTransitionManager inflateTransitionManager()}. Use the returned {@link android.transition.TransitionManager} to execute each transition with {@link android.transition.TransitionManager#transitionTo transitionTo()}, passing a {@link android.transition.Scene} that is represented by one of the {@code <transition>} tags. You can also define sets of transitions programmatically with the {@link android.transition.TransitionManager} APIs.</p>
|
||||
<p>For additional control, you can define sets of transitions that should occur between pre-defined scenes, using an XML file in your project {@code res/transition/} directory. Inside a {@code <transitionManager>} element, specify one or more {@code <transition>} tags that each specify a scene (a reference to a layout file) and the transition to apply when entering and/or exiting that scene. Then inflate this set of transitions using {@link android.transition.TransitionInflater#inflateTransitionManager inflateTransitionManager()}. Use the returned {@link android.transition.TransitionManager} to execute each transition with {@link android.transition.TransitionManager#transitionTo transitionTo()}, passing a {@link android.transition.Scene} that is represented by one of the {@code <transition>} tags. You can also define sets of transitions programmatically with the {@link android.transition.TransitionManager} APIs.</p>
|
||||
|
||||
<p>When specifying a transition, you can use several predefined types defined by subclasses of {@link android.transition.Transition}, such as {@link android.transition.Fade} and {@link android.transition.ChangeBounds}. If you don't specify a transition type, the system uses {@link android.transition.AutoTransition} by default, which automatically fades, moves, and resizes views as necessary. Additionally, you can create custom transitions by extending any of these classes to perform the animations however you'd like. A custom transition can track any property changes you'd like, and create any animation you want to based on those changes. For example, you could provide a subclass of {@link android.transition.Transition} that listens for changes to the "rotation" property of a view then animate any changes.</p>
|
||||
|
||||
@@ -531,7 +531,7 @@ The new {@link android.app.Notification.Action} class defines the characteristic
|
||||
|
||||
<h2 id="Permissions">App Permissions</h2>
|
||||
|
||||
<p>The following are new permissions that your app must request with the <a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a> tag to use certain new APIs:</p>
|
||||
<p>The following are new permissions that your app must request with the <a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a> tag to use certain new APIs:</p>
|
||||
|
||||
<dl>
|
||||
<dt>{@link android.Manifest.permission#INSTALL_SHORTCUT}</dt>
|
||||
@@ -550,7 +550,7 @@ The new {@link android.app.Notification.Action} class defines the characteristic
|
||||
|
||||
<h2 id="DeviceFeatures">Device Features</h2>
|
||||
|
||||
<p>The following are new device features that you can declare with the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag to declare your app requirements and enable filtering on Google Play or check for at runtime:</p>
|
||||
<p>The following are new device features that you can declare with the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag to declare your app requirements and enable filtering on Google Play or check for at runtime:</p>
|
||||
|
||||
<dl>
|
||||
<dt>{@link android.content.pm.PackageManager#FEATURE_CONSUMER_IR}</dt>
|
||||
|
||||
@@ -351,7 +351,7 @@ ES 3.1. Key new functionality provided in OpenGL ES 3.1 includes:</p>
|
||||
<p>The Java interface for OpenGL ES 3.1 on Android is provided with
|
||||
{@link android.opengl.GLES31}. When using OpenGL ES 3.1, be sure that you
|
||||
declare it in your manifest file with the
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag and the {@code android:glEsVersion} attribute. For example:</p>
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag and the {@code android:glEsVersion} attribute. For example:</p>
|
||||
|
||||
<pre>
|
||||
<manifest>
|
||||
@@ -942,7 +942,7 @@ how to implement switching between IMEs, see
|
||||
|
||||
<h3 id="ManifestFeatures">Declarable required features</h3>
|
||||
<p>The following values are now supported in the
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
element, so you can ensure that your app is installed only on devices that
|
||||
provide the features your app needs.</p>
|
||||
|
||||
@@ -968,7 +968,7 @@ provide the features your app needs.</p>
|
||||
<h3 id="Permissions">User permissions</h3>
|
||||
|
||||
<p>The following permission is now supported in the
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a>
|
||||
<a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a>
|
||||
element to declare the permissions your app requires to access certain APIs.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
@@ -321,7 +321,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
|
||||
<p style="margin-bottom:.5em;">
|
||||
If the app uses a game controller as it's primary input method, it declares the appropriate
|
||||
requirement with the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"
|
||||
>{@code <uses-feature>}</a> manifest tag.
|
||||
>{@code <uses-feature>}</a> manifest tag.
|
||||
(<a href="{@docRoot}training/tv/games/index.html#gamepad">Learn how</a>)
|
||||
</p>
|
||||
</td>
|
||||
|
||||
@@ -70,7 +70,7 @@ method calls.</p>
|
||||
<li>Select <strong>Google Play Billing Library</strong>.</li>
|
||||
<li>Click <strong>Install packages</strong> to complete the download.</li>
|
||||
</ol>
|
||||
<p>The {@code IInAppBillingService.aidl} file will be installed to {@code <sdk>/extras/google/play_billing/}.</p>
|
||||
<p>The {@code IInAppBillingService.aidl} file will be installed to {@code <sdk>/extras/google/play_billing/}.</p>
|
||||
|
||||
<p>To add the AIDL to your project:</p>
|
||||
<ol>
|
||||
@@ -85,7 +85,7 @@ Project</strong>, then follow the instructions in the <strong>New Android
|
||||
Application</strong> wizard to create a new project in your workspace.</li>
|
||||
<li>In the {@code /src} directory, click <strong>File</strong> >
|
||||
<strong>New</strong> > <strong>Package</strong>, then create a package named {@code com.android.vending.billing}.</li>
|
||||
<li>Copy the {@code IInAppBillingService.aidl} file from {@code <sdk>/extras/google/play_billing/} and paste it into the {@code src/com.android.vending.billing/}
|
||||
<li>Copy the {@code IInAppBillingService.aidl} file from {@code <sdk>/extras/google/play_billing/} and paste it into the {@code src/com.android.vending.billing/}
|
||||
folder in your workspace.</li>
|
||||
</ol>
|
||||
</li>
|
||||
|
||||
@@ -131,7 +131,7 @@ considers them opaque binary blobs and renames the files using the following sch
|
||||
<dt>{@code main} or {@code patch}</dt>
|
||||
<dd>Specifies whether the file is the main or patch expansion file. There can be
|
||||
only one main file and one patch file for each APK.</dd>
|
||||
<dt>{@code <expansion-version>}</dt>
|
||||
<dt>{@code <expansion-version>}</dt>
|
||||
<dd>This is an integer that matches the version code of the APK with which the expansion is
|
||||
<em>first</em> associated (it matches the application's <a
|
||||
href="{@docRoot}guide/topics/manifest/manifest-element.html#vcode">{@code android:versionCode}</a>
|
||||
@@ -139,7 +139,7 @@ value).
|
||||
<p>"First" is emphasized because although the Developer Console allows you to
|
||||
re-use an uploaded expansion file with a new APK, the expansion file's name does not change—it
|
||||
retains the version applied to it when you first uploaded the file.</p></dd>
|
||||
<dt>{@code <package-name>}</dt>
|
||||
<dt>{@code <package-name>}</dt>
|
||||
<dd>Your application's Java-style package name.</dd>
|
||||
</dl>
|
||||
|
||||
@@ -162,9 +162,9 @@ itself, you must save the files to the exact same location.</p>
|
||||
</pre>
|
||||
|
||||
<ul>
|
||||
<li>{@code <shared-storage>} is the path to the shared storage space, available from
|
||||
<li>{@code <shared-storage>} is the path to the shared storage space, available from
|
||||
{@link android.os.Environment#getExternalStorageDirectory()}.</li>
|
||||
<li>{@code <package-name>} is your application's Java-style package name, available
|
||||
<li>{@code <package-name>} is your application's Java-style package name, available
|
||||
from {@link android.content.Context#getPackageName()}.</li>
|
||||
</ul>
|
||||
|
||||
@@ -464,7 +464,7 @@ Library. For each library:
|
||||
<ol>
|
||||
<li>Begin a new Android project.</li>
|
||||
<li>Select <strong>Create project from existing
|
||||
source</strong> and choose the library from the {@code <sdk>/extras/google/} directory
|
||||
source</strong> and choose the library from the {@code <sdk>/extras/google/} directory
|
||||
({@code market_licensing/} for the License Verification Library or {@code
|
||||
market_apk_expansion/downloader_library/} for the Downloader Library).</li>
|
||||
<li>Specify a <em>Project Name</em> such as "Google Play License Library" and "Google Play
|
||||
@@ -717,7 +717,7 @@ application's {@code SampleDownloaderActivity} class for details.)</p>
|
||||
</li>
|
||||
<li>Start the download by calling the static method {@code
|
||||
DownloaderClientMarshaller.startDownloadServiceIfRequired(Context c, PendingIntent
|
||||
notificationClient, Class<?> serviceClass)}.
|
||||
notificationClient, Class<?> serviceClass)}.
|
||||
<p>The method takes the following parameters:</p>
|
||||
<ul>
|
||||
<li><code>context</code>: Your application's {@link android.content.Context}.</li>
|
||||
@@ -781,7 +781,7 @@ public void onCreate(Bundle savedInstanceState) {
|
||||
</li>
|
||||
<li>When the {@code startDownloadServiceIfRequired()} method returns anything <em>other
|
||||
than</em> {@code NO_DOWNLOAD_REQUIRED}, create an instance of {@code IStub} by
|
||||
calling {@code DownloaderClientMarshaller.CreateStub(IDownloaderClient client, Class<?>
|
||||
calling {@code DownloaderClientMarshaller.CreateStub(IDownloaderClient client, Class<?>
|
||||
downloaderService)}. The {@code IStub} provides a binding between your activity to the downloader
|
||||
service such that your activity receives callbacks about the download progress.
|
||||
<p>In order to instantiate your {@code IStub} by calling {@code CreateStub()}, you must pass it
|
||||
@@ -957,7 +957,7 @@ which explains how to implement a license policy such as this one.</p>
|
||||
depends on the type of file you've used. As discussed in the <a href="#Overview">overview</a>, your
|
||||
expansion files can be any kind of file you
|
||||
want, but are renamed using a particular <a href="#Filename">file name format</a> and are saved to
|
||||
{@code <shared-storage>/Android/obb/<package-name>/}.</p>
|
||||
{@code <shared-storage>/Android/obb/<package-name>/}.</p>
|
||||
|
||||
<p>Regardless of how you read your files, you should always first check that the external
|
||||
storage is available for reading. There's a chance that the user has the storage mounted to a
|
||||
@@ -1060,7 +1060,7 @@ option to specify the file suffixes that should not be compressed:</p>
|
||||
|
||||
<p>The Google Market Apk Expansion package includes a library called the APK
|
||||
Expansion Zip Library (located in {@code
|
||||
<sdk>/extras/google/google_market_apk_expansion/zip_file/}). This is an optional library that
|
||||
<sdk>/extras/google/google_market_apk_expansion/zip_file/}). This is an optional library that
|
||||
helps you read your expansion
|
||||
files when they're saved as ZIP files. Using this library allows you to easily read resources from
|
||||
your ZIP expansion files as a virtual file system.</p>
|
||||
|
||||
@@ -338,24 +338,24 @@ Google Play filtering.</p>
|
||||
<tr><th>Manifest Element</th><th>Summary</th></tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a></nobr></td>
|
||||
<compatible-screens>}</a></nobr></td>
|
||||
<td>
|
||||
<p>Google Play filters the application if the device screen size and density does not match
|
||||
any of the screen configurations (declared by a {@code <screen>} element) in the {@code
|
||||
<compatible-screens>} element.</p>
|
||||
any of the screen configurations (declared by a {@code <screen>} element) in the {@code
|
||||
<compatible-screens>} element.</p>
|
||||
<p class="caution"><strong>Caution:</strong> Normally, <strong>you should not use
|
||||
this manifest element</strong>. Using this element can dramatically
|
||||
reduce the potential user base for your application, by excluding all combinations of screen size
|
||||
and density that you have not listed. You should instead use the <a
|
||||
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> manifest element (described above in <a href="#table1">table
|
||||
<supports-screens>}</a> manifest element (described above in <a href="#table1">table
|
||||
1</a>) to enable screen compatibility mode for screen configurations you have not accounted for
|
||||
with alternative resources.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><nobr><a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a></nobr></td>
|
||||
<supports-gl-texture>}</a></nobr></td>
|
||||
<td>
|
||||
<p>Google Play filters the application unless one or more of the GL texture compression
|
||||
formats supported by the application are also supported by the device. </p>
|
||||
@@ -419,17 +419,17 @@ when each APK provides different filters based on the following configurations:<
|
||||
<li>OpenGL texture compression formats
|
||||
<p>By using the <a
|
||||
href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a> element.</p>
|
||||
<supports-gl-texture>}</a> element.</p>
|
||||
</li>
|
||||
<li>Screen size (and, optionally, screen density)
|
||||
<p>By using the <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> or <a
|
||||
<supports-screens>}</a> or <a
|
||||
href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a> element.</p>
|
||||
<compatible-screens>}</a> element.</p>
|
||||
</li>
|
||||
<li>API level
|
||||
<p>By using the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
|
||||
<uses-sdk>}</a> element.</p>
|
||||
<uses-sdk>}</a> element.</p>
|
||||
</li>
|
||||
<li>CPU Architecture (ABI)
|
||||
<p>By including native libraries built with the <a href="{@docRoot}tools/sdk/ndk/index.html">Android
|
||||
|
||||
@@ -180,12 +180,12 @@ these steps: </p>
|
||||
|
||||
<ol>
|
||||
<li>Launch the Android SDK Manager (available under the Eclipse <strong>Window</strong>
|
||||
menu or by executing {@code <sdk>/tools/android sdk}).</li>
|
||||
menu or by executing {@code <sdk>/tools/android sdk}).</li>
|
||||
<li>Select and download <strong>Google APIs</strong> for the Android version you'd like to target
|
||||
(must be Android 2.2 or higher).</li>
|
||||
<li>When the download is complete, open the AVD Manager (available under the Eclipse
|
||||
<strong>Window</strong>
|
||||
menu or by executing {@code <sdk>/tools/android avd}).</li>
|
||||
menu or by executing {@code <sdk>/tools/android avd}).</li>
|
||||
<li>Click
|
||||
<strong>New</strong> and set the configuration details for the new AVD. </li>
|
||||
<li>In the dialog that appears, assign a descriptive name to the AVD and then
|
||||
|
||||
@@ -204,7 +204,7 @@ device characteristics:</p>
|
||||
<li><strong>OpenGL texture compression formats</strong>
|
||||
<p>This is based on your manifest file's <a
|
||||
href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
|
||||
<supports-gl-texture>}</a> element(s).</p>
|
||||
<supports-gl-texture>}</a> element(s).</p>
|
||||
<p>For example, when developing a game that uses OpenGL ES, you can provide one APK for
|
||||
devices that support ATI texture compression and a separate APK for devices
|
||||
that support PowerVR compression (among many others).</p>
|
||||
@@ -214,11 +214,11 @@ that support PowerVR compression (among many others).</p>
|
||||
<li><strong>Screen size (and, optionally, screen density)</strong>
|
||||
<p>This is based on your manifest file's <a
|
||||
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> <em>or</em> <a
|
||||
<supports-screens>}</a> <em>or</em> <a
|
||||
href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a> element. You should never use both elements and you should use only
|
||||
<compatible-screens>}</a> element. You should never use both elements and you should use only
|
||||
<a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> when possible.</p>
|
||||
<supports-screens>}</a> when possible.</p>
|
||||
<p>For example, you can provide one APK that supports small and normal size screens and another
|
||||
APK that supports large and xlarge screens.</p>
|
||||
|
||||
@@ -230,7 +230,7 @@ Screens</a> so that your application is flexible and can adapt to all screen con
|
||||
with a single APK.</p>
|
||||
<p class="caution"><strong>Caution:</strong> By default, all screen size attributes in the <a
|
||||
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> element are "true" if you do not declare them otherwise. However,
|
||||
<supports-screens>}</a> element are "true" if you do not declare them otherwise. However,
|
||||
because the {@code android:xlargeScreens} attribute was added in Android 2.3 (API level
|
||||
9), Google Play will assume that it is "false" if your application does not set either <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
|
||||
@@ -239,9 +239,9 @@ href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
||||
android:targetSdkVersion}</a> to "9" or higher.</p>
|
||||
<p class="caution"><strong>Caution:</strong> You should not combine both <a
|
||||
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> and <a
|
||||
<supports-screens>}</a> and <a
|
||||
href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a> elements in your manifest file. Using both increases the chances
|
||||
<compatible-screens>}</a> elements in your manifest file. Using both increases the chances
|
||||
that you'll introduce an error due to conflicts between them. For help deciding which to use, read
|
||||
<a href="{@docRoot}guide/practices/screens-distribution.html">Distributing to Specific Screens</a>.
|
||||
If you can't avoid using both, be aware that for any conflicts in agreement between a given size,
|
||||
@@ -251,7 +251,7 @@ If you can't avoid using both, be aware that for any conflicts in agreement betw
|
||||
|
||||
<li><strong>Device feature sets</strong>
|
||||
<p>This is based on your manifest file's <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
element(s).</p>
|
||||
<p>For example, you can provide one APK for devices that support multitouch and another
|
||||
APK for devices that do not support multitouch. See
|
||||
@@ -262,7 +262,7 @@ Reference</a> for a list of features supported by the platform.</p>
|
||||
|
||||
<li><strong>API level</strong>
|
||||
<p>This is based on your manifest file's <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element.
|
||||
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element.
|
||||
You
|
||||
can use both the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
|
||||
android:minSdkVersion}</a> and <a
|
||||
@@ -312,7 +312,7 @@ publish multiple APKs if the above listed filters are the same for each APK (but
|
||||
based on other characteristics in the manifest or APK). For
|
||||
example, you cannot provide different APKs that differ purely on the <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-configuration-element.html">{@code
|
||||
<uses-configuration>}</a> characteristics.</p>
|
||||
<uses-configuration>}</a> characteristics.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -141,9 +141,9 @@ href="{@docRoot}guide/topics/ui/index.html">User Interface</a> documentation.</p
|
||||
|
||||
<p>You must declare your activity in the manifest file in order for it to
|
||||
be accessible to the system. To declare your activity, open your manifest file and add an <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
|
||||
as a child of the <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
element. For example:</p>
|
||||
|
||||
<pre>
|
||||
@@ -166,16 +166,16 @@ href="http://android-developers.blogspot.com/2011/06/things-that-cannot-change.h
|
||||
That Cannot Change</a>).</p>
|
||||
|
||||
<p>See the <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
|
||||
reference for more information about declaring your activity in the manifest.</p>
|
||||
|
||||
|
||||
<h4>Using intent filters</h4>
|
||||
|
||||
<p>An <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
|
||||
<activity>}</a> element can also specify various intent filters—using the <a
|
||||
<activity>}</a> element can also specify various intent filters—using the <a
|
||||
href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a> element—in order to declare how other application components may
|
||||
<intent-filter>}</a> element—in order to declare how other application components may
|
||||
activate it.</p>
|
||||
|
||||
<p>When you create a new application using the Android SDK tools, the stub activity
|
||||
@@ -193,9 +193,9 @@ looks like this:</p>
|
||||
</pre>
|
||||
|
||||
<p>The <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a> element specifies that this is the "main" entry point to the application. The <a
|
||||
<action>}</a> element specifies that this is the "main" entry point to the application. The <a
|
||||
href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> element specifies that this activity should be listed in the
|
||||
<category>}</a> element specifies that this activity should be listed in the
|
||||
system's application launcher (to allow users to launch this activity).</p>
|
||||
|
||||
<p>If you intend for your application to be self-contained and not allow other applications to
|
||||
@@ -208,13 +208,13 @@ start them yourself using explicit intents (as discussed in the following sectio
|
||||
other applications (and your own), then you must define additional intent filters for your
|
||||
activity. For each type of intent to which you want to respond, you must include an <a
|
||||
href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a> that includes an
|
||||
<intent-filter>}</a> that includes an
|
||||
<a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a> element and, optionally, a <a
|
||||
<action>}</a> element and, optionally, a <a
|
||||
href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> element and/or a <a
|
||||
<category>}</a> element and/or a <a
|
||||
href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> element. These elements specify the type of intent to which your activity can
|
||||
<data>}</a> element. These elements specify the type of intent to which your activity can
|
||||
respond.</p>
|
||||
|
||||
<p>For more information about how your activities can respond to intents, see the <a
|
||||
|
||||
@@ -140,7 +140,7 @@ java.util.List} interface.</p>
|
||||
<p>All elements in the {@link java.util.Map} must be one of the supported data types in this
|
||||
list or one of the other AIDL-generated interfaces or parcelables you've declared. Generic maps,
|
||||
(such as those of the form
|
||||
{@code Map<String,Integer>} are not supported. The actual concrete class that the other side
|
||||
{@code Map<String,Integer>} are not supported. The actual concrete class that the other side
|
||||
receives is always a {@link java.util.HashMap}, although the method is generated to
|
||||
use the {@link java.util.Map} interface.</p>
|
||||
</li>
|
||||
|
||||
@@ -68,7 +68,7 @@ by pressing the <em>Back</em> button.</p>
|
||||
android.view.ViewGroup} inside the activity's view hierarchy and the fragment defines its own view
|
||||
layout.
|
||||
You can insert a fragment into your activity layout by declaring the fragment in the activity's
|
||||
layout file, as a {@code <fragment>} element, or from your application code by adding it to an
|
||||
layout file, as a {@code <fragment>} element, or from your application code by adding it to an
|
||||
existing {@link android.view.ViewGroup}. However, a fragment is not required to be a part of the
|
||||
activity layout; you may also use a fragment without its own UI as an invisible worker for the
|
||||
activity.</p>
|
||||
@@ -290,13 +290,13 @@ file for an activity with two fragments:</p>
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
</pre>
|
||||
<p>The {@code android:name} attribute in the {@code <fragment>} specifies the {@link
|
||||
<p>The {@code android:name} attribute in the {@code <fragment>} specifies the {@link
|
||||
android.app.Fragment} class to instantiate in the layout.</p>
|
||||
|
||||
<p>When the system creates this activity layout, it instantiates each fragment specified in the
|
||||
layout and calls the {@link android.app.Fragment#onCreateView onCreateView()} method for each one,
|
||||
to retrieve each fragment's layout. The system inserts the {@link android.view.View} returned by the
|
||||
fragment directly in place of the {@code <fragment>} element.</p>
|
||||
fragment directly in place of the {@code <fragment>} element.</p>
|
||||
|
||||
<div class="note">
|
||||
<p><strong>Note:</strong> Each fragment requires a unique identifier that
|
||||
|
||||
@@ -348,7 +348,7 @@ the device.</p>
|
||||
intent filters that declare the capabilities of the activity so it can respond to intents
|
||||
from other apps. You can declare an intent filter for your component by
|
||||
adding an <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
|
||||
<intent-filter>}</a> element as a child of the component's declaration element.</p>
|
||||
<intent-filter>}</a> element as a child of the component's declaration element.</p>
|
||||
|
||||
<p>For example, if you've built an email app with an activity for composing a new email, you can
|
||||
declare an intent filter to respond to "send" intents (in order to send a new email) like this:</p>
|
||||
|
||||
@@ -881,7 +881,7 @@ action and specify the contact with a {@code content:} URI as the intent data.</
|
||||
<dd>{@link android.content.Intent#ACTION_VIEW}</dd>
|
||||
|
||||
<dt><b>Data URI Scheme</b></dt>
|
||||
<dd>{@code content:<URI>}</dd>
|
||||
<dd>{@code content:<URI>}</dd>
|
||||
|
||||
<dt><b>MIME Type</b></dt>
|
||||
<dd>None. The type is inferred from contact URI.
|
||||
@@ -922,7 +922,7 @@ constants in {@link android.provider.ContactsContract.Intents.Insert}.</p>
|
||||
<dd>{@link android.content.Intent#ACTION_EDIT}</dd>
|
||||
|
||||
<dt><b>Data URI Scheme</b></dt>
|
||||
<dd>{@code content:<URI>}</dd>
|
||||
<dd>{@code content:<URI>}</dd>
|
||||
|
||||
<dt><b>MIME Type</b></dt>
|
||||
<dd>The type is inferred from contact URI.
|
||||
@@ -1497,9 +1497,9 @@ specify the URI location of the file in the intent data.</p>
|
||||
<dt><b>Data URI Scheme</b></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt>{@code file:<em><URI></em>}
|
||||
<dt>{@code content:<em><URI></em>}
|
||||
<dt>{@code http:<em><URL></em>}
|
||||
<dt><code>file:<em><URI></em></code>
|
||||
<dt><code>content:<em><URI></em></code>
|
||||
<dt><code>http:<em><URL></em></code>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
@@ -1830,8 +1830,8 @@ begins the phone call; the user does not need to press the <em>Call</em> button.
|
||||
<dt><b>Data URI Scheme</b></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>{@code tel:<phone-number>}</li>
|
||||
<li>{@code voicemail:<phone-number>}</li>
|
||||
<li>{@code tel:<phone-number>}</li>
|
||||
<li>{@code voicemail:<phone-number>}</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
@@ -2042,10 +2042,10 @@ details such as the phone number, subject, and message body using the extra keys
|
||||
<dt><b>Data URI Scheme</b></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt>{@code sms:<em><phone_number></em>}
|
||||
<dt>{@code smsto:<em><phone_number></em>}
|
||||
<dt>{@code mms:<em><phone_number></em>}
|
||||
<dt>{@code mmsto:<em><phone_number></em>}
|
||||
<dt><code>sms:<em><phone_number></em></code>
|
||||
<dt><code>smsto:<em><phone_number></em></code>
|
||||
<dt><code>mms:<em><phone_number></em></code>
|
||||
<dt><code>mmsto:<em><phone_number></em></code>
|
||||
</dl>
|
||||
<p>Each of these schemes are handled the same.
|
||||
</dd>
|
||||
@@ -2158,8 +2158,8 @@ and specify the web URL in the intent data.</p>
|
||||
<dd>{@link android.content.Intent#ACTION_VIEW}<dd>
|
||||
|
||||
<dt><b>Data URI Scheme</b></dt>
|
||||
<dd>{@code http:<em><URL></em>}<br/>
|
||||
{@code https:<em><URL></em>}</dd>
|
||||
<dd><code>http:<em><URL></em></code><br/>
|
||||
<code>https:<em><URL></em></code></dd>
|
||||
|
||||
<dt><b>MIME Type</b></dt>
|
||||
<dd>
|
||||
|
||||
@@ -455,7 +455,7 @@ dialog title.</p>
|
||||
|
||||
<p>To advertise which implicit intents your app can receive, declare one or more intent filters for
|
||||
each of your app components with an <a href=
|
||||
"{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
"{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
element in your <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">manifest file</a>.
|
||||
Each intent filter specifies the type of intents it accepts based on the intent's action,
|
||||
data, and category. The system will deliver an implicit intent to your app component only if the
|
||||
@@ -471,23 +471,23 @@ it inspects the {@link android.content.Intent} and decides how to behave based o
|
||||
in the {@link android.content.Intent} (such as to show the editor controls or not).</p>
|
||||
|
||||
<p>Each intent filter is defined by an <a
|
||||
href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>
|
||||
element in the app's manifest file, nested in the corresponding app component (such
|
||||
as an <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
as an <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
element). Inside the <a
|
||||
href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>,
|
||||
href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code <intent-filter>}</a>,
|
||||
you can specify the type of intents to accept using one or more
|
||||
of these three elements:</p>
|
||||
|
||||
<dl>
|
||||
<dt><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a></dt>
|
||||
<dt><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a></dt>
|
||||
<dd>Declares the intent action accepted, in the {@code name} attribute. The value
|
||||
must be the literal string value of an action, not the class constant.</dd>
|
||||
<dt><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a></dt>
|
||||
<dt><a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a></dt>
|
||||
<dd>Declares the type of data accepted, using one or more attributes that specify various
|
||||
aspects of the data URI (<code>scheme</code>, <code>host</code>, <code>port</code>,
|
||||
<code>path</code>, etc.) and MIME type.</dd>
|
||||
<dt><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a></dt>
|
||||
<dt><a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a></dt>
|
||||
<dd>Declares the intent category accepted, in the {@code name} attribute. The value
|
||||
must be the literal string value of an action, not the class constant.
|
||||
|
||||
@@ -516,9 +516,9 @@ of these three elements:</p>
|
||||
</pre>
|
||||
|
||||
<p>It's okay to create a filter that includes more than one instance of
|
||||
<a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>,
|
||||
<a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>, or
|
||||
<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>.
|
||||
<a href="{@docRoot}guide/topics/manifest/action-element.html">{@code <action>}</a>,
|
||||
<a href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>, or
|
||||
<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code <category>}</a>.
|
||||
If you do, you simply need to be certain that the component can handle any and all combinations
|
||||
of those filter elements.</p>
|
||||
|
||||
@@ -607,9 +607,9 @@ opens when the user initially launches the app with the launcher icon:</p>
|
||||
indicates this is the main entry point and does not expect any intent data.</li>
|
||||
<li>The {@link android.content.Intent#CATEGORY_LAUNCHER} category indicates that this activity's
|
||||
icon should be placed in the system's app launcher. If the <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element
|
||||
does not specify an icon with {@code icon}, then the system uses the icon from the <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
element.</li>
|
||||
</ul>
|
||||
<p>These two must be paired together in order for the activity to appear in the app launcher.</p>
|
||||
@@ -715,7 +715,7 @@ in terms of how the intent filter is declared in an app's manifest file.</p>
|
||||
|
||||
<p>To specify accepted intent actions, an intent filter can declare zero or more
|
||||
<a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
|
||||
<action>}</a> elements. For example:</p>
|
||||
<action>}</a> elements. For example:</p>
|
||||
|
||||
<pre>
|
||||
<intent-filter>
|
||||
@@ -739,7 +739,7 @@ contains at least one action).</p>
|
||||
|
||||
<p>To specify accepted intent categories, an intent filter can declare zero or more
|
||||
<a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
|
||||
<category>}</a> elements. For example:</p>
|
||||
<category>}</a> elements. For example:</p>
|
||||
|
||||
<pre>
|
||||
<intent-filter>
|
||||
@@ -762,7 +762,7 @@ android.content.Context#startActivity startActivity()} and {@link
|
||||
android.app.Activity#startActivityForResult startActivityForResult()}.
|
||||
So if you want your activity to receive implicit intents, it must
|
||||
include a category for {@code "android.intent.category.DEFAULT"} in its intent filters (as
|
||||
shown in the previous {@code <intent-filter>} example.</p>
|
||||
shown in the previous {@code <intent-filter>} example.</p>
|
||||
|
||||
|
||||
|
||||
@@ -770,7 +770,7 @@ shown in the previous {@code <intent-filter>} example.</p>
|
||||
|
||||
<p>To specify accepted intent data, an intent filter can declare zero or more
|
||||
<a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
|
||||
<data>}</a> elements. For example:</p>
|
||||
<data>}</a> elements. For example:</p>
|
||||
|
||||
<pre>
|
||||
<intent-filter>
|
||||
@@ -786,7 +786,7 @@ attributes — {@code scheme}, {@code host}, {@code port},
|
||||
and {@code path} — for each part of the URI:
|
||||
</p>
|
||||
|
||||
<p style="margin-left: 2em">{@code <scheme>://<host>:<port>/<path>}</p>
|
||||
<p style="margin-left: 2em">{@code <scheme>://<host>:<port>/<path>}</p>
|
||||
|
||||
<p>
|
||||
For example:
|
||||
@@ -799,7 +799,7 @@ the port is {@code 200}, and the path is {@code folder/subfolder/etc}.
|
||||
</p>
|
||||
|
||||
<p>Each of these attributes is optional in a <a
|
||||
href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> element,
|
||||
href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> element,
|
||||
but there are linear dependencies:</p>
|
||||
<ul>
|
||||
<li>If a scheme is not specified, the host is ignored.</li>
|
||||
@@ -851,7 +851,7 @@ that components are able to get local data from a file or content provider.
|
||||
Therefore, their filters can list just a data type and do not need to explicitly
|
||||
name the {@code content:} and {@code file:} schemes.
|
||||
This is a typical case. A <a
|
||||
href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> element
|
||||
href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a> element
|
||||
like the following, for example, tells Android that the component can get image data from a content
|
||||
provider and display it:
|
||||
</p>
|
||||
@@ -870,7 +870,7 @@ specify a data type but not a URI are perhaps the most common.
|
||||
<p>
|
||||
Another common configuration is filters with a scheme and a data type. For
|
||||
example, a <a
|
||||
href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/data-element.html">{@code <data>}</a>
|
||||
element like the following tells Android that
|
||||
the component can retrieve video data from the network in order to perform the action:
|
||||
</p>
|
||||
|
||||
@@ -45,10 +45,10 @@ component belongs to, you can do so in the manifest file.</p>
|
||||
|
||||
<p>The manifest entry for each type of component element—<a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
|
||||
<activity>}</a>, <a href="{@docRoot}guide/topics/manifest/service-element.html">{@code
|
||||
<service>}</a>, <a href="{@docRoot}guide/topics/manifest/receiver-element.html">{@code
|
||||
<receiver>}</a>, and <a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code
|
||||
<provider>}</a>—supports an {@code android:process} attribute that can specify a
|
||||
<activity>}</a>, <a href="{@docRoot}guide/topics/manifest/service-element.html">{@code
|
||||
<service>}</a>, <a href="{@docRoot}guide/topics/manifest/receiver-element.html">{@code
|
||||
<receiver>}</a>, and <a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code
|
||||
<provider>}</a>—supports an {@code android:process} attribute that can specify a
|
||||
process in which that component should run. You can set this attribute so that each component runs
|
||||
in its own process or so that some components share a process while others do not. You can also set
|
||||
{@code android:process} so that components of different applications run in the same
|
||||
@@ -56,7 +56,7 @@ process—provided that the applications share the same Linux user ID and ar
|
||||
same certificates.</p>
|
||||
|
||||
<p>The <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code
|
||||
<application>}</a> element also supports an {@code android:process} attribute, to set a
|
||||
<application>}</a> element also supports an {@code android:process} attribute, to set a
|
||||
default value that applies to all components.</p>
|
||||
|
||||
<p>Android might decide to shut down a process at some point, when memory is low and required by
|
||||
|
||||
@@ -189,9 +189,9 @@ it from other application components.</p>
|
||||
manifest file.</p>
|
||||
|
||||
<p>To declare your service, add a <a
|
||||
href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
|
||||
href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
|
||||
as a child of the <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
element. For example:</p>
|
||||
|
||||
<pre>
|
||||
@@ -205,11 +205,11 @@ element. For example:</p>
|
||||
</pre>
|
||||
|
||||
<p>See the <a
|
||||
href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
|
||||
href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
|
||||
reference for more information about declaring your service in the manifest.</p>
|
||||
|
||||
<p>There are other attributes you can include in the <a
|
||||
href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element to
|
||||
href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element to
|
||||
define properties such as permissions required to start the service and the process in
|
||||
which the service should run. The <a
|
||||
href="{@docRoot}guide/topics/manifest/service-element.html#nm">{@code android:name}</a>
|
||||
|
||||
@@ -30,7 +30,7 @@ parent.link=activities.html
|
||||
<li><a href="{@docRoot}design/patterns/navigation.html">Android Design:
|
||||
Navigation</a></li>
|
||||
<li><a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>} manifest
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>} manifest
|
||||
element</a></li>
|
||||
<li><a href="{@docRoot}guide/components/recents.html">Overview Screen</a></li>
|
||||
</ol>
|
||||
@@ -221,12 +221,12 @@ instance on top of the back stack); or, you want your back stack to be cleared o
|
||||
activities except for the root activity when the user leaves the task.</p>
|
||||
|
||||
<p>You can do these things and more, with attributes in the
|
||||
<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
manifest element and with flags in the intent that you pass to
|
||||
{@link android.app.Activity#startActivity startActivity()}.</p>
|
||||
|
||||
<p>In this regard, the principal <a href="{@docRoot}guide/topics/manifest/activity-element.html">
|
||||
{@code <activity>}</a> attributes you can use are:</p>
|
||||
{@code <activity>}</a> attributes you can use are:</p>
|
||||
|
||||
<ul class="nolist">
|
||||
<li><a href="{@docRoot}guide/topics/manifest/activity-element.html#aff">
|
||||
@@ -295,7 +295,7 @@ for an intent cannot be defined in the manifest.</p>
|
||||
|
||||
<p>When declaring an activity in your manifest file, you can specify how the activity should
|
||||
associate with a task using the <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
element's <a href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">{@code
|
||||
launchMode}</a> attribute.</p>
|
||||
|
||||
@@ -351,7 +351,7 @@ any activities started by this one open in a separate task.</dd>
|
||||
|
||||
<p>As another example, the Android Browser application declares that the web browser activity should
|
||||
always open in its own task—by specifying the {@code singleTask} launch mode in the <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a> element.
|
||||
This means that if your application issues an
|
||||
intent to open the Android Browser, its activity is <em>not</em> placed in the same
|
||||
task as your application. Instead, either a new task starts for the Browser or, if the Browser
|
||||
@@ -440,14 +440,14 @@ assigned different task affinities.</p>
|
||||
|
||||
<p>You can modify the affinity for any given activity with the <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html#aff">{@code taskAffinity}</a> attribute
|
||||
of the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
of the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
element.</p>
|
||||
|
||||
<p>The <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html#aff">{@code taskAffinity}</a>
|
||||
attribute takes a string value, which must be unique from the default package name
|
||||
declared in the <a href="{@docRoot}guide/topics/manifest/manifest-element.html">
|
||||
{@code <manifest>}
|
||||
{@code <manifest>}
|
||||
</a> element, because the system uses that name to identify the default task
|
||||
affinity for the application.</p>
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ is {@link android.content.pm.PackageManager#FEATURE_APP_WIDGETS}.</p>
|
||||
|
||||
<p>If necessary, you can prevent users from installing your app when their devices don't provide a
|
||||
given feature by declaring it with a <a href=
|
||||
"{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
"{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
element in your app's <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">manifest
|
||||
file</a>.</p>
|
||||
|
||||
@@ -169,7 +169,7 @@ android.content.pm.PackageManager#FEATURE_BLUETOOTH} device feature. You can dis
|
||||
on this feature and make your app available to devices without Bluetooth by setting the <a href=
|
||||
"{@docRoot}guide/topics/manifest/uses-feature-element.html#required">{@code required}</a> attribute
|
||||
to {@code "false"} in the <a href=
|
||||
"{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag.
|
||||
"{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag.
|
||||
For more information about implicitly required device features, read <a href=
|
||||
"{@docRoot}guide/topics/manifest/uses-feature-element.html#permissions">Permissions that Imply
|
||||
Feature Requirements</a>.</p>
|
||||
@@ -191,7 +191,7 @@ Android 1.0 is API level 1 and Android 4.4 is API level 19.</p>
|
||||
|
||||
<p>The API level allows you to declare the minimum version with which your app is
|
||||
compatible, using the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
|
||||
<uses-sdk>}</a> manifest tag and its <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a> attribute.</p>
|
||||
<uses-sdk>}</a> manifest tag and its <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a> attribute.</p>
|
||||
|
||||
<p>For example, the <a href="{@docRoot}guide/topics/providers/calendar-provider.html">Calendar
|
||||
Provider</a> APIs were added in Android 4.0 (API level 14). If your app cannot function without
|
||||
|
||||
@@ -188,7 +188,7 @@ larger screens.</p>
|
||||
<li><b>Apply the new "holographic" theme to your application</b>
|
||||
<ol>
|
||||
<li>Open your manifest file and update the <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element to
|
||||
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element to
|
||||
set <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
||||
android:targetSdkVersion}</a> to {@code "11"}. For example:
|
||||
@@ -383,9 +383,9 @@ href="{@docRoot}guide/topics/graphics/prop-animation.html">Property Animation</a
|
||||
<p>Android 3.0 adds a hardware-accelerated OpenGL renderer that gives a performance boost to most 2D
|
||||
graphics operations. You can enable hardware-accelerated rendering in your application by setting
|
||||
{@code android:hardwareAccelerated="true"} in your manifest's <a
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>
|
||||
element or for individual <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
|
||||
<activity>}</a> elements. Hardware acceleration results in smoother animations, smoother
|
||||
<activity>}</a> elements. Hardware acceleration results in smoother animations, smoother
|
||||
scrolling, and overall better performance and response to user interaction. When enabled, be sure
|
||||
that you thoroughly test your application on a device that supports hardware acceleration.</p>
|
||||
|
||||
@@ -500,7 +500,7 @@ layouts</a> for smaller screens to adjust your layout. However, sometimes your l
|
||||
not fit a smaller screen or you've explicitly designed your application only for tablets and other
|
||||
large devices. In this case, you can manage the availability of your application to smaller screens
|
||||
by using the <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> manifest element.</p>
|
||||
<supports-screens>}</a> manifest element.</p>
|
||||
|
||||
<p>For example, if you want your application to be available only to extra large
|
||||
screens, you can declare the element in your manifest like this:</p>
|
||||
@@ -523,7 +523,7 @@ your application is available only to devices with an extra large screen.</p>
|
||||
|
||||
<p class="note"><strong>Note:</strong> If you use the <a
|
||||
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> element for the reverse scenario (when your application is not compatible
|
||||
<supports-screens>}</a> element for the reverse scenario (when your application is not compatible
|
||||
with <em>larger</em> screens) and set the larger screen size attributes to {@code "false"}, then
|
||||
external services such as Google Play <strong>do not</strong> apply filtering. Your application
|
||||
will still be available to larger screens, but when it runs, it will not fill the screen—the
|
||||
@@ -540,22 +540,22 @@ application can't scale up or perhaps you've decided to publish two versions of
|
||||
that each deliver different features for different screen configurations, so you don't want
|
||||
larger devices to download the version designed for smaller screens. In such a case, you can
|
||||
use the <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a> element to manage the distribution of your application based on the
|
||||
<compatible-screens>}</a> element to manage the distribution of your application based on the
|
||||
combination of screen size and density. External services such as
|
||||
Google Play uses this information to apply filtering to your application, so that only devices
|
||||
that have a screen configuration with which you declare compatibility can download your
|
||||
application.</p>
|
||||
|
||||
<p>The <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a> element must contain one or more {@code <screen>} elements,
|
||||
<compatible-screens>}</a> element must contain one or more {@code <screen>} elements,
|
||||
which each specify a screen configuration with which your application is compatible, using both
|
||||
the {@code android:screenSize} and {@code android:screenDensity} attributes. Each {@code
|
||||
<screen>} element <strong>must include both attributes</strong> to specify an individual
|
||||
<screen>} element <strong>must include both attributes</strong> to specify an individual
|
||||
screen configuration—if either attribute is missing, then the element is invalid
|
||||
(external services such as Google Play will ignore it).</p>
|
||||
|
||||
<p>For example, if your application is compatible with only small and normal screens, regardless
|
||||
of screen density, then you must specify eight different {@code <screen>} elements,
|
||||
of screen density, then you must specify eight different {@code <screen>} elements,
|
||||
because each screen size has four density configurations. You must declare each one of
|
||||
these; any combination of size and density that you do <em>not</em> specify is considered a screen
|
||||
configuration with which your application is <em>not</em> compatible. Here's what the manifest
|
||||
@@ -584,17 +584,17 @@ entry looks like if your application is compatible with only small and normal sc
|
||||
|
||||
<p class="note"><strong>Note:</strong> Although you can also use the <a
|
||||
href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a> element for the reverse scenario (when your application is not
|
||||
<compatible-screens>}</a> element for the reverse scenario (when your application is not
|
||||
compatible with smaller screens), it's easier if you instead use the <a
|
||||
href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
|
||||
<supports-screens>}</a> as discussed in the previous section, because it doesn't require you
|
||||
<supports-screens>}</a> as discussed in the previous section, because it doesn't require you
|
||||
to specify each screen density your application supports.</p>
|
||||
|
||||
<p>Remember, you should strive to make your application available to as many devices as possible by
|
||||
applying all necessary techniques for <a
|
||||
href="{@docRoot}guide/practices/screens_support.html">supporting multiple screens</a>. You should
|
||||
then use the <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html">{@code
|
||||
<compatible-screens>}</a> element to filter your application from certain devices only when you
|
||||
<compatible-screens>}</a> element to filter your application from certain devices only when you
|
||||
cannot offer compatibility on all screen configurations or you have decided to provide
|
||||
multiple versions of your application, each for a different set of screen configurations.</p>
|
||||
|
||||
@@ -650,7 +650,7 @@ href="{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime Ch
|
||||
<p>In the worst-case scenario, however, you can avoid orientation changes by using the <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code
|
||||
android:screenOrientation}</a> attribute in the <a
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity>}</a>
|
||||
element. Instead of locking the orientation in landscape or portrait, however, you should
|
||||
specify a value of {@code "nosensor"}. This way, your activity uses whatever orientation the
|
||||
device specifies as its natural orientation and the screen will not rotate. You should still
|
||||
@@ -676,7 +676,7 @@ Screen Turn Deserves Another</a>.</p>
|
||||
traditional phone calls or handle SMS. Some devices might also omit
|
||||
other hardware features, such as Bluetooth. If your application uses these features, then your
|
||||
manifest file probably already includes (or should include) a declaration of the feature with the <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
|
||||
element. Doing so prevents devices that do not declare support for the feature from downloading
|
||||
your applications. For example:</p>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user