Been testing it this morning. This is ace.
It introduces some interesting new behaviours that are worth being aware of if you use this new feature:
Delay & user feedback
When a user taps your button to go to the target website (or however they do it), there’s a delay of a second or two while the browser sends the request and waits for the target website to respond. This delay is normal on the web; we’re used to those little delays - but if you have audio and/or animations going on in your AR experience, they will carry on playing while the target page loads. This delay makes it seem like the user’s tap was ignored.
I’d say it’s essential that you give the user some feedback to let them know something’s happening: changing text or colour of the button, stopping the audio etc. Exactly what feedback you provide will depend on the context, on your particular AR experience, but you probably do need to let the user know their interaction has been received.
This wasn’t an issue before, as that modal “Launch External Site” dialog was instant and provided the necessary feedback to the user.
Back button behaviour
After a user has tapped on a button in AR and been taken to the destination URL, they now have a brand new possibility: hitting the Back button in the browser to return to the AR experience in the same tab.
Before, when URLs were launched in a new tab, they had the option to close the new tab and return to the tab with the AR experience on it - which is subtly different: they’d be returned to that “Launch External Website” modal, with the AR paused and blurred in the background. Hitting the ‘X’ would unpause the AR and it’d carry on going as usual.
With the new launchUrl "navigate"
parm, they can hit “Back” instead, and the behaviours on iOS and Android are different:
iOS: The AR experience carries on playing any animations and sound; interactive elements still work, but tracking is frozen. Whatever frame the camera feed was showing when they left AR will stay frozen in view, with any tracked AR elements locked to it. iOS/Safari seems to be trying to return you to exactly where you were—in whatever state the AR experience was in—but it’s now lost permission to use the camera/gyro, hence the frozen feed. Refreshing the page resets things, as you’d expect.
Android: The AR experience resets back to the “Launch >” splash screen.
If a reasonable quantity of time has passed before the user hits “Back”, or if they navigate through several more pages and then return all the way back to the AR, I suspect iOS will have dumped the tab’s state and will have to reload it, behaving more like Android.
Arguably the Android experience is slightly better, but neither experience is a show-stopper.
I’m going to look into whether it’s possible to execute code after a return from the launchUrl - I’m guessing that you could, say, follow the launchUrl call with some code to either reset the experience, or pop up a “Reload the page!” message. Need to see what happens; need to see when it executes, and how the behaviour differs with and without this new parm.
More news as and when. It’s fun out here on the bleeding edge, innit : )