Skip to content

Unable to get geolocation demo app to work (Android) #16

@nickw1

Description

@nickw1

Steps to Reproduce

  1. Clone repo, add a fake lat and lon to the geolocation example app, and build
  2. Serve the built geolocation example app with an HTTP server from the build directory

OR

  1. Build the geolocation example app (with fake lat/lon) as a standalone app, by installing @omnidotdev/rdk version 0.2 from NPM.

OR

Either of the above in dev mode.

Expected Behavior

Demo should have worked.

Actual Behavior

Both methods produce the same result, this error occurs:

Internal error: no requestPermission() found although requestOrientationPermissions() was called - please raise an issue on GitHub (code LOCAR_DEVICE_ORIENTATION_INTERNAL_ERROR)

This is an error from LocAR.js related to requesting permissions. It's only supposed to be called on iOS (once the initial gesture has been made by the user) but is being called on Android. This error does not occur with standalone LocAR.js.

Environment

Android 13 on a Pixel 3, testing via the Chrome Developer Tools on a host Linux machine.
Using bun and vite

Additional Notes/Screenshots

I'm the main developer of LocAR.js as you know, but just wonder if it works for you. If there is a bug I am happy to help fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions