Search code examples
javascriptarcore

Using ARCore intent with signedURL as file parameter


When trying ARCore intent with a gob file it works for files available in a GitHub repo, but not with a signedURL to download a GLB file.

I tried passing the signedURL as the file parameter, but it always returns an error in my Android smartphone.

The intent is like the one below:

intent://arvr.google.com/scene-viewer/1.0?file=https://cdn.us.oss.api.autodesk.com/com.autodesk.oss-persistent/us-east-1/22/e3/6c/f1bca4ba5ec7a29e5fceb4d0d204daf109/jpomglbardample?response-content-type=application%2Foctet-stream&response-content-disposition=attachment%3B+filename%3D%22Hand_Router.glb%22&Expires=1694307153&Signature=W25z4iZg52j5lngLd7spR57dT-78tYsVpcAK~nonfDMhpe82u~qWRgo~uCMjdIdkFKBWZ7CsZqsYQB4XdF2Tr-l7mPbCuCSHCVFcfbUBhLtOgTkrwLcJ~0B5j8yy~t8vjusnYp1tlH2WssYvSqYGMGbptnsfPQAvj2mO43FKppTZeBl-QmxuKBEYxzwDGAG1B7S5t4LryiFfw~Sj99DIaJPs4Ro~tUtYc--1ScIhA4AGrrJUWc57z0s7InFTsSNQEwgJ9tQr~XTle13QfLa6XfqvbhhIN8cx2vLqCFr2VGtB2GDjJ1zBYo57k5o0MLRdtXhQNReC2p~hFcABmK5VEw__&Key-Pair-Id=K5HRZD7MMO1U9&mode=ar_only#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=https://developers.google.com/ar;end;

Solution

  • It was due to parameters in the signed URL. Using encodeURIComponent() solved, as described at What is the recommended way to pass urls as url parameters?