Skip to content

v2.0.0

Choose a tag to compare

@reyhankaplan reyhankaplan released this 24 Oct 11:01
· 6 commits to master since this release

What's Changed

  • BREAKING CHANGE: Change signature of getRingerMode function. 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 getRingerMode function. 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 against RINGER_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')
  }
})()

New Contributors

Full Changelog: v1.1.0...v2.0.0