Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support Hololens 2 in DevicePortalPlatforms #300

Open
chris03 opened this issue Oct 8, 2019 · 0 comments
Open

Support Hololens 2 in DevicePortalPlatforms #300

chris03 opened this issue Oct 8, 2019 · 0 comments

Comments

@chris03
Copy link

chris03 commented Oct 8, 2019

With the Hololens 2, the api call: http://localhost:10080/api/os/info returns:

{
"ComputerName": "Hololens",
"Language": "en-US",
"OsEdition": "Holographic",
"OsEditionId": 136,
"OsVersion": "REDACTED",
"Platform": "HoloLens 2"
}

The issue is that DevicePortal.DevicePortalPlatforms is Unknown which causes Utilities.IsHoloLens(this.Platform, this.DeviceFamily) to return false and methods that should work (like TakeMrcPhotoAsync) will throw an Exception.

Could someone please add support for the Hololens 2 ?

Thanks

Edit:

As workaround I override the PlatformName:

var connection = new DefaultDevicePortalConnection("http://localhost:10080", "user", "pass");
var devicePortal = new DevicePortal(connection);

await devicePortal.ConnectAsync();

connection.OsInfo.GetType()
    .GetProperty("PlatformName")
    .SetValue(connection.OsInfo, "HoloLens");
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant