I'm developing a Unity plugin for an Android SDK. This SDK, in its native form, needs to receive onResume/pause notifications from the app in order to work properly. How can I get notifications for onResume/onPause from inside a Unity plugin? Thanks for your help!
1 Answer
You don't need an Android Unity plugin for onPause/onResume.
This unity callback is tied to Android's onPause/onResume callbacks. http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnApplicationPause.html
-
1I already have the plugin. The plugin holds the native SDK which needs those notifications for its work. So I must get those notifications in the plugin or the host app and send them to the SDK. How do I translate MonoBehaviour.OnApplicationPause to onResume, onPause, onStart, onStop, onRestart?– Almog CJan 27, 2014 at 16:22
-
In Unity 2017.3.0f3 I'm not always getting calls to OnApplicationPause when my Android Activity is resumed. The official documentation is ambiguous at best. Feb 28, 2018 at 10:26