Skip to content

using ON_HOME_BUTTON_PRESSED but pressing 'Recent Apps' button also triggered #1

@winadiw

Description

@winadiw

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions