[TIMOB-25015] Windows: Allow a user to check the Windows 10 Device Family
| GitHub Issue | n/a | 
|---|---|
| Type | New Feature | 
| Priority | Low | 
| Status | Resolved | 
| Resolution | Won't Do | 
| Resolution Date | 2017-10-25T05:48:14.000+0000 | 
| Affected Version/s | Release 6.1.1 | 
| Fix Version/s | n/a | 
| Components | Windows | 
| Labels | n/a | 
| Reporter | Ewan Harris | 
| Assignee | Kota Iguchi | 
| Created | 2017-07-24T11:58:09.000+0000 | 
| Updated | 2017-10-25T05:48:14.000+0000 | 
Description
Description
This is mainly for the test suites but it seems like something that might be seen as nice from a users standpoint too. (Although in reality on UWP a developer should not be tying features to a device family but using the detecting API contracts https://blogs.windows.com/buildingapps/2015/09/15/dynamically-detecting-features-with-api-contracts-10-by-10/, which maybe we should also have an API for?) Basically in the tests we have to skip some tests on a device family because they prompt, Geolocation primarily, currently this is skipped on emulator easily by checking the model but a device is harder to check. We could skip both in one go by doing a check likeTi.App.Windows.deviceFamily() === 'Windows.Mobile'
There is some demo code on how to do this here https://gist.github.com/wagonli/40d8a31bd0d6f0dd7a5d  but note that it looks the DeviceFamily prop isn't documented https://docs.microsoft.com/en-us/uwp/api/windows.system.profile.analyticsinfo
Personally I'm not sure whether this should be in core, maybe in a native module or HL module
I wrote a small Hyperloop based module that provides this functionality https://github.com/ewanharris/ti.windows.utilities
Nice, but I would think we should leverage Hyperloop in this case like you do in your module. I tend to think that we want to leverage Hyperloop more whenever possible rather than adding new features in Titanium API.
I think this has to be done with Hyperloop. I would think we want to leverage Hyperloop whenever it can rather than adding new feature in Titanium API.