0.1.2 • Published 2 years ago
react-native-silentmode-detector v0.1.2
react-native-silentmode-detector
package to listen for silent mode on iOS and Adroid devices.
Installation
npm install react-native-silentmode-detector
Usage
import { subscribe } from 'react-native-silentmode-detector';
// ...
useEffect(() => {
const unsubscribe = subscribe((isSilent: boolean) => {
// do things when the state changes
});
return unsubscribe; // -> subscribe returns an unsubscribe function
}, []);
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library