I tried to use AppState from react-native with the blur listener but nothing is showing up. I did the same exact code https://reactnative.dev/docs/appstate but the blur listener is not working. I just want to know when the notification drawer (https://developer.android.com/guide/topics/ui/notifiers/notifications#bar-and-drawer) appear on my application screen
export default class AppStateExample extends Component {
state = {
appState: AppState.currentState
};
componentDidMount() {
AppState.addEventListener("blur", this._handleAppStateChange);
}
componentWillUnmount() {
AppState.removeEventListener("blur", this._handleAppStateChange);
}
_handleAppStateChange = nextAppState => {
console.log("test")
};
}
Thank s for help !