Is there a way to force OnApplicationPause method?

Hi Everyone.

I’m currently working in an android proyect, and my problem is this, when I minimize the application (with home button or lock), the application still running in background (the media volume still present when I press volume keys in my home screen) and this reduce the memory of the phone and crash after a while or when I open more applications.

I set my time in 0 (UnityEngine.Time.timeScale = 0.0f), to stop the game (the animations and game time), but the OnApplicationPause method is never called, someone have an idea why?? or how can I force to call this method???

I’ll really apreciate your help.

Thanks for your time, cheers from Mexico.

What version of Unity are you using?

According to 3.4.2 Release Notes the audio problem has been fixed. “Allow audio playback only when application is focused (prevents audio on the unlock screen).”

Also you should put logging in OnApplicationPause and OnApplicationFocus to see when each of them is called and act accordingly for your app.