Skip to content

smaranjit/VibeNPlayLib

Repository files navigation

VibeNPlayLib

controls vibration and Plays ringtone or alarm or notification tone

Add to project

implementation 'io.github.smaranjit:vibenplaylib:0.1.2'

Initialization

VibeNPlay.with(context).sound(true).vibration(true).initialize();

Starting

VibeNPlay.start();

Stopping

VibeNPlay.stop();

Customizing

Vibration

VibeNPlay.setVibration(true); //true to on, false to off
//firstbeat, rest, secondbeat - in mili seconds
//count - no of time to play this pattern
VibeNPlay.setVibrationPattern(firstbeat, rest, secondbeat, count);

Sound

VibeNPlay.setSound(true); //true to on, false to off
//VibeNPlay.SOUND_RINGTONE,VibeNPlay.SOUND_ALARM, VibeNPlay.SOUND_NOTIFICATION,VibeNPlay.SOUND_ALL
VibeNPlay.setSoundType(VibeNPlay.SOUND_RINGTONE);
VibeNPlay.setSoundPattern(true); //true for play in loop, false for play one time
VibeNPlay.reset(); // to reset all settings to their default value 

About

controlls vibration and Plays ringtone or alerm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages