Working with Multimedia Android

The Android SDK provides a variety of methods for applications to incorporate audio and visual media, including support for many different media types and formats. Individual Android devices and developers can extend the list of supported media to other formats. Not every Android handset has the same multimedia capabilities. Always verify the capabilities of target devices before publication.

The multimedia features of the Android platform generally fall into three categories:

  • Still images (recorded with the camera)
  • Audio (recorded with the microphone, played back with speakers or audio output)
  • Video (recorded with the camera and microphone, played back with speakers or audio output)

Multimedia hardware such as a built-in camera, speakers, and audio or video output ports are optional features for Android devices.

In addition to requiring the appropriate permissions, you can specify which optional features your application requires within the Android Manifest file. You can do this using the <uses-feature> tag of the Android Manifest file declare that your application uses the camera. Remember, though, that the <uses-feature> tag is not enforced by the Android platform. Instead, application stores such as the Android Market use this data to filter which applications to sell to certain devices.

Any application that requests the CAMERA permission is assumed to use all camera features.If your application accesses the camera, but can function properly without it, you can also set the android: required field of <uses-feature> to false. However, if your application requires a microphone and a camera with autofocus but not a flash to be present on the device, you can set the camera features your application requires specifically, like this:

<uses-feature android:name=”android.hardware.microphone” />
<uses-feature android:name=”android.hardware.camera” />
<uses-feature android:name=”android.hardware.camera.autofocus” />

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Android Topics