Skipping the DON flow via the Daydream developer options causes WebVR's vrdisplayactivate event to fire an extra time. This results in the following behavior:
- requestPresent called manually, DON flow completed: no event fired
- requestPresent called manually, DON flow skipped: one event fired
- NFC scanned, DON flow completed: one event fired
- NFC scanned, DON flow skipped: two events fired
This doesn't affect our ability to test, as we can wait for a certain number of events to fire before continuing. However, it would be preferable for DON flow completion and skipping to have the same behavior. I'm not sure if this is a bug with Chrome or with Daydream - if it turns out to be the latter, we can pass this off to them.
This can be reproduced by visiting https://webvr.info/samples/03-vr-presentation.html , inspecting the tab with developer tools, and running
window.addEventListener('vrdisplayactivate', () => {console.error("vrdisplayactivate fired");}, false);
in the console. Then, entering VR with or without DON flow skipping enabled will yield different numbers of console logs.
Comment 1 by shaobo....@intel.com
, Dec 28 2016Some further investigation. When DON flow skipped, in NFC scanned scene, VrShellDelegate.java: enterVRFromIntent will be called twice, with intent content {com.google.intent.category.DAYDREAM}, But when DON flow completed, it will be called only once.