Hi,
Is there a way to change what the messaging says when the user clicks on a button that Lanches an external URL or phone number?
Hi,
Is there a way to change what the messaging says when the user clicks on a button that Lanches an external URL or phone number?
Are you talking about the sub symbol buttons in zapworks?
Steve
Hi @paula.clark!
Do you mean during a WebAR experience? If so there currently isnāt a way but weād love to hear the sort of things you might want to say in this dialog
Cheers,
Connell
@connell Yes in WebAR when you redirect to a URL or phone number, this message pops up:
I have it going to a USSD code and some devices ask what program you want to open with. Was thinking it could rather say something about it dailing a number or something else that would make the user realise to open a keypad and not a browser.
Hi, is there currently a solution to this? Would love to be able to change āLaunch External Websiteā to custom text such as āAdd Event to Calendarā etc.
This is an interesting problem. I can understand the logic behind requesting confirmation from the user before jumping to another website, but I donāt think itās necessary. It feels old fashioned and a little overprotective.
From my [clientās] point of view, itās additional friction that we just donāt want: if a user has tapped on our call to action button - āBuy now!ā - we just want them to be taken to the URL without any additional confirmation, in the same way they would if they clicked a button on an ordinary web page.
The OSes, Android and Safari, have their own safeguards to ensure a clicked link, a jump to a URL (which could be a mailto: or a phone: link too), wonāt perform a dangerous action.
I suspect that at some point there may have been concern that āthe user is on a Zap branded experience, so we need to be clear theyāre leaving our domain, and what follows is out of our [Zapās] controlā - hence this confirmation box. Itās a Zap policy rather than something required by the OS, though.
It does feel overprotective and unnecessary. Iād vote to make this confirmation dialog an option we can switch off. WebAR is web. WebAR links should act like any other web link a user may encounter.
There are good reasons a Zap developer may want to seek confirmation before leaving the AR experience ā make sure it wasnāt an inadvertent tap ā but that should be up to the individual developer.
Ideally, then:
just my 2 cents ĀÆ\
(ć)/ĀÆ
Need to bump this. That āOpen external linkā confirmation dialog is an unnecessary point of friction and needs to be removed, or at the very least, made an option.
It breaks our AR experience (weāre syncing stuff to audio, and if you tap a link but then cancel, the audio sync gets broken. I may be able to work round it, but thatās not the point).
Itās something other apps / web experiences donāt do. It looks wrong, and itās overprotective to the point of being annoying. Itās likely to have an impact on our conversion rates - not because weāre tricking people into going to a page they wouldnāt want to visit (after all, they can hit āBackā in their browser if they want) - but because it presents the user with an unnecessary question they have to think about.
Mostly it just seems nanny-ish.
But also itās an ugly and uninformative dialog.
Please remove it - or give us the option to turn it off.
(rant over) ; )
Hey Howard!
Some great points there indeed. Let me chat to the team and see if thereās a technical reason behind why we have this modal appear.
Iāll also see if itās feasible to have the option to remove it.
Iāll note the response on this thread.
George
I know the reason the modal exists, although itās a bit technical, so bear with me. Behind the scenes, Zappar must use the available web apis to do anything. Specifically, to open a new tab/window it likely uses window.open.
So what? The thing is, to use window.open, it requires a user gesture. For example, a click. If there is no click, window.open is blocked.
Now you might be thinking, ābut I use launchURL after the user taps on a button!ā. Right. The problem is, the click that you use in Zappar does not reach the DOM where the application resides. Your code in Zapworks Studio resides in a sandboxed iframe, and you canāt communicate with the parent. I know, because Iāve tried. This is very likely for security reasons. For the DOM, the click never happened.
Since your click never reaches the DOM directly, Zappar implemented the modal, that actually communicates with the DOM for the sole purpose of opening a new tab.
So long as the app resides in a sandboxed iframe for isolation and security, to disallow users to potentially do nasty stuff, and also to constrain the user to only use Zapworksā api, the modal is necessary.
Ideally, Zappar could at least relax some restrictions on the sandbox. Using allow-top-navigation, or allow-popups. With this youād be able to open a URL without the modal, by talking with the DOM directly. Not sure about the security implications though.
Then youād be able to have code like this in Studio:
declare const document; //document and window exists but Zapworks thinks not, so the declare const is necessary
declare const window;
symbol.nodes.Plane.on("pointerdown", (e) => {//call on pointerdown so the click reaches the document on pointerup
document.documentElement.addEventListener('pointerup', function () {
window.open("www.google.com");
}, { once: true });
});
Thanks for that @marks ā thatās fascinating. Explains the background really well.
It does still leave us with the top level problem of how to deal with it.
I suppose the first step is to identify what the potential security issues could be. The sandbox disallowing users from potentially doing nasty stuff - what kind of nasty stuff would actually be possible? The pipeline from authoring tool to delivery is pretty tightly controlled by Zap. Can you think of any examples of things the sandbox is protecting visitors from?
@George - if you can ask your devs to look into this, thatād be super. The thing I need to be able to handle is the argument that āother websites / online 3D experiences donāt seem to need this, so why have you chosen an AR system that does?ā. Iāve done a fair bit of work getting to know Zapās solution, so I really donāt want to have to throw all that learning away ā but itās hard for me to argue with the business-needs / friction / conversion rate stuff, as ultimately thatās what keeps me fed.
I suppose the first step is to identify what the potential security issues could be. The sandbox disallowing users from potentially doing nasty stuff - what kind of nasty stuff would actually be possible? The pipeline from authoring tool to delivery is pretty tightly controlled by Zap. Can you think of any examples of things the sandbox is protecting visitors from?
I donāt actually know of potential security issues. I do know that the sandbox exists for this reason, and also isolation. It could be that Zappar just wants the sandbox for the isolation aspect. They might not want us to have access to the web apis ourselves, and only let Studio handle it.
They have UniversalAR if what Studio offers isnāt enough. You can do what you want using UAR. Although I do understand your point of view of having to forget about Zapworks Studio and having to learn UAR + another framework. This happened to me very recently. If I had access to the web apis myself, I wouldnāt have needed to move to UAR. In the end, it could be their goal to deprecate Studio in the long term and only support UAR for its flexibility. In this case, allowing more flexibility for Studio wouldnāt make sense. But I hope Iām wrong since I love Studio and find it much easier to work with.
Yep. It could be that the sandbox is there to protect the browser from issues with Zap itself. Iāve managed to get multiple image-tracking to work, but itās ā¦ a little memory-leaky ā probably my fault, this aināt my usual department ā but I can certainly crash my phone with ease. Zap have that tricky balance to maintain of giving us enough power to satisfy us while also limiting the fallout when an idiot (me) is allowed to play with it.
Right now weāre just testing the waters with AR, so we have that other tricky balance of trying to invest just enough time/effort into this first project to give us a genuine feel for its potential business case, without just doing something half-arsed and not really giving AR a genuine chance.
I do see PlayCanvas as a next step after Zap Studio, though; means I can carry on using Zapās tracking, which seems to be pretty good, but itāll relieve some of the irritations with the Studio as an IDE. Because itās a pretty crazy IDE. So many peculiar quirks and weirdnesses, so many holes; but at the same time, its lowered the barrier to entry to a level Iāve been able to accomplish way more than I would have done without it.
Have to be careful that while moaning I donāt give the impression that Iām not blown away with what Zap have accomplished with WebAR and Studio. I am. Tbh thatās the reason I moan - if Zap was awful thereād be no point
I do see PlayCanvas as a next step after Zap Studio, though; means I can carry on using Zapās tracking, which seems to be pretty good, but itāll relieve some of the irritations with the Studio as an IDE. Because itās a pretty crazy IDE. So many peculiar quirks and weirdnesses, so many holes; but at the same time, its lowered the barrier to entry to a level Iāve been able to accomplish way more than I would have done without it.
Yep learning PlayCanvas at the moment. Itās a great IDE. Itās basically Unity for the Web. Once it has timeline support, bezier curves, and constraints, I think it will be on par with Zapworks Studio and be a worthy replacement. Unity technically is a great replacement for Studio in terms of functionality, but I donāt use it because my clients wonāt allow it. Itās too heavy, takes too long to load and lags on older phones, and consumes too much memory.
PlayCanvas offers almost all of the flexibility Studio offers with none of the constraints.
Hi both!
Thanks for your excellent analysis @marks and great discussion @howiemnet .
Youāre right that we need a user gesture event in order to use window.open
- without that the browsers block the request to open a new tab unfortunately. Itās not quite due to the sandbox however - the reason is that when the user taps on the 3D view (where we render the content) the events are placed in a queue thatās handled during our render loop. This is relatively standard practice for a 3D engine, but obviously not for the web. It means that when the taps are eventually processed, weāre no longer in a āuser gesture eventā and so any actions we take that require one would fail at this point. Hence the popup .
That said we have two potential ways forward:
(Z.device as any).launchWebFrame("https://[site]", res => {
console.log("The user has closed the frame");
});
Let me know your thoughts!
That pop-up web-frame is intriguing. Interestingly, Iād had it left open for a while just now; just a few minutes, and then hit the āxā to close it, and the browser asked for camera access again (!) (iOS 15.2b3). Iāll test it with our ticketing platform, though realistically once a user has decided to express an interest and tap through, we donāt really want to leave them with the AR experience running in the background.
Hmmm. I wonder what happens if that URL contains a redirect.
The second option you mention, though, thatās really the thing we need. Just a way to take the visitor to our tickets site. No need for it to be a new tab; the AR experience needs to act as much like a normal webpage - you click a link and it just takes you to the place. Donāt want to litter the visitorās browser with extra tabs.
Thanks for looking at this, @connell - ultimately providing the best visitor experience is key to success; we obviously donāt want to arbitrarily try and bypass the things Zap and the browser do to protect the user. I for one am extremely grateful that my browser stops sites popping up extra tabs or windows willy-nilly
If there is a way to bypass the popup and direct the browser straight to a URL, in that same tab the AR experience was in, thatād be grand. Perfect UX.
Tbh - and kinda thinking out loud here - even a ātap anywhere on the frame to go to a URLā approach would work for us; we need zero user input/interactivity beyond some way for them to say theyāre interested in our offering. So if there could be a way to set an option in our AR project - 'full screen override, treat any tap anywhere as a web link" - as long as we can script the destination URL (which in our case we derive from the queryString).
It may seem like a sledgehammer approach, but if it bypasses the technical difficulties, itād solve the problem, at least for us. And it neednāt present as an unexpected behaviour to the visitor if we state it - āTap anywhere to buy tickets!ā. Bottom line is itās our name/brand on the screen, not yours - so itād be in our interest to make sure the userās experience was a positive one. Everyone wins!
Gosh, Iāve just re-read what you said - without the user gesture event, the browser blocks new tabs from opening. I hadnāt even noticed that that was what was happening.
We donāt need nor want a new tab - we want the experience to end, and to take the visitor to the next thing. Donāt want to litter the browser. They can always click ābackā if they want to - the more the AR experience acts like any other well-behaved webpage - albeit 3D and shiny - the better.
I can understand some AR experiences wanting to let you pop a new tab up for things, with the idea that youād return to the experience later, but Iād be willing to bet theyāre in the minority: surely most AR experiences are considered finished/complete once they send you off to another webpage.
Maybe we should have a vote. All in favour of defaulting to using the same tab for AR links?
<-- thereās mine ; )
We have an experimental new API for a āweb frameā.
I like this, very cool.
We could look at providing an option that bypasses the popup but navigates the whole page to the URL (rather than opening in a new tab). I donāt think we have this at the moment but itās defintiely plausible to implement.
Another good option. But I never had a client ask me this. They always want a new tab, not to exit the ar experience to open another page.
Itās not quite due to the sandbox however - the reason is that when the user taps on the 3D view (where we render the content) the events are placed in a queue thatās handled during our render loop.
Interesting to know. However the sandbox does prevent me from doing stuff that Iād be able to normally.
I use the kind of code below to communicate Unity with a WebGL plugin. I canāt do the same with Zapworks Studio because I get an iframe sandbox error. Do you think you could lift some restrictions on the sandbox to allow the programmers to access the underlying web apis? With this Iād be able to access the gyroscope, accelerometer, etc. Itād give a bit more power to us.
declare const document; //document and window exists but Zapworks thinks not, so the declare const is necessary
declare const window;
symbol.nodes.Plane.on("pointerdown", (e) => {//call on pointerdown so the click reaches the document on pointerup
document.documentElement.addEventListener('pointerup', function () {
window.open("www.google.com");
}, { once: true });
});
WOW!! Love this @connell
So testing the code on beta.zappar.app with Zappar.com as the site I get a error of www.zappar.ceom refused to connect.
I know itās experimental but I would love to play more with it. I have big plans for it!!
Steve
Ahh. Itās going to be use-case dependent, of course. (Look at me, only thinking about my needsā¦ ) So the best option would probably be to keep launchURL() defaulting to current behaviour, but add an option to bypass the modal dialog and re-use the current tab for those AR experiences it makes sense for.
@stevesanerd - the popup iframe worked perfectly here, loading the target site in a closeable frame over the top of the AR thing - I wonder what went wrong. Itās not what we need for our experience right now, but I can see it being a really valuable feature.