Application Close button for ionic 4.10.3 side menu android and ios app

I am realy Confused in ionic 4.10.3 . after crating a android application . when i am going to test this on my android device . i realize , my application did not exit when i tap my back button . don’t know why. but its not good for production . if ionic developer team delete this back button future , they must assain a function that help to exit/close a application after clicking the button . i tryed navigator[‘app’].exitApp() . but this function only work blank project . but it does not work for side menu project . Any one here , who can tell me . how i can fix it ? i am really confused .