I want to write mobile application use the mobile resources as camera and GPS,
Can Anvil calls the mobile android API functions even using JScript modules.
I want to write mobile application use the mobile resources as camera and GPS,
Can Anvil calls the mobile android API functions even using JScript modules.
For camera and GPS, there is support on browsers as well
Your friend here is the anvil.js.window
module. For ex.
from anvil.js import window
window.navigator.geolocation.getCurrentPosition(showPosition);
If you want to access API functionalities that are not available on the browser and require deeper interactions with the device, just stay tuned because I might be working on a demo for that too . I will be sharing it soon on the forum.
I would note that the application will be able to access the camera in the browser, but for IOS, not yet tested on android, the permissions change and the getUserMedia() will not work to take video/pictures, without the fileuploader component.
see the below link for more details and examples:
Using anvil.js.window
for GPS and camera access sounds really useful. I’ll wait for the demo you mentioned—it’ll be great to see how to do more with mobile devices.
This was the demo