Skip to content

Could not use Android Back Button when in walkthrough? #66

@kenzhang98

Description

@kenzhang98

Hi! First of all, many thanks for developing such a convenient and powerful walkthrough tool for RN. I have finished developing the walkthrough for our app right now and I am considering utilizing the back button on Android to act as the "Previous" button. However, when in walkthrough, pressing the back button on android does not trigger the function. And after the walkthrough has been finished by tapping the "Finish" or "Skip" button, the handler can be successfully called. I am not usre how to handle it or is it intended? My codes for this functionality is as followed.

import { BackHandler } from 'react-native'
componentWillUnmount () {
    BackHandler.removeEventListener('androidBackButtonPress', this.handleBackPress)
  }

  handleBackPress = () => {
    console.log('test')
    return true
  }
  componentDidMount () {
    BackHandler.addEventListener('androidBackButtonPress', this.handleBackPress)
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions