//Android Dialog with checkbox -> Callback handler private void OnReceiveChecked(string message) { #if UNITY_EDITOR Debug.Log("OnReceiveChecked : " + message); #elif UNITY_ANDROID AndroidPlugin.ShowToast(message); #endif bool check = message.Contains("CHECKED_TRUE"); //"CHECKED_FALSE" when false if (ynCheckToggle != null) { ynCheckToggle.isOn = !check; } if (okCheckToggle != null) { okCheckToggle.isOn = !check; } XPlayerPrefs.SetBool(gameObject.name + CHECKED_PREF, !check); //Save a boolean value (PlayerPrefs) PlayerPrefs.Save(); }