google-ar / arcore-android-sdk

ARCore SDK for Android Studio
https://developers.google.com/ar
Other
4.97k stars 1.22k forks source link

AR sessions opens and closes immediately on using blob URL as flie in AR Intent #1297

Open optimus007 opened 3 years ago

optimus007 commented 3 years ago

SPECIFIC ISSUE ENCOUNTERED

after making a glb or gltf file using three js gltfExporter

and the resulting buffer is converted to blob using blob = new Blob([buffer], { type: 'application/octet-stream' })

then URL is made using let blobUrl = URL.createObjectURL(blob)

and finally the intent URL

   link.href = `intent://arvr.google.com/scene-viewer/1.0?file=${blobUrl}#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=https://developers.google.com/ar;end;`

example

  intent://arvr.google.com/scene-viewer/1.1?file=blob%3Ahttp%3A%2F%2F127.0.0.1%3A5500%2F66b63935-7600-42cb-b54e-85bb4f8094d8&mode=ar_only&link=https%3A%2F%2Fwww.google.com%2F#Intent;scheme=https;package=com.google.ar.core;action=android.intent.action.VIEW;S.browser_fallback_url=https://www.google.com/;end

clicking this opens and closes the AR session immediately without any errors

live example : click the start AR button on chrome on mobile export file for the glb or gltf file example AR to start a ar session from glb url https://codepen.io/optimus007-the-looper/pen/QWMwKbB

VERSIONS USED

pawel-marciniak commented 2 years ago

Hi @optimus007 , did you find some solution for this? Is AR explicit intent even supports Blob?

optimus007 commented 2 years ago

Hi @optimus007 , did you find some solution for this? Is AR explicit intent even supports Blob?

Nope... Only works with real URLs

You could use webXR but it's bare bones and not as stable

pawel-marciniak commented 2 years ago

@optimus007 ohh, it's a shame, QuickLook on iOS works with Blobs :/ Thanks for answer anyway :)

optimus007 commented 2 years ago

@optimus007 ohh, it's a shame, QuickLook on iOS works with Blobs :/ Thanks for answer anyway :)

Exactly... Google is pretty bad at staying up to date with the latest/common stuff... Hope khronos group can help out or take over

Gltf format has become quite amazing

Patrick-van-Halm-360Fabriek commented 7 months ago

Will there ever be support for ObjectURL's and Blobs within ARCore?