Skip to main content

Media and Camera

  • Chapter
  • First Online:
Android Quick APIs Reference
  • 2073 Accesses

Abstract

Media support and access to a high-resolution camera are the most exciting features of the Android platform. Both of these features are very extensively used by Android applications. Dealing with media on a mobile device has its own unique challenges, and the Android framework provides a comprehensive application programming interface (API) for multimedia. This chapter provides a brief summary of those APIs and their usage.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 37.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    http://developer.android.com/reference/android/media/AudioManager.html .

  2. 2.

    http://developer.android.com/reference/android/media/AudioManager.html#isMicrophoneMute() .

  3. 3.

    http://developer.android.com/reference/android/media/AudioManager.html#isSpeakerphoneOn() .

  4. 4.

    http://developer.android.com/reference/android/media/AudioManager.html#getStreamVolume(int) .

  5. 5.

    http://developer.android.com/reference/android/media/AudioManager.html#getStreamMaxVolume(int) .

  6. 6.

    http://developer.android.com/reference/android/media/AudioManager.html#setStreamVolume(int, int, int) .

  7. 7.

    http://developer.android.com/reference/android/media/AudioManager.html#setStreamMute(int, boolean) .

  8. 8.

    http://developer.android.com/reference/android/media/AudioManager.html#setStreamSolo(int, boolean) .

  9. 9.

    http://developer.android.com/reference/android/media/AudioManager.html#isMusicActive() .

  10. 10.

    http://developer.android.com/reference/android/media/MediaPlayer.html .

  11. 11.

    http://developer.android.com/reference/android/media/MediaPlayer.html#setAudioStreamType(int) .

  12. 12.

    http://developer.android.com/reference/android/media/MediaPlayer.html#prepare() .

  13. 13.

    http://developer.android.com/reference/android/media/MediaPlayer.html#prepareAsync() .

  14. 14.

    http://developer.android.com/reference/android/media/MediaPlayer.html#start() .

  15. 15.

    http://developer.android.com/reference/android/media/MediaPlayer.html#stop() .

  16. 16.

    http://developer.android.com/reference/android/media/MediaPlayer.html#release() .

  17. 17.

    http://developer.android.com/reference/android/media/SoundPool.html .

  18. 18.

    http://developer.android.com/reference/android/media/SoundPool.Builder.html .

  19. 19.

    http://developer.android.com/reference/android/media/AudioAttributes.html .

  20. 20.

    http://developer.android.com/reference/android/media/SoundPool.html#load(android.content.Context, int, int) .

  21. 21.

    http://developer.android.com/reference/android/media/SoundPool.html#load(android.content.res.AssetFileDescriptor, int) .

  22. 22.

    http://developer.android.com/reference/android/media/SoundPool.html#load(java.lang.String, int) .

  23. 23.

    http://developer.android.com/reference/android/media/SoundPool.html#play(int, float, float, int, int, float) .

  24. 24.

    http://developer.android.com/reference/android/media/SoundPool.html#stop(int) .

  25. 25.

    http://developer.android.com/reference/android/media/MediaRecorder.html .

  26. 26.

    http://developer.android.com/reference/android/Manifest.permission.html#RECORD_AUDIO .

  27. 27.

    http://developer.android.com/reference/android/media/MediaRecorder.html#setAudioSource(int) .

  28. 28.

    http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html .

  29. 29.

    http://developer.android.com/guide/appendix/media-formats.html .

  30. 30.

    http://developer.android.com/reference/android/media/MediaRecorder.html#setAudioEncoder(int) .

  31. 31.

    http://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder.html .

  32. 32.

    http://developer.android.com/reference/android/media/MediaRecorder.html#setOutputFormat(int) .

  33. 33.

    http://developer.android.com/reference/android/media/MediaRecorder.OutputFormat.html .

  34. 34.

    http://developer.android.com/reference/android/media/MediaRecorder.html#setOutputFile(java.lang.String) .

  35. 35.

    http://developer.android.com/reference/android/media/MediaRecorder.html#prepare() .

  36. 36.

    http://developer.android.com/reference/android/media/MediaRecorder.html#start() .

  37. 37.

    http://developer.android.com/reference/android/media/MediaRecorder.html#stop() .

  38. 38.

    http://developer.android.com/reference/android/media/MediaRecorder.html#release() .

  39. 39.

    http://developer.android.com/reference/android/view/Surface.html .

  40. 40.

    http://developer.android.com/reference/android/view/SurfaceView.html .

  41. 41.

    http://developer.android.com/reference/android/view/SurfaceHolder.html .

  42. 42.

    http://developer.android.com/reference/android/view/SurfaceHolder.Callback.html#surfaceCreated(android.view.SurfaceHolder) .

  43. 43.

    http://developer.android.com/reference/android/view/SurfaceHolder.html#getSurface() .

  44. 44.

    http://developer.android.com/reference/android/media/MediaRecorder.html#setPreviewDisplay(android.view.Surface) .

  45. 45.

    http://developer.android.com/reference/android/media/MediaRecorder.VideoSource.html .

  46. 46.

    http://developer.android.com/reference/android/media/MediaRecorder.html#setVideoSource(int) .

  47. 47.

    http://developer.android.com/reference/android/media/MediaRecorder.VideoEncoder.html .

  48. 48.

    http://developer.android.com/reference/android/media/MediaRecorder.html#setVideoEncoder(int) .

  49. 49.

    http://developer.android.com/reference/android/Manifest.permission.html#CAMERA .

  50. 50.

    http://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraCharacteristics(java.lang.String) .

  51. 51.

    http://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html .

  52. 52.

    http://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#get(android.hardware.camera2.CameraCharacteristics.Key<T>) .

  53. 53.

    http://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html .

  54. 54.

    http://developer.android.com/reference/android/hardware/camera2/CameraManager.html#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler) .

  55. 55.

    http://developer.android.com/reference/android/hardware/camera2/CameraDevice.StateCallback.html .

  56. 56.

    http://developer.android.com/reference/android/os/Handler.html .

  57. 57.

    http://developer.android.com/reference/android/os/HandlerThread.html.

  58. 58.

    http://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputSizes(java.lang.Class<T>) .

  59. 59.

    https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureSession(java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) .

  60. 60.

    https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession.StateCallback.html .

  61. 61.

    https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureRequest(int) .

  62. 62.

    https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Builder.html#addTarget(android.view.Surface) .

  63. 63.

    https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailableCaptureRequestKeys() .

  64. 64.

    https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.html .

  65. 65.

    https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession.html#capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) .

  66. 66.

    https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession.html#captureBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) .

  67. 67.

    https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession.html#setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) .

  68. 68.

    https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession.html#setRepeatingBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) .

  69. 69.

    https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession.CaptureCallback.html .

  70. 70.

    https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession.html#stopRepeating() .

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Onur Cinar

About this chapter

Cite this chapter

Cinar, O. (2015). Media and Camera. In: Android Quick APIs Reference. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0523-5_9

Download citation

Publish with us

Policies and ethics