Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25015] Windows: Allow a user to check the Windows 10 Device Family

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusResolved
ResolutionWon't Do
Resolution Date2017-10-25T05:48:14.000+0000
Affected Version/sRelease 6.1.1
Fix Version/sn/a
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-07-24T11:58:09.000+0000
Updated2017-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 like Ti.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

Comments

  1. Ewan Harris 2017-07-25

    I wrote a small Hyperloop based module that provides this functionality https://github.com/ewanharris/ti.windows.utilities
  2. Kota Iguchi 2017-10-19

    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.
  3. Kota Iguchi 2017-10-25

    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.

JSON Source