Daydream Apps rejected due X button

Affected UE 4.20 and 4.21.

Daydream apps are rejected from publishing due of malfunctioning of X and BACK button, reject code is:

The app found to be ineligible for Daydream as the app is still exhibiting crashing issues.
This behavior can be observed when the user exits out of the app using the back button, and then attempts to relaunch the app from DayDream home. Instead of the app successfully launching, the app opens to a black screen. Please note, the app should not crash, force close, freeze, or otherwise function abnormally.

And the publishing guideline is:

FN-A2: App closes from VR correctly
Pressing the Close close button or the Back button in the system bar (accessible if the user removes their phone from the viewer) should immediately pause the application, including any audio that was playing. User and app state should be handled in a reasonable way. The user should be taken to the 2D phone launcher.

If you are creating a hybrid application, and the user launched into VR from the hybrid application, then (and only then) the Close close button or back button can optionally return the user to the 2D version of your application where they launched into VR.

There is a fix for it from Google and Epic here:

https://github.com/googlevr-unreal/UnrealEngine/issues/38#issuecomment-457787297
(make sure to link your Epic account to Github if you see a 404)

Unfortunately it’s not 100% perfect. Also vote for Epic to fix it in 4.22 here: