react-native-home-pressed
react-native-home-pressed copied to clipboard
using ON_HOME_BUTTON_PRESSED but pressing 'Recent Apps' button also triggered
I get this weird problem, when home button is pressed is detected, and the apps go to home. but if pressing recent app button and go back to the app, it is detecting double home button press.
//get home button if pressed, put in in componentDidMount
DeviceEventEmitter.addListener(
'ON_HOME_BUTTON_PRESSED',
() => {
this.setState( prevState => {
return {
phoneInformation: prevState.phoneInformation.concat({ title: 'Home Button', value: 'Pressed'})
}
})
})
So the app will display Home Button: Pressed
twice.
React: 16.3.1 React Native: 0.55.2
Hello , can you please tell me how to disable these btns