/// <summary> /// Clean Up. /// </summary> void OnDestroy() { #if PLATFORM_LUMIN if (MLContacts.IsStarted) { MLContacts.Stop(); } #endif }
/// <summary> /// Clean Up. /// </summary> void OnDestroy() { _privilegeRequester.OnPrivilegesDone -= HandlePrivilegesDone; MLInput.OnControllerButtonUp -= HandleControllerButtonUp; if (MLContacts.IsStarted) { MLContacts.OnContactAdded -= HandleOnContactAdded; MLContacts.OnContactUpdated -= HandleOnContactUpdated; MLContacts.OnContactDeleted -= HandleOnContactDeleted; MLContacts.OnOperationFailed -= HandleOnOperationFailed; MLContacts.Stop(); } }
/// <summary> /// Must check for privileges again after pause. /// </summary> void OnApplicationPause(bool pause) { if (pause) { #if PLATFORM_LUMIN if (MLContacts.IsStarted) { MLContacts.Stop(); } #endif } else { #if PLATFORM_LUMIN if (MLDevice.IsReady()) { StartAPI(); } #endif } }