birkir / react-native-carplay

CarPlay with React Native
https://birkir.dev/react-native-carplay/
MIT License
642 stars 107 forks source link

Support for physical back button? #80

Closed sopranolinist closed 1 year ago

sopranolinist commented 2 years ago

Does this library support navigation with a physical back button, in addition to touchscreen? We have an BMW physical back button that keeps crashing the our carplay app. However the nav wheel works just fine. The car does not have touchscreen so we can only use physical controls.

tomdye commented 2 years ago

I dont believe carplay apps themselves deal with the underlying buttons, theyre handles via the native side of things within the carplay implementation. The app itself would likely not be aware of if a virtual or physical back button were pressed.

savaughn commented 2 years ago

I removed the instantiated backButton in RNCarPlay.m. This allowed the hardware back button to pop the stack. If you're on the tabbar template, then this will navigate out of your carplay app.

Since I was only using it to track which screen I was currently on, instead I used the onDidAppear to report current screen.

birkir commented 1 year ago

We now support to disable back button via backButtonHidden which should enable native backs.