Skip to content

Instantly share code, notes, and snippets.

@bhouston
Created May 20, 2021 19:11
Show Gist options
  • Save bhouston/0bf60b396e147e7e39eb8169921f4fe4 to your computer and use it in GitHub Desktop.
Save bhouston/0bf60b396e147e7e39eb8169921f4fe4 to your computer and use it in GitHub Desktop.
Reproduction of unreliable AR intents for SceneViewer on Android - 2021-05-20
<input type="text" id="modelUrl" style="width:100%" value="http://exocortex.github.io/glb-crash/icosphere.glb">
<br>
<a id="link"></a>
<script>
function setUrl(url) {
link.innerHTML = url;
link.href = `intent://arvr.google.com/scene-viewer/1.0?enable_vertical_placement=true&file=${escape(url)}&mode=ar_only&resizable=false&title=AR#Intent;scheme=https;package=com.google.ar.core;action=android.intent.action.VIEW;end`
}
modelUrl.onchange = function() {
setUrl(modelUrl.value);
}
modelUrl.onchange();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment