Inherits BackHandler.
Property | Supported | Supported on Roku | Dynamic on Roku | Notes |
---|---|---|---|---|
exitApp | Partial | ~x | Not Possible | Android and Tizen only |
addEventListener | ~v | ~v | N/A | |
removeEventListener | ~v | ~v | N/A |
Notes:
BackHandler
listener if the application isn’t running on tvOS.See the following code sample for more details:
componentDidMount() {
if(!isTVOS){
BackHandler.addEventListener("hardwareBackPress", this.handleBackButtonPressed);
}
}
componentWillUnmount() {
if(!isTVOS){
BackHandler.removeEventListener("hardwareBackPress", this.handleBackButtonPressed);
}
}
handleBackButtonPressed = () => {
BackHandler.exitApp(); // Where supported
return true;
}
No results yet. Please begin typing a keyword to search the You.i TV Developer Portal...
Try to search with a different keyword or remove search filters.