Android - Use OnResume, OnPause, OnStop()

Hello !

I’m making a android application using Unity, and for some reasons, I want to know when my application got killed/terminated for pre-death processing.

I know about the Android activity cycle, which is why I’m gonna cheat and use both OnPause() (when there is a notification over my game) and OnStop() (when my game is completely obscured by another activity). That’s not pretty but that should do the trick.

My problem is that I don’t know how to use that functionnality inside Unity and that’s making me a sad sad panda :frowning:

I’ve made research but couldn’t find anything usefull

Can you please help me ?

Try researching unity’s OnApplicationFocus(),OnApplicationPause(),OnApplicationQuit()
They tie into the life cycle for android.