Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2020-10

proximity sensor on Android device access plea

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mgr. Janusz Chmiel

How complex would be to add special unit, wich would allow WEB apps, which have been compiled by using Pas2js to access some of build in Android device sensors such as proximity sensor, lightning sensor, Giroscope, ETC?

Perhaps it would be even possible to access some APIS to manage audio recording by using Microphone, access location, etc. But I Will understand, if it would be too complex to develop such routines. Because I know, that everyone who would want to include such routines must develop them totally from scratch. That it is not possible to inject some code from commercial units.
I also know, that many modern browsers have build in permissions controlling routines, so if some code want to access camera, microphoneor other devices, which can bring security issues, browser display confirmation dialog. So those techniques could be legally used.
Thank you very much for yours answer.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20201016/643657dd/attachment.htm>

Reply by email

Michael Van Canneyt
to Mgr. Janusz Chmiel
Mgr. Janusz Chmiel wrote 15 lines
How complex would be to add special unit, wich would allow WEB apps, which have been compiled by using Pas2js to access some of build in Android device sensors such as proximity sensor, lightning sensor, Giroscope, ETC? Perhaps it would be even possible to access some APIS to manage audio recording by using Microphone, access location, etc. But I Will understand, if it would be too complex to develop such routines. Because I know, that everyone who would want to include such routines must develop them totally from scratch. That it is not possible to inject some code from commercial units. I also know, that many modern browsers have build in permissions controlling routines, so if some code want to access camera, microphoneor other devices, which can bring security issues, browser display confirmation dialog. So those techniques could be legally used. Thank you very much for yours answer.

You can control the camera/Microphone, this is supported by the web unit. see the opentok, kurento or jitsi demos.

For proximity sensor and other devices: these are not accessible by the browser unless it runs in a controlled environment such as provided by Apache cordova, in such environment cordova provides an API to access these devices.

Michael.

Reply by email