• Latest Code...

    Featured Post

    Implementing Hilt in a Kotlin Android Jetpack Compose Project with MVVM Architecture

     In modern Android development, maintaining a scalable codebase can be challenging, especially when it comes to dependency management. Hilt,...

    Record Audio, Video and Save Image in Custom folder on SD CARD in Android


    Here is the simple and useful tutorials for using multimedia data in android.

    Performing Audio Capture

    Audio capture from the device is a bit more complicated than audio and video playback, but still fairly simple:

    1. Create a new instance of android.media.MediaRecorder.
    2. Set the audio source using MediaRecorder.setAudioSource(). You will probably want to use MediaRecorder.AudioSource.MIC.
    3. Set output file format using MediaRecorder.setOutputFormat().
    4. Set output file name using MediaRecorder.setOutputFile().
    5. Set the audio encoder using MediaRecorder.setAudioEncoder().
    6. Call MediaRecorder.prepare() on the MediaRecorder instance.
    7. To start audio capture, call MediaRecorder.start().
    8. To stop audio capture, call MediaRecorder.stop().
    9. When you are done with the MediaRecorder instance, call MediaRecorder.release() on it. Calling MediaRecorder.release() is always recommended to free the resource immediately.

    Record a Video with a Camera App

    The Android way of delegating actions to other applications is to invoke an Intent that describes what you want done. This process involves three pieces: The Intent itself, a call to start the external Activity, and some code to handle the video when focus returns to your activity.

    Take a Photo with the Camera App


    The Android way of delegating actions to other applications is to invoke an Intent that describes what you want done. This process involves three pieces: The Intent itself, a call to start the external Activity, and some code to handle the image data when focus returns to your activity.

    Here is the output snaps of this app:







    Download Full Source Code



    Contact Form

    Name

    Email *

    Message *