[TIMOB-10419] Android: Add API for supporting the Android Proximity Sensor functions
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-04-18T23:23:10.000+0000 |
Affected Version/s | Release 2.1.1 |
Fix Version/s | 2014 Sprint 08, 2014 Sprint 08 SDK, Release 3.3.0 |
Components | Android |
Labels | api, module_api, parity, qe-testadded |
Reporter | Federico Casali |
Assignee | Sunila |
Created | 2012-06-24T14:57:45.000+0000 |
Updated | 2014-04-23T23:29:34.000+0000 |
Description
Customer is asking for being able to use proximity sensor functions for Android.
Proximity Sensor API are currently available for iOS only: http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.App-property-proximityDetection
Hi Eric, I'm moving your request to TiMob feature request section of Jira.
Added support for proximity sensor https://github.com/appcelerator/titanium_mobile/pull/5341
Test case Bring the phone near to the ear, the proximity value will change and event is fired. var win = Titanium.UI.createWindow({ backgroundColor:'#fff' }); Ti.App.proximityDetection=true; Ti.App.addEventListener('proximity', function(e) { Ti.API.info("Proximity = " + e.state); }); Ti.API.info("Proximity State = " + Ti.App.proximityState); win.open();