diff --git a/docs/html/community/index.jd b/docs/html/community/index.jd index 2df4c01d946ba..ad3a199aa9985 100644 --- a/docs/html/community/index.jd +++ b/docs/html/community/index.jd @@ -77,7 +77,7 @@ phrasing your questions, read android-security-discuss -
  • Subscribe via email: android-secuirty-discuss@googlegroups.com +
  • Subscribe via email: android-security-discuss@googlegroups.com
  • diff --git a/docs/html/guide/appendix/faq/framework.jd b/docs/html/guide/appendix/faq/framework.jd index 76a19c56d19d8..33b69acf21502 100644 --- a/docs/html/guide/appendix/faq/framework.jd +++ b/docs/html/guide/appendix/faq/framework.jd @@ -12,7 +12,7 @@ parent.link=index.html from one Activity/Service to another?
  • How can I check if an Activity is already running before starting it?
  • -
  • If an Activity starts a remote service,is +
  • If an Activity starts a remote service, is there any way for the Service to pass a message back to the Activity?
  • How to avoid getting the Application not responding dialog?
  • @@ -20,7 +20,6 @@ parent.link=index.html added or removed? - @@ -32,7 +31,7 @@ default. If needed, you can declare an android:process attribute in your manifest file, to explicitly place a component (Activity/Service) in another process.

    - + @@ -47,7 +46,7 @@ separate pool of transaction threads in each process to dispatch all incoming IPC calls. The developer should create separate threads for any long-running code, to avoid blocking the main UI thread.

    - + @@ -128,7 +127,7 @@ the Data Storage for further details on how to use these components.

    - + @@ -140,7 +139,7 @@ or to bring the activity stack to the front if is already running in the background— is the to use the NEW_TASK_LAUNCH flag in the startActivity() call.

    - + @@ -156,7 +155,7 @@ messages.

    The sample code for remote service callbacks is given in ApiDemos/RemoteService

    - + @@ -166,7 +165,7 @@ href="{@docRoot}guide/samples/ApiDemos/src/com/example/android/apis/app/RemoteSe document.

    - + @@ -194,5 +193,5 @@ removed.

    - + diff --git a/docs/html/guide/appendix/faq/troubleshooting.jd b/docs/html/guide/appendix/faq/troubleshooting.jd index 7c703e6d07f34..0cf1ab006d1e9 100644 --- a/docs/html/guide/appendix/faq/troubleshooting.jd +++ b/docs/html/guide/appendix/faq/troubleshooting.jd @@ -23,7 +23,6 @@ parent.link=index.html
  • When I go to preferences in Eclipse and select "Android", I get the following error message: Unsupported major.minor version 49.0.
  • I can't install ApiDemos apps in my IDE because of a signing error
  • I can't compile my app because the build tools generated an expired debug certificate
  • -
  • I can't run a JUnit test class in Eclipse/ADT
  • ADT Installation Error: "requires plug-in org.eclipse.wst.sse.ui".

    @@ -245,8 +244,8 @@ documentation.

    1. First, delete the debug keystore/key already generated by the Android build tools. Specifically, delete the debug.keystore file. On Linux/Mac OSX, the file is stored in ~/.android. On Windows XP, the file is stored in -C:\Documents and Settings\<user>\Local Settings\Application Data\Android. On Windows Vista, the file is stored in -C:\Users\<user>\AppData\Local\Android
    2. +C:\Documents and Settings\<user>\.android. On Windows Vista, the file is stored in +C:\Users\<user>\.android
    3. Next, you can either
  • Managing AVDs
    1. Moving an AVD
    2. -
    3. Deleting an AVD
    4. +
    5. Updating an AVD
    6. Deleting an AVD
  • @@ -35,7 +34,8 @@ page.title=Android Virtual Devices

    See Also

      -
    1. Android Emulator
    2. +
    3. Android + Emulator
    @@ -366,6 +366,10 @@ the -p option to place the AVD directory in another location. The AVD's .ini file remains in the .android directory on the network drive, regardless of the location of the AVD directory.

    +

    Managing AVDs

    + +

    The sections below provide more information about how to manage AVDs once you've created them.

    +

    Moving an AVD

    If you want to move or rename an AVD, you can do so using this command:

    @@ -455,7 +459,7 @@ files. -s <name> or
    - -s <dimensions> + -s <width>-<height> The skin to use for this AVD, identified by name or dimensions. The android tool scans for a matching skin by name or dimension in the skins/ directory of the target referenced in the -t diff --git a/docs/html/guide/topics/media/index.jd b/docs/html/guide/topics/media/index.jd index 4541024111b9e..fd7d2da021d84 100644 --- a/docs/html/guide/topics/media/index.jd +++ b/docs/html/guide/topics/media/index.jd @@ -9,7 +9,7 @@ page.title=Audio and Video
  • Audio playback and record
  • Video playback
  • Handles data from raw resources, files, streams
  • -
  • Built-in codecs for a variety of media. See Android 1.0 Media Formats
  • +
  • Built-in codecs for a variety of media. See Android Supported Media Formats
  • Key classes

    diff --git a/docs/html/guide/topics/media/media.jd b/docs/html/guide/topics/media/media.jd deleted file mode 100644 index 463686d367aeb..0000000000000 --- a/docs/html/guide/topics/media/media.jd +++ /dev/null @@ -1,172 +0,0 @@ -page.title=Media Capabilities -@jd:body - - - -

    The Android platform offers built-in encoding/decoding for a variety of common media types, -so that you can easily integrate audio, video, and images into your applications. Accessing the platform's media -capabilities is fairly straightforward &mdash you do so using the same intents and -activities mechanism that the rest of Android uses.

    - -

    Android lets you play audio and video from several types of data sources. You can play audio or video from media files stored in the application's resources (raw resources), from standalone files in the filesystem, or from a data stream arriving over a network connection. To play audio or video from your application, use the {@link android.media.MediaPlayer} class.

    - -

    The platform also lets you record audio, where supported by the mobile device hardware. Recording of video is not currently supported, but is planned for a future release. To record audio, use the -{@link android.media.MediaRecorder} class. Note that the emulator doesn't have hardware to capture audio, but actual mobile devices are likely to provide these capabilities that you can access through MediaRecorder.

    - -

    For a list of the media formats for which Android offers built-in support, see the Android Media Formats appendix.

    - -

    Playing Audio and Video

    -

    Media can be played from anywhere: from a raw resource, from a file from the system, -or from an available network (URL).

    - -

    You can play back the audio data only to the standard -output device; currently, that is the mobile device speaker or Bluetooth headset. You -cannot play sound files in the conversation audio.

    - -

    Playing from a Raw Resource

    -

    Perhaps the most common thing to want to do is play back media (notably sound) -within your own applications. Doing this is easy:

    -
      -
    1. Put the sound (or other media resource) file into the res/raw - folder of your project, where the Eclipse plugin (or aapt) will find it and - make it into a resource that can be referenced from your R class
    2. -
    3. Create an instance of MediaPlayer, referencing that resource using - {@link android.media.MediaPlayer#create MediaPlayer.create}, and then call - {@link android.media.MediaPlayer#start() start()} on the instance:

    4. -
    -
    -    MediaPlayer mp = MediaPlayer.create(context, R.raw.sound_file_1);
    -    mp.start();
    -
    -

    To stop playback, call {@link android.media.MediaPlayer#stop() stop()}. If -you wish to later replay the media, then you must -{@link android.media.MediaPlayer#reset() reset()} and -{@link android.media.MediaPlayer#prepare() prepare()} the MediaPlayer object -before calling {@link android.media.MediaPlayer#start() start()} again. -(create() calls prepare() the first time.)

    -

    To pause playback, call {@link android.media.MediaPlayer#pause() pause()}. -Resume playback from where you paused with -{@link android.media.MediaPlayer#start() start()}.

    - -

    Playing from a File or Stream

    -

    You can play back media files from the filesystem or a web URL:

    -
      -
    1. Create an instance of the MediaPlayer using new
    2. -
    3. Call {@link android.media.MediaPlayer#setDataSource setDataSource()} - with a String containing the path (local filesystem or URL) - to the file you want to play
    4. -
    5. First {@link android.media.MediaPlayer#prepare prepare()} then - {@link android.media.MediaPlayer#start() start()} on the instance:

    6. -
    -
    -    MediaPlayer mp = new MediaPlayer();
    -    mp.setDataSource(PATH_TO_FILE);
    -    mp.prepare();
    -    mp.start();
    -
    -

    {@link android.media.MediaPlayer#stop() stop()} and -{@link android.media.MediaPlayer#pause() pause()} work the same as discussed -above.

    -

    Note: It is possible that mp could be - null, so good code should null check after the new. - Also, IllegalArgumentException and IOException either - need to be caught or passed on when using setDataSource(), since - the file you are referencing may not exist.

    -

    Note: -If you're passing a URL to an online media file, the file must be capable of -progressive download.

    - -

    Recording Media Resources

    -

    Recording media is a little more involved than playing it back, as you would -probably expect, but it is still fairly simple. There is just a little more set -up to do

    -
      -
    1. Create a new instance of {@link android.media.MediaRecorder - android.media.MediaRecorder} using new
    2. -
    3. Create a new instance of {@link android.content.ContentValues - android.content.ContentValues} and put in some standard properties like - TITLE, TIMESTAMP, and the all important - MIME_TYPE
    4. -
    5. Create a file path for the data to go to (you can use {@link - android.content.ContentResolver android.content.ContentResolver} to - create an entry in the Content database and get it to assign a path - automatically which you can then use)
    6. -
    7. Set the audio source using {@link android.media.MediaRecorder#setAudioSource - MediaRecorder.setAudioSource()}. You will probably want to use - MediaRecorder.AudioSource.MIC
    8. -
    9. Set output file format using {@link - android.media.MediaRecorder#setOutputFormat MediaRecorder.setOutputFormat()} -
    10. -
    11. Set the audio encoder using - {@link android.media.MediaRecorder#setAudioEncoder MediaRecorder.setAudioEncoder()} -
    12. -
    13. Finally, {@link android.media.MediaRecorder#prepare prepare()} and - {@link android.media.MediaRecorder#start start()} the recording. - {@link android.media.MediaRecorder#stop stop()} and - {@link android.media.MediaRecorder#release release()} when you are done
    14. -
    -

    Here is a code example that will hopefully help fill in the gaps:

    -

    Start Recording

    -
    -    recorder = new MediaRecorder();
    -    ContentValues values = new ContentValues(3);
    -
    -    values.put(MediaStore.MediaColumns.TITLE, SOME_NAME_HERE);
    -    values.put(MediaStore.MediaColumns.TIMESTAMP, System.currentTimeMillis());
    -    values.put(MediaStore.MediaColumns.MIME_TYPE, recorder.getMimeContentType());
    -    
    -    ContentResolver contentResolver = new ContentResolver();
    -    
    -    Uri base = MediaStore.Audio.INTERNAL_CONTENT_URI;
    -    Uri newUri = contentResolver.insert(base, values);
    -    
    -    if (newUri == null) {
    -        // need to handle exception here - we were not able to create a new
    -        // content entry
    -    }
    -    
    -    String path = contentResolver.getDataFilePath(newUri);
    -
    -    // could use setPreviewDisplay() to display a preview to suitable View here
    -    
    -    recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
    -    recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
    -    recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
    -    recorder.setOutputFile(path);
    -    
    -    recorder.prepare();
    -    recorder.start();
    -
    -

    Stop Recording

    -
    -    recorder.stop();
    -    recorder.release();
    -
    -