react-native-home-pressed icon indicating copy to clipboard operation
react-native-home-pressed copied to clipboard

using ON_HOME_BUTTON_PRESSED but pressing 'Recent Apps' button also triggered

Open winadiw opened this issue 6 years ago • 2 comments

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

winadiw avatar Jul 17 '18 11:07 winadiw

Hello , can you please tell me how to disable these btns

bilalyaqoob avatar Dec 12 '20 02:12 bilalyaqoob