Skip to content
Android Equalizer View that can also manage the audio track frequencies
Java
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app eq in dialog fixed colors Sep 29, 2019
equalizer added dialog eq Sep 29, 2019
gradle/wrapper
screenshots added dialog eq Sep 29, 2019
.gitignore init Apr 5, 2018
LICENSE
README.md images layout in readme Sep 29, 2019
build.gradle added dialog equalizer Sep 29, 2019
gradle.properties migrated to androidx Feb 12, 2019
gradlew init Apr 5, 2018
gradlew.bat init Apr 5, 2018
settings.gradle init Apr 5, 2018

README.md

AndroidEqualizer

Android Equalizer View that can also manage the audio track frequencies

Add Equalizer in your Android app

How To Use

STEP 1

Add it to your build.gradle with:

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

and:

dependencies {
      implementation 'com.github.bullheadandplato:AndroidEqualizer:2.1'
}

if not using AndroidX. it will not have DialogEqualizerFragment or any other improvements

dependencies {
     implementation 'com.github.bullheadandplato:AndroidEqualizer:1.0'
}

STEP 2

For Equalizer in dialog

 DialogEqualizerFragment fragment = DialogEqualizerFragment.newBuilder()
                    .setAudioSessionId(sessionId)
                    .themeColor(ContextCompat.getColor(this, R.color.primaryColor))
                    .textColor(ContextCompat.getColor(this, R.color.textColor))
                    .accentAlpha(ContextCompat.getColor(this, R.color.playingCardColor))
                    .darkColor(ContextCompat.getColor(this, R.color.primaryDarkColor))
                    .setAccentColor(ContextCompat.getColor(this, R.color.secondaryColor))
                    .build();
            fragment.show(getSupportFragmentManager(), "eq");

For Equalizer in your view

Create a frame in your layout file.

<FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        android:id="@+id/eqFrame"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
        

In your Activity class

 int sessionId = mediaPlayer.getAudioSessionId();
        mediaPlayer.setLooping(true);
        EqualizerFragment equalizerFragment = EqualizerFragment.newBuilder()
                .setAccentColor(Color.parseColor("#4caf50"))
                .setAudioSessionId(sessionId)
                .build();
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.eqFrame, equalizerFragment)
                .commit();

This work is mostly borrowed from https://github.com/harjot-oberai/MusicDNA

You can’t perform that action at this time.