How to Customize the Motion Sensor and Camera Permissions Dialog


#1

Hi,
Right now, I’m testing the image tracking feature in UniversalAR + A-Frame.

I want to change the message and button labels in the dialog that appears when I start the application. I am using it in Japan, so I need to change it to Japanese.


I also want the program to detect when the button on the dialog is pressed.
I want to perform additional processing after the button is pressed.

Best regards.

Sadao Tokuyama
tokuyama@1planet.co.jp
https://1planet.co.jp/


Set your browser to request the mobile version of the site and reload the page to enjoy immersive mode
#2

Hi @tokuyama,

The first image is an A-Frame specific permissions request, you can learn more about customizing that here - https://aframe.io/docs/1.2.0/components/device-orientation-permission-ui.html

Please note, the Zappar request will ask for motion sensors, so you can remove the A-Frame request entirely.


The second is Zappar specific. You can remove this permission request by commenting out:

<!-- Ask user for camera permissions, display some text if permission is denied -->
<a-entity zappar-permissions-ui id="permissions">
    <!-- Remove the text entity to use Zappar's default permission denied UI -->
    <a-entity text="value: Please reload the page, accepting the camera permissions." position="0 0 -2"></a-entity>
</a-entity>

You’ll then have to develop your own permission request dialog in place of this to access the camera, motion sensors and gyro permissions.

George


#3

Hi @George
Thanks for the reply.

You’ll then have to develop your own permission request dialog in place of this to access the camera, motion sensors and gyro permissions.

How do you create that unique dialog?
I just want to have a way to display the permissions dialog in Japanese and get the button click events in the dialog for running the image tracking app.