AudioView

General

Category
Free
Tag
Audio
License
N/A
Min SDK
14 (Android 4.0–4.0.2 Ice Cream Sandwich)
Registered
Oct 7, 2018
Favorites
1
Link
https://github.com/4eRTuk/audioview
See also
Minim-Android
Zentone
Audio Wife
soundtransform
Pindrop

Additional

Language
Java
Version
N/A
Created
Sep 1, 2015
Updated
Sep 5, 2018
Owner
Stanislav Petriakov (4eRTuk)
Contributor
Stanislav Petriakov (4eRTuk)
1
Activity
Badge
Generate
Download
Source code
APK file

Advertising

AudioView

Simple Android audio view with a few controls. Basically it's a MediaPlayer wrapper.

See picture

See demo app

Usage with Gradle

  1. Add dependency
dependencies {
    implementation 'com.4ert:audioview:0.3.2'
}
  1. Add layout
<com.keenfin.audioview.AudioView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>
  1. Set file data source
audioView.setDataSource("/path/to/file");
audioView.setDataSource(Uri);
audioView.setDataSource(FileDescriptor);
audioView.setDataSource(List<String/Uri/FileDescriptor>);
  1. Control playback if needed
audioView.start();
audioView.pause();
audioView.stop();

Styles

primaryColor

Set default color for FAB and SeekBar. By default it uses colorAccent from AppTheme.

minified

Use alternative version of layout if true.

selectControls

Show (true by default) or hide rewind/forward buttons. Not available if minified.

showTitle

Show song's title if there is one. Default is true.

<com.keenfin.audioview.AudioView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:minified="true"
    app:primaryColor="@android:color/holo_blue_ligh"
    app:selectControls="false"
    app:showTitle="false"/>