ANP Audio Recorder is a library that helps a developer to provide a easy way to to user record an audio and play it to get a feedback about the record.

Overview

ANP Audio Recorder

Introduction

ANP Audio Recorder is a library that helps a developer to provide a easy way to to user record an audio and play it to get a feedback about the record.

Screenshot

Install

Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

Step 2. Add the dependency

dependencies {
  implementation 'com.github.AgnaldoNP:ANPAudioRecorder:1.0'
}

Step 3. Add permissions

">
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Usage

Sample of usage

">
<pereira.agnaldo.audiorecorder.AudioRecorderView
    android:id="@+id/recordView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="10dp" />

Options

Property Value / Type
recordIcon drawable
playIcon drawable
pauseIcon drawable
stopIcon drawable
deleteIcon drawable
background drawable
baseColor color
recordIconTint color
playIconTint color
pauseIconTint color
stopIconTint color
deleteIconTint color
recordWaveTint color
playProgressTint color
backgroundTint color
timeTint color
totalTimeTint color
currentTimeTint color

These configs also can be changes at runtime by calling their set methods

Default style

Screenshot Screenshot

Screenshot Screenshot

Other Examples

GIF

">
<pereira.agnaldo.audiorecorder.AudioRecorderView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="10dp"
    android:minHeight="@dimen/anp_ar_min_height"
    app:baseColor="#FF0000" />

<pereira.agnaldo.audiorecorder.AudioRecorderView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="10dp"
    android:minHeight="@dimen/anp_ar_min_height"
    app:background="@drawable/custom_bg_layout_1"
    app:baseColor="#FF0000"
    app:currentTimeTint="#F8A007"
    app:playProgressTint="#FF0"
    app:recordIconTint="#0000FF"
    app:recordWaveTint="#00FF00"
    app:totalTimeTint="#FF00FB" />

Listeners

Kotlin

recordView.setOnStartRecording {
    ...
}

recordView.setOnFinishRecord { file ->
    ...
}

recordView.setOnPlay {
    ...
}

recordView.setOnPause {
    ...
}

recordView.setOnResume {
    ...
}

recordView.setOnFinishPlay {
    ...
}

recordView.setOnDelete {
    ...
}

Java

recordView.setOnStartRecording(new AudioRecorderView.OnStartRecordingListener() {
    @Override
    public void onStartRecording() {
        ...
    }
});
// or with java 8+
recordView.setOnStartRecording(() -> {
    ...
});


recordView.setOnFinishRecord(new AudioRecorderView.OnFinishRecordListener() {
    @Override
    public void onFinishRecordListener(@NotNull File file) {
        ...
    }
});
// or with java 8+
recordView.setOnFinishRecord(file -> {
    ...
});


recordView.setOnPlay(new AudioRecorderView.OnPlayListener() {
    @Override
    public void onPlay() {
        ...
    }
});
// or with java 8+
recordView.setOnPlay(() -> {
    ...
});


recordView.setOnPause(new AudioRecorderView.OnPauseListener() {
    @Override
    public void onPause() {
        ...
    }
});
// or with java 8+
recordView.setOnPause(() -> {
    ...
});


recordView.setOnResume(new AudioRecorderView.OnResumeListener() {
    @Override
    public void onResume() {
        ...
    }
});
// or with java 8+
recordView.setOnResume(() -> {
    ...
});


recordView.setOnFinishPlay(new AudioRecorderView.OnFinishPlayListener() {
    @Override
    public void onFinishPlayListener() {
        ...
    }
});
// or with java 8+
recordView.setOnFinishPlay() -> {
    ...
});


recordView.setOnDelete(new AudioRecorderView.OnDeleteListener() {
    @Override
    public void onDelete() {
        ...
    }
});
// or with java 8+
recordView.setOnDelete() -> {
    ...
});

Contributions and Support

This project made use of NaraeAudioRecorder by WindSekirun to enable record audio functionality.

Contributions are welcome. Create a new pull request in order to submit your fixes and they shall be merged after moderation. In case of any issues, bugs or any suggestions, either create a new issue or post comments in already active relevant issues

Please consider supporting me

ETH Address

--

ETH / SHIB / BNB / SLP / IOTX / DODGE (BEP20 or ERC20)

  • 0x0d620a663692ac8797c289c5715228c5f19f9f7a

--

DOGE

  • (Main net) DQXW3DH2Jwe3zuCAcNAL7xLr1cSx7b7Pmt
  • (BEP20) 0x0d620a663692ac8797c289c5715228c5f19f9f7a
You might also like...
Mobile App that shows Random Products in a Nested Recyclerview for Android [Kotlin] Developer Role at Edvora
Mobile App that shows Random Products in a Nested Recyclerview for Android [Kotlin] Developer Role at Edvora

EdvoraAndroidTest An simple Android App for Edvora Android Assessment. It consum

Jugando con un Parking realizado como prueba de examen en JetBrains Academy, curso Kotlin Developer
Jugando con un Parking realizado como prueba de examen en JetBrains Academy, curso Kotlin Developer

Kotlin Parking Lot Proyecto de evaluación para el título de Kotlin Developer en Jetbrains Academy. Consiste en realizar un parking con las especificac

The complete Android Kotlin Developer course
The complete Android Kotlin Developer course

The complete Android Kotlin Developer course In this course you will learn how to make 17 online games, and apps for Android, using Kotlin. check the

A Simple Android library to get the number of words and give you the time it will take you to finish an article/story.

MinRead A Simple Android library to get the number of words and give you the time it will take you to finish an article/story. Prerequisite Androidx K

KotlinScript that generate Reel from a given image, text and audio

ReelScriot KotlinScript that generate Reel from a given image, text and audio 80f4ea39-a7da-4f21-b0ff-7a17836a1cd0.mp4 6691b51d-d7a3-4915-ae41-8bec400

SeatBookView is an Android Studio Library that helps to make it easier to create Bus, Train, Cinema Theater Seat UI and all functionalities are given.
SeatBookView is an Android Studio Library that helps to make it easier to create Bus, Train, Cinema Theater Seat UI and all functionalities are given.

SeatBookView SeatBookView is an Android Studio Library that helps to make it easier to create Bus 🚍 , Train 🚉 , Cinema Theater Seat UI and all funct

🔥The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.
🔥The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.

🔥The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.

This is a template to help you get started building amazing Kotlin applications and libraries.

Welcome to the Starter This is a template to help you get started building amazing Kotlin applications and libraries. Over time, examples will be comp

Owner
Agnaldo Pereira
Android Developer since 2013. Native developement with java and kotlin.
Agnaldo Pereira
A Basic Call Recorder for rooted Android devices

Basic Call Recorder BCR is a simple Android call recording app for rooted devices or devices running custom firmware. Once enabled, it stays out of th

Andrew Gunnerson 420 Jan 7, 2023
Add page & limit as GET parameter to get all titans data in a paginated format

Add page & limit as GET parameter to get all titans data in a paginated format (default values : page=1 and limit=3). Here the page param is the page number which you require and limit is the maximum number of items per page. Sample Request :

krishna chaitanya 1 Jan 31, 2022
Github User App for searching Github Users and get several information from it.

GithubUserApp Github User App for searching Github Users and get several information from it. This code implement with Coroutines, Retrofit, Architect

Wahyu Hendiarto W. 0 Apr 16, 2022
Jetpack Compose for Desktop and Web, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.

Jetpack Compose for Desktop and Web, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.

JetBrains 10k Jan 7, 2023
A TODO list app with location reminders that remind the user to do something when the user is at a specific location

Project Title Location Reminder Getting Started A TODO list app with location reminders that remind the user to do something when the user is at a spe

Raghav Saboo 0 Dec 5, 2021
Web Container: A simple web container library for Android to help fellow developer to open WebView easily

WebContainer Description Web Container is a simple web container library for And

Achmad Ichsan Thaib 8 Nov 22, 2022
This Kotlin Multiplatform library is for accessing the TMDB API to get movie and TV show content. Using for Android, iOS, and JS projects.

Website | Forum | Documentation | TMDb 3 API Get movie and TV show content from TMDb in a fast and simple way. TMDb API This library gives access to T

Moviebase 37 Dec 29, 2022
Easy way to handle all permissions

BestPermissionUtil You can read the story from here https://hamurcuabi.medium.com/permissions-with-the-easiest-way-9c466ab1b2c1 Prerequisites Add this

Emre Hamurcu 8 May 12, 2022
Inter Android Developer na Digital Innovation one

Desafios do Bootcamp Inter Android Developer Desafios Matemáticos em Kotlin Desafio Desafio Solução 1 Análise de Números Código 2 Consumo Médio do Aut

Luiz Correa 7 Nov 29, 2022
Search image app [Adanian Labs Interview], Android developer role

Pixar This is App shows you Images from the Pixabay API Table of Contents Functionalities Approach Screenshots How To Setup Libraries Used Author Info

Abdulfatah Mohamed 2 Dec 20, 2022