0

I dont know how to describe the problem by codes, but my hardwareBackbutton work normally for android devices with OS < 10. Another cause minimize app.

With pop() function from navigation, it's work. Only problem with hardwareBackbutton.

I am using native stack:

    "@react-navigation/bottom-tabs": "^6.3.1",
    "@react-navigation/material-bottom-tabs": "^6.2.1",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/native-stack": "^6.9.12",
    "@react-navigation/stack": "^6.3.7",
    "react": "^18.2.0",
    "react-native": "^0.71.8",


...


export const Stack = createNativeStackNavigator()

Here is the video I captured: Video here

3
  • What happen when you press on the plus icon? Did you open a modal view? Commented Aug 4, 2023 at 19:27
  • plusicon = navigation.navigate('newscreen'). not modal Commented Aug 5, 2023 at 1:16
  • 1
    I think without sharing a full example I won't be able to help. Commented Aug 5, 2023 at 8:34

1 Answer 1

0

OK I found problem because OnBackInvokedCallback putted on AndroidManifest, as doc here:

This replaces Activity#onBackPressed(), Dialog#onBackPressed() and KeyEvent.KEYCODE_BACK

https://developer.android.com/reference/android/window/OnBackInvokedCallback

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.