Pausing the game on Incoming call or Switching apps

Hi guys, I’m new here, just wondering, I’m making a mobile game, but how do I automatically pause the game when there’s an incoming call / when i switch app?
And I’m not talking about creating “pause button”.

Thanks in advance

The game should already be pausing itself automatically. If you mean opening a pause menu after coming back, there is no way to do that currently.

Got it. Thanks. I really appreciate it.