Releases: reyhankaplan/react-native-ringer-mode
Releases · reyhankaplan/react-native-ringer-mode
v2.0.1
v2.0.0
What's Changed
- BREAKING CHANGE: Change signature of
getRingerModefunction. Previously it was a static method of default exported RingerMode class, now it is a standalone function that is exported from the library. - BREAKING CHANGE: Change resolved value of
getRingerModefunction. Previously the method used to be resolved string values such as'SILENT','VIBRATE','NORMAL', now it resolves the value that Android returns which can be checked againstRINGER_MODE.silent,RINGER_MODE.vibrate,RINGER_MODE.normal. See below for full example. - BREAKING CHANGE: All functions under iOS now resolve
undefined.
Before v2.0.0.
import RingerMode from 'react-native-ringer-mode'After v2.0.0
import { getRingerMode, RINGER_MODE } from 'react-native-ringer-mode'
(async () => {
const mode = await getRingerMode()
if (mode === RINGER_MODE.normal) {
console.log('Mode is normal')
}
})()- Add
setRingerMode() - Add
useRingerMode()hook - Add
checkDndAccess()andrequestDndAccess() - Rewritten in TypeScript
New Contributors
- @valmirduraku made their first contribution in #2
Full Changelog: v1.1.0...v2.0.0
Version 1.1.0
- React Native V60 support
react-native-ringer-mode@1.0.1
First Release
Description
Gets ringer mode of Android device
Doesn't support ios or windows phone...
Methods
getRingerMode