├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ └── layout │ │ │ └── activity_main.xml │ │ ├── java │ │ └── cafe │ │ │ └── adriel │ │ │ └── androidaudiorecorder │ │ │ └── example │ │ │ ├── Util.java │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── lib ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── drawable │ │ │ ├── aar_ic_rec.png │ │ │ ├── aar_ic_pause.png │ │ │ ├── aar_ic_play.png │ │ │ ├── aar_ic_stop.png │ │ │ └── aar_ic_restart.png │ │ ├── drawable-hdpi │ │ │ ├── aar_ic_check.png │ │ │ └── aar_ic_clear.png │ │ ├── drawable-mdpi │ │ │ ├── aar_ic_check.png │ │ │ └── aar_ic_clear.png │ │ ├── drawable-xhdpi │ │ │ ├── aar_ic_check.png │ │ │ └── aar_ic_clear.png │ │ ├── drawable-xxhdpi │ │ │ ├── aar_ic_check.png │ │ │ └── aar_ic_clear.png │ │ ├── drawable-xxxhdpi │ │ │ ├── aar_ic_check.png │ │ │ └── aar_ic_clear.png │ │ ├── values │ │ │ ├── dimens.xml │ │ │ └── strings.xml │ │ ├── values-pt │ │ │ └── strings.xml │ │ ├── menu │ │ │ └── aar_audio_recorder.xml │ │ └── layout │ │ │ └── aar_activity_audio_recorder.xml │ │ ├── java │ │ └── cafe │ │ │ └── adriel │ │ │ └── androidaudiorecorder │ │ │ ├── model │ │ │ ├── AudioSampleRate.java │ │ │ ├── AudioChannel.java │ │ │ └── AudioSource.java │ │ │ ├── VisualizerHandler.java │ │ │ ├── Util.java │ │ │ ├── AndroidAudioRecorder.java │ │ │ └── AudioRecorderActivity.java │ │ └── AndroidManifest.xml ├── build.gradle └── proguard-rules.pro ├── .github └── FUNDING.yml ├── settings.gradle ├── demo.gif ├── screenshots.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /lib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: adrielcafe 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':lib' 2 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/demo.gif -------------------------------------------------------------------------------- /screenshots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/screenshots.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AndroidAudioRecorder 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /lib/src/main/res/drawable/aar_ic_rec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable/aar_ic_rec.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable/aar_ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable/aar_ic_pause.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable/aar_ic_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable/aar_ic_play.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable/aar_ic_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable/aar_ic_stop.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable/aar_ic_restart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable/aar_ic_restart.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-hdpi/aar_ic_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable-hdpi/aar_ic_check.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-hdpi/aar_ic_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable-hdpi/aar_ic_clear.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-mdpi/aar_ic_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable-mdpi/aar_ic_check.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-mdpi/aar_ic_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable-mdpi/aar_ic_clear.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/aar_ic_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable-xhdpi/aar_ic_check.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/aar_ic_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable-xhdpi/aar_ic_clear.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xxhdpi/aar_ic_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable-xxhdpi/aar_ic_check.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xxhdpi/aar_ic_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable-xxhdpi/aar_ic_clear.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xxxhdpi/aar_ic_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable-xxxhdpi/aar_ic_check.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xxxhdpi/aar_ic_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/HEAD/lib/src/main/res/drawable-xxxhdpi/aar_ic_clear.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | .idea 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | .externalNativeBuild 11 | -------------------------------------------------------------------------------- /lib/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 60dp 4 | 30dp 5 | 200dp 6 | -------------------------------------------------------------------------------- /lib/src/main/res/values-pt/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Salvar 3 | Pausado 4 | Gravando 5 | Reproduzindo 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Aug 25 11:20:16 BRT 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | #F4511E 8 | -------------------------------------------------------------------------------- /lib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AndroidAudioRecorder 3 | Save 4 | Paused 5 | Recording 6 | Playing 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /lib/src/main/res/menu/aar_audio_recorder.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /lib/src/main/java/cafe/adriel/androidaudiorecorder/model/AudioSampleRate.java: -------------------------------------------------------------------------------- 1 | package cafe.adriel.androidaudiorecorder.model; 2 | 3 | public enum AudioSampleRate { 4 | HZ_48000, 5 | HZ_44100, 6 | HZ_32000, 7 | HZ_22050, 8 | HZ_16000, 9 | HZ_11025, 10 | HZ_8000; 11 | 12 | public int getSampleRate(){ 13 | return Integer.parseInt(name().replace("HZ_", "")); 14 | } 15 | } -------------------------------------------------------------------------------- /lib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /lib/src/main/java/cafe/adriel/androidaudiorecorder/model/AudioChannel.java: -------------------------------------------------------------------------------- 1 | package cafe.adriel.androidaudiorecorder.model; 2 | 3 | import android.media.AudioFormat; 4 | 5 | public enum AudioChannel { 6 | STEREO, 7 | MONO; 8 | 9 | public int getChannel(){ 10 | switch (this){ 11 | case MONO: 12 | return AudioFormat.CHANNEL_IN_MONO; 13 | default: 14 | return AudioFormat.CHANNEL_IN_STEREO; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /lib/src/main/java/cafe/adriel/androidaudiorecorder/model/AudioSource.java: -------------------------------------------------------------------------------- 1 | package cafe.adriel.androidaudiorecorder.model; 2 | 3 | import android.media.MediaRecorder; 4 | 5 | public enum AudioSource { 6 | MIC, 7 | CAMCORDER; 8 | 9 | public int getSource(){ 10 | switch (this){ 11 | case CAMCORDER: 12 | return MediaRecorder.AudioSource.CAMCORDER; 13 | default: 14 | return MediaRecorder.AudioSource.MIC; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/cafe/adriel/androidaudiorecorder/example/Util.java: -------------------------------------------------------------------------------- 1 | package cafe.adriel.androidaudiorecorder.example; 2 | 3 | import android.app.Activity; 4 | import android.content.pm.PackageManager; 5 | import android.support.v4.app.ActivityCompat; 6 | import android.support.v4.content.ContextCompat; 7 | 8 | public class Util { 9 | 10 | public static void requestPermission(Activity activity, String permission) { 11 | if (ContextCompat.checkSelfPermission(activity, permission) 12 | != PackageManager.PERMISSION_GRANTED) { 13 | ActivityCompat.requestPermissions(activity, new String[]{permission}, 0); 14 | } 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /lib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion "24.0.2" 6 | 7 | defaultConfig { 8 | minSdkVersion 15 9 | targetSdkVersion 24 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile 'com.android.support:appcompat-v7:24.2.1' 23 | compile 'com.kailashdabhi:om-recorder:1.1.0' 24 | compile 'com.cleveroad:audiovisualization:1.0.0' 25 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/adrielcafe/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /lib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/adrielcafe/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion "24.0.2" 6 | defaultConfig { 7 | applicationId "cafe.adriel.androidaudiorecorder.example" 8 | minSdkVersion 15 9 | targetSdkVersion 24 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile 'com.android.support:appcompat-v7:24.2.1' 23 | compile project(':lib') 24 | // compile 'com.github.adrielcafe:AndroidAudioRecorder:0.1.0' 25 | } 26 | 27 | repositories { 28 | maven { url "https://jitpack.io" } 29 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 |