Making save game

Hi,
My game is on android and the problem is when player is in game and if player press menu button on his phone it shuts down the game and save is not created.
Example
I am in game i am at shop buy stuff and decide to just quit by pushing menu button on phone. Game quits and save is not happening.
I found that there are inputs for these events but for me only work back button. If i press it in game on phone menu options pops up all is saved. but if i press menu button it just shuts down game.
What am i missing or doing wrong?