Forum Discussion
Anonymous
6 years agoHow to detect app made with unity quit on Oculus Go
Hello everyone, are there anyone know how to detect app quit on Oculus Go? I have tried using OnApplicationQuit(), but it doesn't work. Unfortunately, after googling, there is no luck on what I am looking for. What I would like to do is to save the int with PlayerPref() when app is quit.
4 Replies
Replies have been turned off for this discussion
- AnonymousAlready get what i was looking for works, but still would like to know how to save some value when the app quit.
- emalafeewProtegeHi we're handling OnApplicationPause to save state instead of OnApplicationQuit for this reason.
- emalafeewProtege
OnApplicationPause doesn't get called on forced shutdown due to low battery, so we added this hook to our Android plugin which may be of use to others
public class MyReceiver extends BroadcastReceiver { @override public void onReceive(Context context, Intent intent) { if (action.equals("android.intent.action.ACTION_REQUEST_SHUTDOWN")) { UnityPlayer.UnitySendMessage("GlobalGameObject", "AndroidShutdown", ""); } } };- VincdpHonored Guest
Hi, how did you do it?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 years ago
- 4 years agoAnonymous
- 2 years ago