[Pas2js] proximity sensor on Android device access plea
Michael Van Canneyt
michael at freepascal.org
Fri Oct 16 12:52:38 CEST 2020
On Fri, 16 Oct 2020, Mgr. Janusz Chmiel wrote:
> 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.
More information about the Pas2js
mailing list