AR-js-org/AR.js

[solved] GPS AR ok in Android Firefox , coordinates not passing in anywhere else in Android and iOS browsers

herrpedro opened this issue ยท 9 comments

Do you want to request a feature or report a bug? -> bug, I hope.

https://gitter.im/AR-js returns http404

What is the current behavior?
https://panoramapalace.com/preview/mindar/quiztest.html works on firefox android , shows the ARcontent but camera is white in firefox iOS , camera works but does not show AR contente at all

If the current behavior is a bug, please provide the steps to reproduce.
added simulateLatitude and simulateLongitude to help.
just open the link with some browser. It asks for permitions and then nothing happens.
all the code is there in quiztest.html , I did not add server side yet till i get this stable

Please mention other relevant information such as the browser version, Operating System and Device Name
Android and iOS devices

What is the expected behavior?
i'd like this to work cross browser.
screenshots of some browsers and a screencast of firefox android working here -> https://drive.google.com/drive/folders/1_g7ZKaiuxYsGdOLzM_ZU21IXgeZ3PMDL?usp=sharing

Thank you for your help and work.

If this is a feature request, what is motivation or use case for changing the behavior?

just opened quiztest.html (it has simulateLatitude and simulateLongitude) in chrome with GPS off and my "Ar boxes" show.
quiz.html , which has not simulatedLat and Lon, does not work.

further testing in iOS reveals that if simulateLatitude and simulateLongitude is present all works in all browsers.
Same for Android

thank you

spent the whole day thinking about this and the presence of "simulate" so I added a
a-entity gps-new-entity-place="latitude: 0; longitude:0" position="0 10 0"
and it showed above me (because of position 10) in android Chorme (s22ultra)
I (or the lib) must be missing something to pass the gps data to the framework

thanks

Have you looked at this bug?. If that doesn't help, try logging and changing bits and pieces in aframe/src/new-location-based/gps-new-camera.js

I'v ran the samples with js code from internet and from the samples and always without sucess in android chrome, for example
the only way to work in all browsers is with simulated coordinates
Thank you for your insight

Tried project wizard from AR-js
overcome the warning of "don't get gps coordinates before user interaction" but... this just won't work
Does anyone have a combination of versions that work for location AR in chrome?
I'm using plain js but I can use some other thing if needed

Thank you all

@nickw1
hi nick, this is my bug, i just tested the other solution you gave on the other one but then all my comments there would be unrelated and highjacking the other issue

about the links you provided
https://github.com/AR-js-org/AR.js/tree/master/aframe/examples/new-location-based/poi
works great in firefox and shows nothing in chrome

https://github.com/AR-js-org/AR.js/tree/master/aframe/examples/new-location-based/basic-js
removed the alert about gps and i open the page with gps enabled

  • when i open in ffox i get an imediate warning about "got first GPS position -> " and it adds the cubes and i do not need to touch anywhere. it just works.
  • when i open in chrome nothing happens. Then i click on the Go and it adds the coordinates i gave to the simulateLatitude and simulateLongitude, it shows the warning about the "got first GPS position -> " but it never goes to my real location as ffox does

Android chrome is now working as it should and always did
I ended up by coding some javascript for debugging and foud out the coordinates of my device were way of and found accuracy was 2km
There is a setting in my android phone the makes high accuracy available for each app and it was disabled for chrome and enabled for firefox.

That's why nothing was showing to me
WhatsApp Image 2023-08-20 at 19 00 14

Still.. "brave" browser is not working yet but may be it just takes some time... didn't go and check "can i use" things for him

Thank you @Platform-Group and @nickw1 .
Hope this thread helps someone.

nickw1 commented

@herrpedro glad you got it working! Thanks for sharing your experiences.