Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.27 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.27 KB

AudioFocus-Player-Android

Download

A Wrapper over the Android Media Player Library that Plays a Media with Audio focus

Overview of Audio Focus Player library

  • Audio Focus player can be used to play any Media with Audio Focus
  • This library can be used to play a media with a Uri
  • Supports android versions above Android Oreo 8.0 ( API level 26 )
  • This library has a simple interface just Like Media Player API in android

Using Audio Focus Player Library in your Android application

Add this in your build.gradle

implementation 'com.avirias.audiofocus:audiofocus:1.0.0'

Then initialize it in onCreate() Method of Activity or Fragment :

AudioFocusPlayer audioFocusPlayer = new AudioFocusPlayer(context);

Initializing it with some customization

// Set a Datasource 
audioFocusPlayer.setDataSource(yourMediaUri);

Play or Pause it

// Play the Media 
audioFocusPlayer.play();

// Pause the Media 
audioFocusPlayer.pause();