Control proximity sensor and screen intensity.

7 views
Skip to first unread message

rdvg...@gmail.com

unread,
Nov 1, 2018, 2:29:42 PM11/1/18
to CodenameOne Discussions
Hi,

I need to make an app that detects when a child is placed very close to a device and lower the brightness of the screen according to the distance that is. Is there a way to control the proximity sensor and the brightness of the screen in Codename One?

I would appreciate the information.

regards

Shai Almog

unread,
Nov 1, 2018, 11:49:00 PM11/1/18
to CodenameOne Discussions
Hi,
we don't have this built in. You can use the sensors cn1lib https://github.com/chen-fishbein/sensors-codenameone/ as a starting point and probably implement a brightness control similarly using a native interface.
Reply all
Reply to author
Forward
0 new messages