Ansight.Pairing
0.1.0-preview.19
dotnet add package Ansight.Pairing --version 0.1.0-preview.19
NuGet\Install-Package Ansight.Pairing -Version 0.1.0-preview.19
<PackageReference Include="Ansight.Pairing" Version="0.1.0-preview.19" />
<PackageVersion Include="Ansight.Pairing" Version="0.1.0-preview.19" />
<PackageReference Include="Ansight.Pairing" />
paket add Ansight.Pairing --version 0.1.0-preview.19
#r "nuget: Ansight.Pairing, 0.1.0-preview.19"
#:package Ansight.Pairing@0.1.0-preview.19
#addin nuget:?package=Ansight.Pairing&version=0.1.0-preview.19&prerelease
#tool nuget:?package=Ansight.Pairing&version=0.1.0-preview.19&prerelease
Ansight.Pairing
Ansight.Pairing adds package-owned native pairing acquisition to Ansight.Core.
It provides:
- native QR scanning for
HostConnectionRequest.QrCode(...) - Android scanner acquisition via the current
Activityand native Apple modal presentation - a default
IHostConnectionConfigReaderwired into the existing runtime-owned host connection flow
Developer pairing is generated by Ansight.Core. Enable AnsightDeveloperPairingEnabled in the app project, then configure WithBundledHostConnection(...); Ansight.Pairing only adds the native QR acquisition path used by explicit overrides.
The Ansight and Ansight.Maui all-in-one packages include this package where supported.
License
The Ansight SDK is source-available software under the Ansight SDK Source-Available License. It is not open-source software. Production use is licensed only for use with Ansight Services.
Usage
using Ansight;
#if ANDROID
using Microsoft.Maui.ApplicationModel;
#endif
var optionsBuilder = Options.CreateBuilder()
.WithBundledHostConnection(typeof(AppBootstrap).Assembly);
#if ANDROID
optionsBuilder = optionsBuilder.WithPlatformPairing(() => Platform.CurrentActivity);
#else
optionsBuilder = optionsBuilder.WithPlatformPairing();
#endif
var options = optionsBuilder.Build();
Runtime.InitializeAndActivate(options);
On Android, Ansight.Pairing requires the app to provide the current Activity so the package can launch the native scanner UI.
Once enabled, the app can keep using the existing host connection requests:
await Runtime.HostConnection.ConnectAsync(HostConnectionRequest.Auto());
await Runtime.HostConnection.ConnectAsync(HostConnectionRequest.QrCode());
await Runtime.HostConnection.ConnectAsync(HostConnectionRequest.PayloadText(payload));
Auto() still follows the normal Ansight default order: embedded developer pairing, remembered connection profiles, saved config, then plain bundled config. Remembered profiles are created after successful host sessions, keyed by the Wi-Fi network name reported by the host, and store the latest host/LAN address and discovery metadata for that network. The SDK cycles each valid profile newest-first during automatic reconnect attempts. Profiles expire after 14 days by default, and a successful reconnect refreshes the matching Wi-Fi profile. Explicit QR and payload requests always override the current connection attempt and update the remembered profile after a successful connection.
Configure profile retention through the core options builder:
var options = Options.CreateBuilder()
.WithHostConnectionProfileRetention(TimeSpan.FromDays(30))
.Build();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0-android35.0 is compatible. net9.0-ios18.0 is compatible. net9.0-maccatalyst18.0 is compatible. net10.0-android was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. |
-
net9.0-android35.0
- Ansight.Core (>= 0.1.0-preview.19)
- Xamarin.GooglePlayServices.Code.Scanner (>= 116.1.0.4)
-
net9.0-ios18.0
- Ansight.Core (>= 0.1.0-preview.19)
-
net9.0-maccatalyst18.0
- Ansight.Core (>= 0.1.0-preview.19)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Ansight.Pairing:
| Package | Downloads |
|---|---|
|
Ansight
All-in-one Ansight SDK package for .NET apps, including core runtime, pairing, and remote tools. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.19 | 34 | 5/8/2026 |
| 0.1.0-preview.18 | 37 | 5/8/2026 |
| 0.1.0-preview.17 | 32 | 5/8/2026 |
| 0.1.0-preview.16 | 37 | 5/6/2026 |
| 0.1.0-preview.15 | 35 | 5/5/2026 |
| 0.1.0-preview.14 | 46 | 5/5/2026 |
| 0.1.0-preview.13 | 31 | 5/5/2026 |
| 0.1.0-pre9 | 52 | 5/3/2026 |
| 0.1.0-pre8 | 43 | 5/3/2026 |
| 0.1.0-pre7 | 45 | 4/30/2026 |
| 0.1.0-pre6 | 41 | 4/30/2026 |
| 0.1.0-pre5 | 42 | 4/30/2026 |
| 0.1.0-pre4 | 52 | 4/27/2026 |
| 0.1.0-pre3 | 56 | 4/21/2026 |
| 0.1.0-pre12 | 43 | 5/4/2026 |
| 0.1.0-pre11 | 51 | 5/4/2026 |
| 0.1.0-pre10 | 39 | 5/3/2026 |