How to correctly exit Daydream application (pressing the back or X button).

I have found a few solutions to this problem, where the back or X button (in top-left corner) won’t exit the application, but they no longer seem to work, and my application keeps getting rejected.

I have found the following solutions:

And I have personally tried the following two variants:

    void LateUpdate() {
        GvrViewer.Instance.UpdateState();
        if (GvrViewer.Instance.BackButtonPressed || Input.GetKeyDown(KeyCode.Escape)) {
            Application.Quit();
        }
    }

And more simply:

    void Update() {
        if (Input.GetKeyDown(KeyCode.Escape)) {
            Application.Quit();
        }
    }

But with both variants, the application keeps getting rejected from the following reason:

The app does not exit when a user selects the home or back button
When the user removes the phone from their viewer, both the close button (upper left corner) and the back button in the system bar should exit the VR app. The app must exit into 2D, not just Daydream Home. The close button must also be visible in your app.

I’m currently using Unity 5.6 and GoogleVR SDK 1.4.

Am I missing something? Is there any other way to detect that the back button/X button is pressed?

Hi

From Unity 5.5 or 5.6 my applications always quits when pressing back or “x” button in vr-mode.

I think this is wrong, and much more would like to catch the “escape” button in the code, like in Unity 5.4, to let the app decide what to happen.

For example set the game in paus mode, or view an rewarded ad.
Where can we otherwise put ads in VR-apps?.

I think Google says “the app must exit into 2D”, and this shouldn´t mean it has to quit.