From cd1b08e1e239269f7d0d48119505313f52d3dd5a Mon Sep 17 00:00:00 2001
From: Scott Main 2
{@link android.os.Build.VERSION_CODES#BASE_1_1}
- Android 1.0
+
diff --git a/docs/html/guide/developing/device.jd b/docs/html/guide/developing/device.jd
index 76b2516f9817..48de46652173 100644
--- a/docs/html/guide/developing/device.jd
+++ b/docs/html/guide/developing/device.jd
@@ -79,10 +79,8 @@ located in Settings > Developer options).Android 1.0
1
{@link android.os.Build.VERSION_CODES#BASE}
udev
-rules file that contains a USB configuration for each type of device
+ udev rules file that contains a USB configuration for each type of device
you want to use for development. In the rules file, each device manufacturer
is identified by a unique vendor ID, as specified by the
ATTR{idVendor} property. For a list of vendor IDs, see -help-disk-images.
-shell and specify the QEMU character
device to use for communication with the shell.Here are some examples:
@@ -619,7 +619,7 @@ scale in direct relationship with <delay> values.<device> must be QEMU-specific
serial device specification. See the documentation for 'serial -dev' at
- http://www.bellard.org/qemu/qemu-doc.html#SEC10.
+ http://wiki.qemu.org/download/qemu-doc.html.
<device> must be QEMU-specific
serial device specification. See the documentation for 'serial -dev' at
-http://www.bellard.org/qemu/qemu-doc.html#SEC10.
+http://wiki.qemu.org/download/qemu-doc.html.
Use of world writable or world readable files for IPC is discouraged because it does not provide +href="{@docRoot}reference/android/content/Context.html#MODE_WORLD_READABLE">world +readable files for IPC is discouraged because it does not provide the ability to limit data access to particular applications, nor does it provide any control on data format. As an alternative, you might consider using a ContentProvider which provides read and write permissions, and can make @@ -199,10 +199,10 @@ ContentProvider.
ContentProviders can also provide more granular access by declaring the
grantUriPermissions element and using the FLAG_GRANT_READ_URI_PERMISSION and FLAG_GRANT_WRITE_URI_PERMISSION flags in the Intent object
+href="{@docRoot}reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION">FLAG_GRANT_READ_URI_PERMISSION
+and FLAG_GRANT_WRITE_URI_PERMISSION
+flags in the Intent object
that activates the component. The scope of these permissions can be further
limited by the
@@ -211,14 +211,9 @@ grant-uri-permission element.
When accessing a
ContentProvider, use parameterized query methods such as
-query(), update(), and delete() to avoid
+query(), update(), and delete() to avoid
potential SQL
Injection from untrusted data. Note that using parameterized methods is not
sufficient if the selection is built by concatenating user data
@@ -249,8 +244,9 @@ href="{@docRoot}reference/android/R.styleable.html#AndroidManifestActivity">
Activities, and
Services are all declared in the application manifest. If your IPC mechanism is
-not intended for use by other applications, set the android:exported property
-to false. This is useful for applications that consist of multiple processes
+not intended for use by other applications, set the {@code android:exported}
+property to false. This is useful for applications that consist of multiple processes
within the same UID, or if you decide late in development that you do not
actually want to expose functionality as IPC but you don’t want to rewrite
the code.
Intents are the preferred mechanism for asynchronous IPC in Android.
Depending on your application requirements, you might use sendBroadcast(), sendOrderedBroadcast(), or
-direct an intent to a specific application component.
sendOrderedBroadcast(),
+or direct an intent to a specific application component.
Note that ordered broadcasts can be “consumed” by a recipient, so they may not be delivered to all applications. If you are sending an Intent where @@ -311,14 +306,13 @@ and/or access controls on a specific binder interface, those controls must be explicitly added as code in the interface.
If providing an interface that does require access controls, use By default, receivers are exported and can be invoked by any other
application. If your checkCallingPermission() to verify whether the
+href="{@docRoot}reference/android/content/Context.html#checkCallingPermission(java.lang.String)">checkCallingPermission()
+to verify whether the
caller of the Binder has a required permission. This is especially important
before accessing a Service on behalf of the caller, as the identify of your
application is passed to other interfaces. If invoking an interface provided
by a Service, the bindService()
+href="{@docRoot}reference/android/content/Context.html#bindService(android.content.Intent,%20android.content.ServiceConnection,%20int)">bindService()
invocation may fail if you do not have permission to access the given Service.
If calling an interface provided locally by your own application, it may be
useful to use the
+href="{@docRoot}reference/android/content/BroadcastReceiver.html">
BroadcastReceivers is intended for use by other applications, you
may want to apply security permissions to receivers using the
+href="{@docRoot}guide/topics/manifest/receiver-element.html">
<receiver> element within the application manifest. This will
prevent applications without appropriate permissions from sending an intent to
the
+href="{@docRoot}reference/android/content/BroadcastReceiver.html">
BroadcastReceivers.Using Services
@@ -349,19 +343,21 @@ use. Each service class must have a corresponding
By default, Services are exported and can be invoked by any other
-application. Services can be protected using the android:permission attribute
+application. Services can be protected using the {@code android:permission}
+attribute
within the manifest’s
+href="{@docRoot}guide/topics/manifest/service-element.html">
<service> tag. By doing so, other applications will need to declare
a corresponding <uses-permission> element in their own manifest to be
+href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><uses-permission>
+ element in their own manifest to be
able to start, stop, or bind to the service.
A Service can protect individual IPC calls into it with permissions, by
calling checkCallingPermission()before executing
+href="{@docRoot}reference/android/content/Context.html#checkCallingPermission(java.lang.String)">checkCallingPermission()
+before executing
the implementation of that call. We generally recommend using the
declarative permissions in the manifest, since those are less prone to
oversight.
If you do expose an Activity for purposes of IPC, the android:permission attribute in the
+href="{@docRoot}guide/topics/manifest/activity-element.html#prmsn">android:permission
+attribute in the
<activity> declaration in the application manifest can be used to
restrict access to only those applications which have the stated
permissions.
Generally, you should strive to create as few permissions as possible while satisfying your security requirements. Creating a new permission is relatively uncommon for most applications, since -system-defined permissions cover many situations. Where appropriate, +href="{@docRoot}reference/android/Manifest.permission.html">system-defined +permissions cover many situations. Where appropriate, perform access checks using existing permissions.
If you must create a new permission, consider whether you can accomplish @@ -560,17 +556,14 @@ href="{@docRoot}reference/android/webkit/WebView.html">WebView does not execute JavaScript so cross-site-scripting is not possible.
Use addJavaScriptInterface() with
+href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface() with
particular care because it allows JavaScript to invoke operations that are
normally reserved for Android applications. Only expose addJavaScriptInterface() to
+href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface() to
sources from which all input is trustworthy. If untrusted input is allowed,
untrusted JavaScript may be able to invoke Android methods. In general, we
recommend only exposing addJavaScriptInterface() to
+href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface() to
JavaScript that is contained within your application APK.
Do not trust information downloaded over HTTP, use HTTPS instead. Even if
@@ -578,13 +571,11 @@ you are connecting only to a single website that you trust or control, HTTP is
subject to MiTM attacks
and interception of data. Sensitive capabilities using addJavaScriptInterface() should
+href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface() should
not ever be exposed to unverified script downloaded over HTTP. Note that even
with the use of HTTPS,
addJavaScriptInterface()
+href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()
increases the attack surface of your application to include the server
infrastructure and all CAs trusted by the Android-powered device.
If a GUID is required, create a large, unique number and store it. Do not use phone identifiers such as the phone number or IMEI which may be associated with personal information. This topic is discussed in more detail in the Android Developer Blog.
+href="http://android-developers.blogspot.com/2011/03/identifying-app-installations.html">Android Developer Blog.Application developers should be careful writing to on-device logs. In Android, logs are a shared resource, and are available @@ -724,9 +714,8 @@ credentials to the wrong application.
If credentials are to be used only by applications that you create, then you
can verify the application which accesses the
-AccountManager using checkSignature().
+AccountManager using checkSignature().
Alternatively, if only one application will use the credential, you might use a
KeyStore for
@@ -756,15 +745,15 @@ RSA provided in the Cipher class.
Use a secure random number generator (
-
+
SecureRandom) to initialize any cryptographic keys (
+href="{@docRoot}reference/javax/crypto/KeyGenerator.html">
KeyGenerator). Use of a key that is not generated with a secure random
number generator significantly weakens the strength of the algorithm, and may
allow offline attacks.
If you need to store a key for repeated use, use a mechanism like KeyStore that
+href="{@docRoot}reference/java/security/KeyStore.html">KeyStore that
provides a mechanism for long term storage and retrieval of cryptographic
keys.
You may also have to obtain other release keys if your application accesses a service or uses a
third-party library that requires you to use a key that is based on your private key. For example,
if your application uses the MapView class, which is part of the MapView
+class, which is part of the Google Maps external
library, you will need to register your application with the Google Maps service and obtain
a Maps API key. For information about getting a Maps API key, see
See also
diff --git a/docs/html/guide/topics/appwidgets/index.jd b/docs/html/guide/topics/appwidgets/index.jd
index 7b869a09b9fe..ba7b67c9770f 100644
--- a/docs/html/guide/topics/appwidgets/index.jd
+++ b/docs/html/guide/topics/appwidgets/index.jd
@@ -518,15 +518,12 @@ method. From within the Service, you can perform your own updates
to the App Widget without worrying about the AppWidgetProvider closing down due
to an Application
Not Responding (ANR) error. See the Wiktionary sample's
-AppWidgetProvider for an example of an App Widget running a {@link
+href="http://code.google.com/p/wiktionary-android/source/browse/trunk/Wiktionary/src/com/example/android/wiktionary/WordWidget.java">Wiktionary sample's AppWidgetProvider for an example of an App Widget running a {@link
android.app.Service}.
Also see the -ExampleAppWidgetProvider.java sample class.
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetProvider.html">ExampleAppWidgetProvider.java +sample class.See the -ExampleAppWidgetConfigure.java sample class in ApiDemos for an example.
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.html">ExampleAppWidgetConfigure.java +sample class in ApiDemos for an example.The default value of this attribute is {@code false}.
taskAffinity
diff --git a/docs/html/guide/topics/media/mediaplayer.jd b/docs/html/guide/topics/media/mediaplayer.jd
index b3ca7dd4c7bb..002d113ea31a 100644
--- a/docs/html/guide/topics/media/mediaplayer.jd
+++ b/docs/html/guide/topics/media/mediaplayer.jd
@@ -251,7 +251,7 @@ href="{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime Ch
"background media" even when the user leaves your activity, much in the same
way that the built-in Music application behaves. In this case, what you need is
a {@link android.media.MediaPlayer MediaPlayer} controlled by a {@link android.app.Service}, as
-discussed in Using a Service with MediaPlayer.
+discussed in Using a Service with MediaPlayer.
The following sample shows how a simple activity calls {@link
android.nfc.NfcAdapter.CreateNdefMessageCallback} in the onCreate() method of an
-activity (see for the
-complete sample). This example also has methods to help you create a MIME record:
package com.example.android.beam;
diff --git a/docs/html/guide/topics/renderscript/index.jd b/docs/html/guide/topics/renderscript/index.jd
index 148705cfbca1..63f341adbf22 100644
--- a/docs/html/guide/topics/renderscript/index.jd
+++ b/docs/html/guide/topics/renderscript/index.jd
@@ -376,7 +376,7 @@ describes how these classes are generated through reflection.
you call the constructor for the {@link android.renderscript.Script.FieldBase} class and specify
the amount of structures that you want to allocate memory for. To allocate memory for a primitive
type pointer, you must build an allocation manually, using the memory management classes
- described in Table 1. The example below allocates memory for both
+ described in Table 1. The example below allocates memory for both
the intPointer and touchPoints pointer and binds it to the
RenderScript:
diff --git a/docs/html/guide/topics/resources/animation-resource.jd b/docs/html/guide/topics/resources/animation-resource.jd
index eaa698fc45a7..6473155f33fd 100644
--- a/docs/html/guide/topics/resources/animation-resource.jd
+++ b/docs/html/guide/topics/resources/animation-resource.jd
@@ -335,7 +335,7 @@ set.start();
Adding this value requires that you set your build target to Android 4.0 or higher in order to compile. Older versions of Android ignore the {@code "collapseActionView"} value because they don't understand it. Just be sure not to use other APIs in your source code that are not supported in the -version declared by your {@code +version declared by your {@code minSdkVersion}, unless you add the appropriate version check at runtime.
@@ -843,8 +843,8 @@ you do not need to handle click events from the {@link android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} callback method.For a sample using the share action provider, see
-ActionBarActionProviderActivity.
+ActionBarShareActionProviderActivity.
diff --git a/docs/html/guide/topics/usb/accessory.jd b/docs/html/guide/topics/usb/accessory.jd
index b0f488170c06..8b74bc0d6429 100644
--- a/docs/html/guide/topics/usb/accessory.jd
+++ b/docs/html/guide/topics/usb/accessory.jd
@@ -169,8 +169,9 @@ UsbAccessory accessory = (UsbAccessory) intent.getParcelableExtra(UsbManager.EXT
include a <uses-feature> element that declares that your application uses
the android.hardware.usb.accessory feature.
-
<uses-library> element specifying
+ <uses-library> element specifying
com.android.future.usb.accessory for the library.Here are the basic steps for working with a profile:
T-Mobile G1 Compatibility
This version of the SDK has been tested for compatibility with the first -Android-powered mobile device, the T-Mobile -G1.
+Android-powered mobile device, the T-Mobile +G1.MapView API Key
diff --git a/docs/html/sdk/android-1.1.jd b/docs/html/sdk/android-1.1.jd index 8123fa8dad0e..b61f18615c75 100644 --- a/docs/html/sdk/android-1.1.jd +++ b/docs/html/sdk/android-1.1.jd @@ -106,7 +106,7 @@ data, a Maps API Key is required.The Android 1.1 system image was tested for compatability with the Android-powered devices listed below:
For more information, read the Copy and Paste documentation. You can also see a simple implementation of copy and paste in the API Demos and a more complete implementation in the API Demos +and a more complete implementation in the Note Pad application.
@@ -386,7 +386,7 @@ loader for your activity or fragment.For more information, read the Loaders documentation. You can also see example code using loaders in the FragmentListCursorLoader +href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LoaderCursor.html">LoaderCursor and LoaderThrottle samples.
diff --git a/docs/html/sdk/android-3.1.jd b/docs/html/sdk/android-3.1.jd index 0d2d7f8636be..78f265d2f055 100644 --- a/docs/html/sdk/android-3.1.jd +++ b/docs/html/sdk/android-3.1.jd @@ -422,10 +422,9 @@ onGenericMotionEvent()} there instead.To look at a sample application that uses joystick motion events, see GameControllerInput and GameView.
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/GameControllerInput.html">GameControllerInput +and GameView.For an example using the {@link android.widget.ShareActionProvider}, see the ActionBarActionProviderActivity class in ApiDemos.
+For an example using the {@link android.widget.ShareActionProvider}, see ActionBarShareActionProviderActivity in ApiDemos.