[TIMOB-19926] Windows: Support proximity sensor for Windows 10
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-06-30T06:32:12.000+0000 |
| Affected Version/s | Release 5.1.0 |
| Fix Version/s | Release 6.0.0 |
| Components | Windows |
| Labels | n/a |
| Reporter | Kota Iguchi |
| Assignee | Gary Mathews |
| Created | 2015-11-12T05:10:01.000+0000 |
| Updated | 2016-10-04T12:56:33.000+0000 |
Description
Support proximity sensor.
Ti.App.proximityState, Ti.App.proximityDetection and Ti.App proximity event. Maybe Windows::Networking::Proximity package does the sensor work.
*Test Case*
var win = Ti.UI.createWindow({ backgroundColor: 'red' });
Ti.App.addEventListener('proximity', function (e) {
win.setBackgroundColor(e.state ? 'green' : 'red');
});
Ti.App.setProximityDetection(true);
win.open();
<windows>
<manifest>
<Capabilities>
...
<DeviceCapability Name="proximity" />
...
</Capabilities>
</manifest>
</windows>
master: https://github.com/appcelerator/titanium_mobile_windows/pull/755
Verified using: Windows 10 Pro Appc core: 6.0.0-55 Appc NPM: 4.2.8-7 Ti SDK: 6.0.0.v20161002235150 Lumia 550 10.0 Proximity sensor works as expected Closing ticket