04-04-2011 04:56 AM
I am developing a VOIP application that will allow user to make calls over their WiFi connection, and this application can be run on touch-enabled devices.
One of my development handsets is a Torch 9800 running OS 6. It seems that the proximity sensor is only enabled when the native phone app is running. When I am making VOIP calls using my application, the proximity sensor is not enabled, which leads to accidental UI interaction when the phone is held to the ear.
What I would like to do is to enable the proximity sensor when my application is running, but I can find no such API. Is there any way of achieving this?
Solved! Go to Solution.
04-04-2011 10:03 AM
Not that I am aware. If you do a search, you are the only one who has asked this so far and I don't remember it being mentioned at any point for later implementation.
05-03-2011 05:08 AM
I would be interested in this issue as well as i have a call control application that faces similar issues, the proximity sensor only works with the native phone screen.
05-05-2011 02:55 PM
No, there is no third party API for this.
09-21-2011 06:44 AM
It turns out that there is an API for the proximity sensor, although it wasn't easy to find! It's been there since OS6 - I've got it working on a Bold 9900 running OS7. Here's the code to enable the proximity sensor for your app:
final InputSettings proximitySettings = TouchscreenSettings.createEmptySet(); proximitySettings.set(TouchscreenSettings.DETECT_F
ACE_PROXIMITY, 1); //1=enabled app.getUiEngineInstance().addInputSettings(proximi tySettings);
Link to javadocs:
09-21-2011 06:53 AM